passing information from one jsp to another

Hi,

I have a problem when trying to get information from a jsp page. Lets say that a jsp page has a textbox named "bannerurl" and it has the data "http://www.abcd.com?param1=2000?param2=3000". When I try to get the information in an other jsp file using request.getParameter("bannerurl"), I get only the following data - ""http://www.abcd.com?param1=2000". All information including and after the "&" is ignore. This could be because it is recognizing the information after the "&" as an other parameter. How do I solve this problem.

Thanks.

[582 byte] By [gopinath.guptha] at [2007-9-30 2:45:03]
# 1
you might be better adding the information to the session object so that it can be retrieved later by other jsps or servlets.eg - session.getAttribute("myparam");stephen
sb1975 at 2007-6-29 10:28:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
" http://www.abcd.com?param1=2000?param2=3000" value has ? b4 param2 try changing it to &if it doesn't work still try the below line" http://www.abcd.com?param1=2000\&param2=3000". (added a slach b4 &)
AniKrish at 2007-6-29 10:28:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
em tried your data and it seemed to work okay for me, mb someone else can commentI don't think my suggestion of using the session object of much use after reading your question again!stephen
sb1975 at 2007-6-29 10:28:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Hi,I am extremely sorry. The data in the textbox is actually " http://www.abcd.com?param1=2000&param2=3000".In this, the data after the "&" is ignored.Thanks.
gopinath.guptha at 2007-6-29 10:28:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
Hi Stephen,There is an "&" symbol seperating the two parameters. I will try out your suggesstion of using session.Thanks again.
gopinath.guptha at 2007-6-29 10:28:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
Hi Stephen,If we want to put the data to the session, then we need to use getParameter() which is not fetching the entire data.I tried adding a / before the "&". but no use.Is there anyother way out.Thanks.
gopinath.guptha at 2007-6-29 10:28:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7

Hi

Are the two jsps below roughly doing what you want your application to do?

regards

Stephen

//jsps

1st page

<%@page contentType="text/html"%>

<html>

<head><title>JSP Page</title></head>

<body>

<form method="post" action="temp2.jsp">

<table>

<tr>

<td><span id="urlLabel">Enter url</span></td>

<td><input type="text" size="50" maxlength="50" name="urlField" /></td>

</tr>

</table>

<div>

<input type="submit" value="Submit" name="urlTestField" />

</div>

<form>

</body>

</html>

2nd page

<%@page contentType="text/html"%>

<html>

<head><title>JSP Page</title></head>

<body>

<% out.write((String)request.getParameter("urlField"));%>

</body>

</html>

sb1975 at 2007-6-29 10:28:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 8
wqwwqwqwqeqeqeqeeqeeeqewqeqeeeeqeeqeqeeeeqeeeeqeeqewasESasASSASAsSSasASsssAS
anish_at at 2007-6-29 10:28:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...