Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 339
  • Last Modified:

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?

0
COMPUTER_SC_STUDENT
Asked:
COMPUTER_SC_STUDENT
  • 2
1 Solution
 
mukundha_expertCommented:
add it as a parameters to the request itself (construct the link with the params)
http://mysite.com/price.jsp?p=v&p1=v1
0
 
COMPUTER_SC_STUDENTAuthor Commented:
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.
0
 
mukundha_expertCommented:
but why is't that possible
this should be fine if you have a variable isbn
out.print("<TD><TR><TD><a href=\"price.jsp?isbn=" + isbn + \"" + title+"</a>");
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now