This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Struts and the fly likes reading parameter  from the request object in ActionServlet 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 » Frameworks » Struts
Bookmark "reading parameter  from the request object in ActionServlet" Watch "reading parameter  from the request object in ActionServlet" New topic
Author

reading parameter from the request object in ActionServlet

Varsha Patil
Greenhorn

Joined: Jun 16, 2006
Posts: 19
Hi,

I'am trying to read a parameter from the request object in my ActionServlet class which extends the struts ActionServlet class.

I have included the piece of code in the doPost method
public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException
{
System.out.println("operation: " + request.
getParameter("operation"));
}

But it is seen that I get the following output though the "operation" contains some value.
operation: null

However in my Action class when I try to print (request.getParameter("operation")) it displays the values properly.
operation: get
operation: save

Does anyone have an explanation for this? Why am I getting null value in the Action servlet for request.getParameter("operation").
Thanks,
Varsha
 
 
subject: reading parameter from the request object in ActionServlet
 
Similar Threads
Problem with session
sending parameters with a link
What could cause this?
how to code for checkboxes on forms?
Unable to update database