This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes attribute method of request parameter is not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "attribute method of request parameter is not working" Watch "attribute method of request parameter is not working" New topic
Author

attribute method of request parameter is not working

carox kaur
Ranch Hand

Joined: Mar 19, 2009
Posts: 52
Below is a servlet that forwards the request to another servlet by attaching attribute to the request object.


MsgServlet prcocess the request and display the data in the HTML file.

Everything is working but the Msgservlet is not able to retrieve the value of the attibute "name". There are no compilation errors in the java file.
At (1) the outout is "Welcome ,null" instead of "Welcome, abc".
*abc is the value of the field entered by the user at the time of submitting the request.
The xml file is :



Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

I would suggest setting the attribute before forwarding to the other servlet.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: attribute method of request parameter is not working