• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in getting client IP Address in JAX-RPC web service  RSS feed

 
Ashish Nayal
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Filter Class:

public class ClientIPAddressFilter implements Filter {
/* (non-Java-doc)
* @see java.lang.Object#Object()
*/
public ClientIPAddressFilter() {
super();
}

/* (non-Java-doc)
* @see javax.servlet.Filter#init(FilterConfig arg0)
*/
public void init(FilterConfig arg0) throws ServletException {
// TODO Auto-generated method stub
}

/* (non-Java-doc)
* @see javax.servlet.Filter#doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain arg2)
*/
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
System.out.println("Remote Address: "+request.getRemoteAddr());
chain.doFilter(request, response);
// TODO Auto-generated method stub
}

/* (non-Java-doc)
* @see javax.servlet.Filter#destroy()
*/
public void destroy() {
// TODO Auto-generated method stub
}

}[/code]

web.xml


Client Invoking web service class

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!