[Webinar] Streamline your web hosting managementRegister Today


retaining session variables

Posted on 2004-10-27
Medium Priority
Last Modified: 2010-04-01
a servlet page is calling a a Jsp page, this jsp page contains a hyperlink. When i click on the hyperlink, i have to call a jsp page with some parameters. I want to know how to pass the parameters to the jsp page on click of the hyperlink.

Do we need to use the session if so how?

Question by:bharathk50
1 Comment
LVL 35

Accepted Solution

TimYates earned 200 total points
ID: 12431122
<a href="other.jsp?param1=a&param2=b">click</a>

will allow you to do:

    String a = request.getParameter( "param1" ) ;
    String b = request.getParameter( "param2" ) ;

in "other.jsp"

otherwise, yeah, you can store the values in the session...  but they will be in the session no matter if the user clicks the link or not (as the JSP session code will run before the user gets the html page)


Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Want to create a VM?  Here's how you do it.
You do not need to be a security expert to make the RIGHT security. You just need some 3D guidance, to help lay out an action plan to secure your business operations. It does not happen overnight. You just need to start now and do the first thin…
Free Data Recovery software is an advanced solution from Kernel Tools to recover data and files such as documents, emails, database, media and pictures, etc. It supports recovery from physical & logical drive after a hard disk crash, accidental/inte…
Get the source code for a fully functional Access application shell with several popular security features that Access VBA application developers desire, but find difficult or impossible to figure out how to code. You get the source code for managi…
Suggested Courses
Course of the Month7 days, 17 hours left to enroll

608 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question