Link to home
Create AccountLog in
Avatar of COMPUTER_SC_STUDENT
COMPUTER_SC_STUDENT

asked on

carrying values frome one page to another

I have two pages products.jsp and price.jsp, I have some variables in the products.jsp  that I want to carry there values through a link.

out.print("<TD><TR><TD><a href=\"#\"" + title+"</a>");

How can I carry these variables to the price.jsp page?

Avatar of mukundha_expert
mukundha_expert

add it as a parameters to the request itself (construct the link with the params)
http://mysite.com/price.jsp?p=v&p1=v1
Avatar of COMPUTER_SC_STUDENT

ASKER

but in jsp how to assign the variable value, I did this and it didn't work:

out.print("<TD><TR><TD><a href=\"price.jsp?isbn=isbn\"" + title+"</a>");

where the isbn is the variable name in both the product.jsp and the price.jsp, and both of them it is a string.
ASKER CERTIFIED SOLUTION
Avatar of mukundha_expert
mukundha_expert

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer