aspose file tools*
The moose likes Servlets and the fly likes Adding a new Parameter to request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Adding a new Parameter to request" Watch "Adding a new Parameter to request" New topic
Author

Adding a new Parameter to request

Chhaya Dhanani
Ranch Hand

Joined: Apr 11, 2001
Posts: 70
hi,
i am unable to find a decent approach for this problem.
i want to add a new paramter to my request and pass it to a class.. not a servlet.
how do i do it?
Please help me sought this problem immediately..
Thanx
Chhaya
Kiran Kumar
Ranch Hand

Joined: May 18, 2001
Posts: 107
a class cannot get the HttpRequest object directly. it has to be passed from the servlet. so if u want to send some object to the class use the request.setAttribute() and then pass it to the class


Thanks<br /> <br />Kiran <br /> <br />SCEA, SCJP 1.4,<br /> <br />"First they ignore u, then they laugh at u, then they fight u, <br />then u will win<br /> <br />Mahatma Gandhi"
Al Green
Greenhorn

Joined: Feb 09, 2002
Posts: 10
In Servlet2.2 the only way to mutate the HttpRequest is to use the setAttribute method.
However, in Servlet2.3, you can use the HttpServletRequestWrapper (I believe thats the correct class name) to wrap the request which allows you to basically mutate (lie) about the http request.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Adding a new Parameter to request
 
Similar Threads
Calling another servlet from the current servlet?
Passing Document from servlet to JSP see code
Multiple rows inserted coz of page refresh
How to stop data insertion on page refresh
response.setHeader not working