Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem: reading values from ServletRequst in Filter

Status
Not open for further replies.

caesarkim

Programmer
Oct 30, 2003
56
US
I am trying to intercept all request info (GET and POST method) coming from a user.

So I have a filter that captures some basic info (request method and uri) from request. But whenever I read parameters contained in http request for "POST" method, I can't figure out how to repost parameters to request. I think that after I read parameters from request in filter, parameters aren't available in http servlet. I think that I have to repost parameters to request after i read it.

does anybody know how to do it?
 
I thought about using session. but the filter is just a simple interceptor for a web application. I don't want to change the coding of the web app because of this filter.

any better idea?
 
Hi

The POST requests are composed by the browser, so you can not influence it directly with server-side script. You can pass those previously received parameters in a [tt]form[/tt]'s hidden [tt]input[/tt]s than each link will [tt]submit()[/tt] that [tt]form[/tt] using JavaScript on [tt]onclick[/tt] event. ( Although some people use such solutions, I consider it stupid. )

I do not understand why do you consider implementing session bigger change then playing with parameters.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top