Perry Hoekstra wrote:
>
> Greet the sun all,
>
> I looked at the archives on how to pass dynamic content through a variable:
>
> <x:foo att1="<%= java.lang.Data().toString() %>" />
>
> and this works.  However, when I try this:
>
> <x:foo att1="<%= request.getParameter("PARAM1") %>" />
>
> I get a < Attribute PARAM1 has no value > error. I am passing the PARAM1
> value like any other: http://localhost:8080/foo.jsp?PARAM1=Hello
>
> Any ideas on what I am doing wrong?

Yes, the quotes around PARAM1 confuses the parser. Either use single quotes
around the attribute:

 <x:foo att1='<%= request.getParameter("PARAM1") %>' />

or escape the double-quotes:

 <x:foo att1="<%= request.getParameter(\"PARAM1\") %>" />

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

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to