Solved

carrying values frome one page to another

Posted on 2008-06-10
3
331 Views
Last Modified: 2010-05-18
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
Comment
Question by:COMPUTER_SC_STUDENT
  • 2
3 Comments
 
LVL 10

Expert Comment

by:mukundha_expert
ID: 21751754
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
 

Author Comment

by:COMPUTER_SC_STUDENT
ID: 21756903
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
 
LVL 10

Accepted Solution

by:
mukundha_expert earned 50 total points
ID: 21758533
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

809 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