Problems with jsp:setProperty

2002-07-03 Thread Mats Palats

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]




Re: R: Problems with jsp:setProperty

2002-07-03 Thread Mats Palats

just as a test I placed a wiBeans.jar in $TOMCAT_HOME/lib but got the same 
result. if it's missing from the classpath, shouldn't it complain about not 
finding the class?
I also tried to add the path to classpath but got the same result then too


From: Alessio Fiore [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Subject: R: Problems with jsp:setProperty
Date: Wed, 3 Jul 2002 12:30:09 +0200

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]




_
Med MSN Foto kan du enkelt dela med dig av dina fotografier och beställa 
kopior: http://photos.msn.se


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




Re: AW: Problems with jsp:setProperty

2002-07-03 Thread Mats Palats

the form element has the same name as the property.

If the bean property and the request parameter have different names,
you must specify both property and param. If they have the same name,
you can specify property and omit param.

If a parameter has an empty or null value, the corresponding bean
property is not set.
(quotes from http://java.sun.com/products/jsp/tags/11/syntaxref1114.html)

I thought the second quote said that if I specified a wrong param it 
wouldn't call the setUsername() but when I wrote param=f00 on both I still 
got the same result,.. :\

thnx for the quick replies from u guys btw =)

_
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]




Re: Default Web application

2002-07-03 Thread Mats Palats

it's in server.xml,
if you want to have www.url.com you set path to 
Context path= docBase=your_webapps_subdir debug=0 reloadable=true/
(reloadable makes tomcat reload your classfiles when you've changed 'em btw)

http://server.ccl.net/cca/software/UNIX/apache/debian-tomcat/node9.html
that page has some info about it
I still don't know what debug does... anyone else know?

_
MSN Hotmail är världens populäraste e-posttjänst. Skaffa dig ett eget konto 
du också: http://www.hotmail.com


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




Where to place pjaf files?

2002-07-02 Thread Mats Palats

When using pja with tomcat, where should I place the pjaf files (the fonts). 
Should they just be in a system path or some special directory inside the 
tomcat tree.

//Mats

_
På MSN hittar du det roliga, intressanta och användbara på internet: 
http://www.msn.se


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




Problems with setProperty

2002-07-01 Thread Mats Palats

I'm having problems setting properties with setProperty

in the top of my .jsp page I have:
jsp:useBean id=conn class=wiBeans.ConnectionBean scope=page
jsp:setProperty name=conn property=connstr 
value=jdbc:oracle:thin:@localhost:1521:orcl /
jsp:setProperty name=conn property=username value=scott /
jsp:setProperty name=conn property=password value=tiger /
/jsp:useBean

and it generates this error:
Can't find a method to write property 'connstr' in a bean of type 
'wiBeans.ConnectionBean'

but if I remove those setProperty lines and instead use
% conn.setConnstr(bla bla bla) %
it works.

does anyone know why this is happening? I think it's really weird.

Thnx in advance //Mats

_
Med MSN Foto kan du enkelt dela med dig av dina fotografier och beställa 
kopior: http://photos.msn.se


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