aspose file tools*
The moose likes Servlets and the fly likes Need to write interceptor for non tomcat application. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Need to write interceptor for non tomcat application." Watch "Need to write interceptor for non tomcat application." New topic
Author

Need to write interceptor for non tomcat application.

Arpan Raj
Greenhorn

Joined: Apr 22, 2010
Posts: 15

Hi ,
My requirement is to create a kind of filter or interceptor which will log all the requests which are going to other webserver.
Say for example : our Fitnesse is running on localhost:80 and tomcat is running on localhost :9000.
Now client should not know that response is coming from Fitnesse. and meanwhile we want to log the request in tomcat servlet.
I tried using RequestDispatcher.include and forward but they are working for the same webappcontext.
Here context are changing so i tried using response.sendRedirect. its going on the Fitness server URL and its visible on the URL. But I think response which is going back to the client is not going through tomcat servelt.
Is there any way to achieve to log and incoming and outgoing request to pass and log in tomcat deployed servlet?

Thanks in advance.
Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

Try using proxy servlet, to prevent application(s) specific information from being shared with the outside world. This is available as one of the modules in Apache project.


S.D. MADHAN
Not many get the right opportunity !
Arpan Raj
Greenhorn

Joined: Apr 22, 2010
Posts: 15

Thanks Madhan ,
Can you please suggest the name of the module?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Need to write interceptor for non tomcat application.