wood burning stoves 2.0*
The moose likes JSP and the fly likes Not able to submit the hidden pramaters from one jsp to the next jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Not able to submit the hidden pramaters from one jsp to the next jsp" Watch "Not able to submit the hidden pramaters from one jsp to the next jsp" New topic
Author

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

Tejavardhan Chintaluri
Greenhorn

Joined: Apr 04, 2006
Posts: 3
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

1. Are those hidden tags inside the form ?
2. How do you get them back ? Show us your code
Thanks


[My Blog]
All roads lead to JavaRanch
Sunesh Kumar
Ranch Hand

Joined: Oct 17, 2005
Posts: 89
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


Thanks & Regards<br />Sunesh Kumar Baachu
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026

<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 ]

Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
Tejavardhan Chintaluri
Greenhorn

Joined: Apr 04, 2006
Posts: 3
Thanks Vishnu and Sunesh. It works now.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

I'd like to thank myself too
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not able to submit the hidden pramaters from one jsp to the next jsp
 
Similar Threads
null is coming...when I set a HashMap in request object?
use hidden parameters?
Display Check Boxes & Dropdowns in Struts with search results
form value is missing some times
request paramter problem