×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

problem: reading values from ServletRequst in Filter

problem: reading values from ServletRequst in Filter

problem: reading values from ServletRequst in Filter

(OP)
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?

RE: problem: reading values from ServletRequst in Filter

(OP)
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?

RE: problem: reading values from ServletRequst in Filter

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 form's hidden inputs than each link will submit() that form using JavaScript on onclick 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.
http://rootshell.be/~feherke/

RE: problem: reading values from ServletRequst in Filter

And why cannot just redirect the request?

Cheers,
Dian

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close