[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 341
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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