Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language:
Expertise: Beginner
Mar 6, 2000

Form Input and JSP

Question:
I want to collect form data in a JSP page where the form is submitted by one of many possible links (possibly passing values using URL rewriting). In one case, I have one text input box, followed by two links. The text input box's data ends up in the HttpServletRequest object. How do I pass the URLs of the links to the JSP page?

Answer:
The normal way to pass extra data from an HTML form to a JSP page is through hidden input tags. The values of the hidden input will be included in the HttpServletRequest object as parameters, retrievable with either getParameter() or getParameterValues(). An example of using the HTML hidden tag is:


DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date