Dave Potts wrote:
> > [...]
> >You are trying to use a JSP action element to set the attribute value of
> >another custom action, and that is not allowed according to the JSP spec.
> >You must use a JSP expression to set the attribute value instead:
> >
> > <pinlib:foo value="<%= addressInfo.getAddress() %>" />
> >
> >Most likely you're confusing this scenario with another scenario I
> >describe in the book, namely setting the attribute value for an HTML
> >element using the getProperty action, e.g.
> >
> >  <input name="userName" value="<jsp:getProperty name="user"
> >    property="userName" />">
> >
> >This works because the web container treats the HTML element as template
> >text; it's doesn't interpret the HTML elements so as far as the
> >container is concerned, the above is the same as:
> >
> >  Any text <jsp:getProperty name="user"
> >    property="userName" /> Any text
> >
> >I hope you understand the difference.
> I understand the difference, its a nice theory, but it does'nt work.
>
> I tried something smilair
> <% String name=request.getParameter("address"); %>
>  <pinlib:foo value=" <% name %>" />

You're using a "JSP scriptlet" instead of a "JSP expression". It should
be like this instead:

  <% String name=request.getParameter("address"); %>
  <pinlib:foo value="<%= name %>" />

Note the equal sign ("=") after the percent sign ("%"); that's what
makes it a "JSP expression".

> [...]
>  I have checked the setting in the tab ligrary xml file, the retexprvalue is set
> to true.

Maybe it's just a typo in your mail, but it should be "rtexprvalue", not
"retexprvalue".

Hans
--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), 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://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