• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to getParameter in jsp

 
Goutham Reddy
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi can any one say why i am not able to getParameter in jsp.
My servlet code


JSP code:result.jsp


HTML code:


DD:



when i access the page http://localhost:8080/testJSP3/form.html i am getting "Your hobby is ".Why i am unable to get the parameter from request.getParameter("hobby").
[ December 08, 2005: Message edited by: Goutham Reddy ]
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the kind of scriptlet you are using.
 
Rajesh Vijaya
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in your jsp code ..use either of this


<% out.println(request.getParamter("hobby"); %>


or

<%= request.getParamter("hobby") %>

Only when you are using a scriptlet expression we can omit the out.println since it is implied...
 
Goutham Reddy
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am able to get it now.Thank you Marc and Rajesh.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic