You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rui Oliveira <ol...@milu.ipn.pt> on 2000/07/27 17:31:44 UTC

Issue with the jsp:useBean

Hello,

when we are writting a JSP and the JSP uses a Bean, if we do something
like:
	<jsp:getProperty name="mybean" property="username" />
	
the JSP and the Bean itself already know that the method to be invoked
inside the bean is the "setUsername" method?

Is it allways case sensitive? I mean, if we have for instance the
property "password" we would have a correspondent method called
"setPassword"?


Best Regards

Rui Oliveira


P.S.: we can I find extended info on the JSP tag?


RE: class reloading bug?

Posted by Russell Gold <ru...@acm.org>.
At 1:38 AM -0400 7/28/00, Rob S. wrote:
>> I am using Tomcat 3.1. When I replace class files for my application, and
>> then run it, Tomcat gives me a class cast exception on the JavaBean class
>> used by the JSPs - even though that class has NOT changed. Why is this
>> happening?
>
>Going out on a complete limb here, but could it possible give you this
>message if one of its members had changed?

Nothing of the class has changed. Other classes have, but not this one.

------------------------------------------------------------------------
Russell Gold                     | "... society is tradition and order
russgold@acm.org    (preferred)  | and reverence, not a series of cheap
russgold@netaxs.com              | bargains between selfish interests."
rgold@thesycamoregroup.com       |   - Poul Anderson, "Iron"



RE: class reloading bug?

Posted by "Rob S." <rs...@home.com>.
> I am using Tomcat 3.1. When I replace class files for my application, and
> then run it, Tomcat gives me a class cast exception on the JavaBean class
> used by the JSPs - even though that class has NOT changed. Why is this
> happening?

Going out on a complete limb here, but could it possible give you this
message if one of its members had changed?

- r


class reloading bug?

Posted by Russell Gold <ru...@acm.org>.
I am using Tomcat 3.1. When I replace class files for my application, and 
then run it, Tomcat gives me a class cast exception on the JavaBean class 
used by the JSPs - even though that class has NOT changed. Why is this 
happening?


Re: Issue with the jsp:useBean

Posted by Christopher Go <ch...@msmedia.com>.
Rui,

If your bean call looks like:
<jsp:useBean id="mybean" class="myBean" />

then your getProperty call is
<jsp:getProperty name="mybean" property="username" />

then the method that is invoked inside the bean is

getUsername().

It is always been case sensitive in my experience.  I think this is an
extension of the fact that Java is case sensitive.

- Chris


----- Original Message -----
From: "Rui Oliveira" <ol...@milu.ipn.pt>
To: <to...@jakarta.apache.org>
Sent: Thursday, July 27, 2000 8:31 AM
Subject: Issue with the jsp:useBean


> Hello,
>
> when we are writting a JSP and the JSP uses a Bean, if we do something
> like:
> <jsp:getProperty name="mybean" property="username" />
>
> the JSP and the Bean itself already know that the method to be invoked
> inside the bean is the "setUsername" method?
>
> Is it allways case sensitive? I mean, if we have for instance the
> property "password" we would have a correspondent method called
> "setPassword"?
>
>
> Best Regards
>
> Rui Oliveira
>
>
> P.S.: we can I find extended info on the JSP tag?
>


RE: Issue with the jsp:useBean

Posted by "Rob S." <rs...@home.com>.
Hiya Rui,

> the JSP and the Bean itself already know that the method to be invoked
> inside the bean is the "setUsername" method?

Yep, via reflection/introspection.

> Is it allways case sensitive? I mean, if we have for instance the
> property "password" we would have a correspondent method called
> "setPassword"?

Your example is correct.  You'll want to check the link below for more info
as well!

> P.S.: we can I find extended info on the JSP tag?