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.
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.
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 >
