English 中文(简体)
Intercept HTTP在服务器上提出的要求
原标题:Intercept HTTP requests in server java

我需要实施一些诸如过滤器或听器之类的材料,以拦截吉卜赛人的请求,并为了各种目的检索吉大港定居人士。

我使用Java、Jboss应用程序服务器和网络服务。 我希望这一过滤系统在网络服务电话之前进行——在思考方面,但并不认为与吉大港山区有关的障碍。 在过滤器之后,应发出服务电话。

Jax-WS的操作人员不为我工作,因为他们只拥有SOAP的有效载荷。

任何想法?

提前感谢。

最佳回答

您不能制造一个服务器过滤器,该过滤器拦截了进入你的网络服务发动机的所有要求? 如果你使用Axis或任何其他SOAP发动机,我希望你能够制造一个过滤器,拦截进入SOAP发动机提供的主要服务器的所有要求。

 public void doFilter(ServletRequest request,ServletResponse response,FilterChain chain) throws IOException,ServletException
  {
    HttpServletRequest httpRequest=(HttpServletRequest)request;
    HttpServletResponse httpResponse=(HttpServletResponse)response;
       Enumeration headerNames = httpRequest.getHeaderNames();
        while(headerNames.hasMoreElements()) {
          String headerName = (String)headerNames.nextElement();
          out.println(headerName);
          out.println(request.getHeader(headerName));
        }
       chain.doFilter(request,response);
}
问题回答

http://www.tcpdump.org/“rel=“nofollow”>libpcap 和Java接口jNetPcap





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签