Richard Yee wrote:
> Mike,
> This:
> <a href="jsp2.jsp?trans=<%= request.getParameter("username")%>">Passing to
> jsp2</font></a>
>
> probably won't work directly. You need to change the outer "'s to single
> quotes.

No, not in this case, because the outer ones are part of the HTML (the
template text, as it's called in the JSP spec), so there's no risk that
the container confuses them with the ones used in the JSP expression.

Your warning applies to the case when an expression is used as an
attribute value for a JSP action element, though:

   <jsp:forward page='<%= request.getParameter("nextPage") %>' />

An alternative is to escape the inner ones:

   <jsp:forward page="<%= request.getParameter(\"nextPage\") %>" />

Hans
--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com
JavaServer Pages        http://TheJSPBook.com

===========================================================================
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://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to