GeeCON Prague 2014*
The moose likes Servlets and the fly likes Intercepting request parameters in JSP. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Intercepting request parameters in JSP." Watch "Intercepting request parameters in JSP." New topic
Author

Intercepting request parameters in JSP.

Amit Shanker
Greenhorn

Joined: Mar 08, 2003
Posts: 23
Hi All,

I need to modify/scan the request parameters and set them to different values. I've heard that it is possible through filters. Can it be achieved in iPlanet 6.5 application server and are there any known problems, say of performance in using the filter class?

Is there a simpler solution by which deployment can be avoided? Because for implementing filters the web.xml file will require changes and will call for redeployment.

Awaiting responses.

Cheers,
Amit.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Amit Shanker:
I need to modify/scan the request parameters and set them to different values. I've heard that it is possible through filters. Can it be achieved in iPlanet 6.5 application server and are there any known problems, say of performance in using the filter class?

It can be achieved with iPlanet 6.5 if iPlanet 6.5 supports the Java Servlet 2.3 specification (filters were introduced in 2.3, if I remember correctly).
Regarding performance, it shouldn't be a problem if you're not doing anything "big" inside the filter. If you're worried about performance, you should test it yourself and see how it affects your particular architecture and application profile.

Originally posted by Amit Shanker:
Is there a simpler solution by which deployment can be avoided? Because for implementing filters the web.xml file will require changes and will call for redeployment.
If you want to avoid redeployment of the application, the only other option is to intercept the raw network packets between the client and the web server. It is waaaaay better to just redeploy the application.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Moving this to the Servlets forum...


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
GeeCON Prague 2014
 
subject: Intercepting request parameters in JSP.