Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

What monsters are hiding in your child's room? In this article I will share with you a tech horror story that could happen to anyone, along with some tips on how you can prevent it from happening to you.
It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

618 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