It all seems to be right, but... are you sure "webapps/wi/WEB-INF/classes"
directory is in your classpath? AFAIK, tomcat.sh doesn't add automatically
the WEB-INF/classes directory under webapps/<context> when it builds its own
CLASSPATH, so you should modify the script to add
"webapps/wi/WEB-INF/classes" to CLASSPATH variable. That's because, I think,
the servlet built by the JSP contains a Class.forName("...").newInstance()
to instantiate the bean declared with <jsp:useBean .. />, but since this
servlet isn't under your classes path, it needs to find
"webapps/wi/WEB-INF/classes" in CLASSPATH.

Regards
Alessio
[EMAIL PROTECTED]


-----Messaggio originale-----
Da: Mats Palats [mailto:[EMAIL PROTECTED]]
Inviato: mercoled� 3 luglio 2002 12.16
A: [EMAIL PROTECTED]
Oggetto: Problems with jsp:setProperty


I'm unable to use setProperty with any of my beans with tomcat, it worked 
under jserv so I know my beans have the correct mutators.

<jsp:useBean id="conn" class="wiBeans.ConnectionBean" scope="session" />
    <jsp:setProperty name="conn" property="username" />
    <jsp:setProperty name="conn" property="password" />

generates this error message:
org.apache.jasper.JasperException: Can't find a method to write property 
'username' in a bean of type 'wiBeans.ConnectionBean'

but in my ConnectionBean class I have the method:
public void setUsername(String str) {
    username = str;
}

the ConnectionBean.class file is placed in 
webapps/wi/WEB-INF/classes/wiBeans

this error is really annoying and have been bugging me for a few days now, I

would really appreciate any ideas to what I might be doing wrong.



_________________________________________________________________
Skicka snabbmeddelanden till dina v�nner online med MSN Messenger: 
http://messenger.msn.se


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



- Disclaimer -
This email and any attachments thereto may contain information which is
confidential and/or protected by intellectual property rights and are
intended for the sole use of the recipient(s) named above. Any use of the
information contained herein (including, but not limited to, total or
partial reproduction, communication or distribution in any form) or the
taking of any action in reliance on the contents, by persons other than the
designated recipient(s) is strictly prohibited.

If you have received this email in error, please notify the sender either by
telephone or by email and delete the material from any computer.

Thank you for your cooperation. 



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to