• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

passing hidden field in jsp

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi,

I have a.jsp, b.jsp and c.jsp. a.jsp contains one hidden text field (named as text1) and one submit button. the submit action will open the b.jsp and the b.jsp contains one submit button this will open the c.jsp.

My query is how can i fetch the hidden text field(text1) name and its value in from a.jsp to c.jsp.

How will pass the hidden text field name in jsp request?

very urgent....


--
with regards,
M. Bharathi


 
Ranch Hand
Posts: 45
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hidden fields can be fetched using the request object as shown below

String hiddenValue = request.getParameter("text1");

Kuldip
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just use input type="hidden" name="name" attribute and request the value for it and use it for your code
 
muthu bharathi
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi jamal/Kuldip,

Very thanks for your quick response. I need one more clarification.

How can we get the element type in jsp? for example i have



i need the element type is "text" in next jsp page.

--
with regards,
M. bharathi

>
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no way to know the original element's type.

All JSP parameters are sent as Strings. Always.

Besides--you already *know* the type--you wrote the original JSP.
 
muthu bharathi
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi David,


Thanks for your response..

Here i mean the type is The attribute "Element type" for the <input /> text box.


-
Regards,
M.Bharathi

 
Sheriff
Posts: 67754
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All you get is the name and the value. Period.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic