Hello Hans,
thanks a lot. the JSP Page works fine with a lower case "u" (userName
and not UserName).
But with the Suns JSWDK 1.01, I've to use a capital "U". Ok, thinks
change.... :-)
Thanks Stefan
Thursday, April 27, 2000, 8:21:19 PM, you wrote:
HB> Stefan Magin wrote:
>>
>> Hello,
>> I’ve a problem with Tomcat 3.1 and JSP Beans.
>>
>> The following code doesn’t work in Tomcat 3.1 but works in Suns JSP
>> severs 1.0
>>
>> Code :
>> ****************************************************
>> <html>
>> <jsp:useBean id="DLoginData" scope="session" class="Login.DLoginData"
>> type="Login.DLoginData" />
>> <body>
>> Hello <jsp:getProperty name="DLoginData" property="UserName"/>
>> </body>
>> </html>
>> ****************************************************
>>
>> Tomcat bring this error message :
>> Included servlet error: 500
>> Location: /SMD/servlet/SMDMain
>> Internal Servlet Error:
>> org.apache.jasper.JasperException: Cannot find any information on property
>> 'UserName' in a bean of type 'Login.DLoginData'
>> [...]
HB> That's because you're not following the naming conventions for bean properties.
HB> If the bean has a method named getUserName(), the corresponding property is
HB> named userName (note the lower case "u"), see the JavaBeans spec for details.
HB> So try this instead:
HB> Hello <jsp:getProperty name="DLoginData" property="userName"/>
HB> Hans
HB> --
HB> Hans Bergsten [EMAIL PROTECTED]
HB> Gefion Software http://www.gefionsoftware.com
HB> ===========================================================================
HB> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
HB> Some relevant FAQs on JSP/Servlets can be found at:
HB> http://java.sun.com/products/jsp/faq.html
HB> http://www.esperanto.org.nz/jsp/jspfaq.html
HB> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
HB> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Best regards,
Stefan mailto:[EMAIL PROTECTED]
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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