Newbie problem: About JSP parameter in <jsp:forward ... >

I wirte a main.jsp :

<%@ page contentType="text/html; charset=gb2312" %>

<%@ page import="java.net.URLEncoder" %>

<html>

<title> example </title>

<body>

this is main jsp.

<% String s = URLEncoder.encode("+js"); %>

s = <%= s %>

<jsp:forward page="forward.jsp?para1=<%=s%>" />

</body>

</html>

and a forward.jsp:

<%@ page contentType="text/html; charset=gb2312" %>

<%

String p1 = request.getParameter("para1");

%>

<html>

<title> example </title>

<body>

this is forward jsp.

para1 = <%= p1%>

</body>

</html>

My problem is : I cannot get the parameter value from main.jsp

Do you know?

[873 byte] By [Lutianxiong] at [2007-9-27 18:44:21]
# 1
In other word, this problem is :how to pass a "+" to another jsp?
Lutianxiong at 2007-7-6 19:57:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Try using a java.net.URLDecoder when you read the parameter in the second JSPString p1 = URLDecoder.decode(request.getParameter("para1"));
JRay at 2007-7-6 19:57:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Hi,Just replace in main.jsp<jsp:forward page="forward.jsp?para1=<%=s%>" />with:<jsp:forward page="forward.jsp"><jsp:param name="para1" value="<%=s%>"></jsp:forward>-TV
ThanhVy at 2007-7-6 19:57:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
yes, thank you.
Lutianxiong at 2007-7-6 19:57:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...