Adding Parameters to the URL??
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   saurav_gupta
Posted On:   Tuesday, March 5, 2002 09:57 AM


I am working on JSP and was unable to figure out a way to send some variable from one page to another by appending them in the end of URL's using '?' .



href="greeting.asp?fname=John&lname=Smith">



Though I know how to send some data and given above is a code for it but if it is a variable whose value is not know before hand ( john and smith in this case) than how can i pass the information?

Re: Adding Parameters to the URL??

Posted By:   Anonymous  
Posted On:   Tuesday, March 5, 2002 02:01 PM

Hi Saurav, JJ from Mexico (GE, Greenville US)



try it in jsp like this

when you have your link, just add you parameters into a variable and concat that:




<%String name=request.getParameter("name");%>
<%
out.println("