dcsimg
Getting Values from html hyper links to a jsp
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   kumar_kumar
Posted On:   Monday, July 17, 2006 08:59 AM

Hi everybody. How can I get values from the hyperlinks. I am using alphabets list(A...Z) in my jsp. I wrote some code like the user clicks on to the alphabet it should show some result from the database using jsp. In otherwords It should dynamically prepare a query itself depending on the alphabet. How can I do that.

Re: Getting Values from html hyper links to a jsp

Posted By:   WarnerJan_Veldhuis  
Posted On:   Monday, July 17, 2006 05:04 PM

A value from a hyperlink is called a parameter. Check your HttpServletRequest object for methods dealing with parameters. (Hint: String blah = request.getParameter("myParameter");)



You can create a parameter either by:

1) Have it as a form field in a form that you submit (using either method GET or POST)

2) Append it to a URL: http://www.somehost.com/somepage.jsp?myParameter=SomeValue (This is always a GET request)
About | Sitemap | Contact