• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

reading parameter from the request object in ActionServlet

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
It runs on an internal combustion engine. This ad does not:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic