Dave Potts wrote:
>
> I have attempted to supplyu the input from a bean via jsp:getProperty to a
> custom tag.
>
>  <pinlib:foo value="<jsp:getProperty
>                                 name="addressInfo"
>                                 property="address"
>                                 />">
>
> The syntax of double quote marks is correct according to the Hans Bergsten Java
> server Pages book.
>
> The web server is tomcat version 3.3 milestone 4, is this a case of  a bug,
> feature, RTFM or more likly a coding error on my part  ?
>
> I have tried playing with using ' quote marks, but receive other error messages.
>
> Does anybody have a clue

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.

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