File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not able to submit the hidden pramaters from one jsp to the next jsp

 
Tejavardhan Chintaluri
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I'm trying to set some hidden parameters in one JSP and submitting the page, I'm not able to retrieve those parameters in the next jsp using requestObject.getParameter() method.

Can someone help me.
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Are those hidden tags inside the form ?
2. How do you get them back ? Show us your code
Thanks
 
Sunesh Kumar
Ranch Hand
Posts: 89
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
see ur hidden field should be like this...

<form name="xxx" action="xxx.jsp">
<input type=hidden name="hidden1">
</form>

to get the value in other jsp is like this...

String st=request.getParameter("hidden1");

ok this may help u...

bye
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

<input type=hidden name="hidden1">


Looks like you haven't set any value.

<input type=hidden name="hidden1" value="anyValue">

ONLY if you set this value attribute can retrive it's corresponding value in the JSP page mentioned in the action attribute of form tag.
[ April 05, 2006: Message edited by: Vishnu Prakash ]
 
Tejavardhan Chintaluri
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Vishnu and Sunesh. It works now.
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd like to thank myself too
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic