Hello all,

for some reasons, i need to pass a parameter to another jsp file using
jsp:include but it fails when the string i pass contains an ampersand
(&). i've tried to substitue "&" with "&" but still doesn't work.
is there any way to handle this?

any help is much appreciated.

here's the script who calls:
<%
// for one reason, i need to make name & age as a single parameter
String caller = "mainpage.jsp?name=bill&age=20";
%>
<jsp:include page="targetpage.jsp" flush="true">
        <jsp:param name="caller" value="<%= caller %>"/>
</jsp:include>
<!-- finish -->

and here's the script who catch the call:
<%
String thecaller = request.getParameter("caller");
%>
result = <%= thecaller %>
<!-- finish -->

it will print
result = mainpage.jsp?name=bill
not
result = mainpage.jsp?name=bill&age=20
as i expected

--
Best regards,
 dion                          mailto:[EMAIL PROTECTED]

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to