• 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

How to Retrive the hidden field value

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
Here i am post my problem,
can you guys help me.
How to retrive the hidden field value.
in one JSP page i put code like this.
<input type="hidden" name="eid" value="<%=form.getEventId()%>">

i need to get that value into some other JSP page.
How i will get it. i mean i will retrive the hidden field values.
1). is there any other techinque.

it's urgent.please
Regards,
Raghu.
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<input type="hidden" name="eid" value="<%=form.getEventId()%>">

use => request.getParameter("eid");
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It can be read like any other input parameters. For example using EL's "param" or "paramValues" implicit objects, or jsp "request" object.
 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey, I'm sort of new to this, so this may be stupid, or obvious, but you say you need to use it in other JSP pages. I think that means you need to consider the scope, and I think if you put it in request scope and then the browser requests another page, you will not be able to access it.

One of you gurus jump in: true or no?
 
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe that using hidden fields to maintain state is a bad idea. It puts a big security hole in your application.

In my previous work place, we contracted a testing company to do some security vulnerablity testing for us. The tester put our application in an unexpected state just by fiddling with the hidden fields. We then spent couple of weeks removing all hidden fields from our JSP forms.
 
Sheriff
Posts: 67746
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
I do not think the OP said anything about using it to maintain state.

And submission parameters have nothing to do with the scopes which hold scoped variables, not request parameters.

Let's not needlessly complicate matters.
reply
    Bookmark Topic Watch Topic
  • New Topic