I think it is just a simple syntax error. The JSP expression tag on your
userName text field is incorrect - needs to be %= without the space. You
have a scriptlet with =FormBean.getUserName() trying to be executed. It's
interesting to see that it looks like Tomcat equates an equals sign
You should make userName field protected or private otherwise your
setter/getter is pointless.
try running 'javap bean.FormBean' and see if you can see the definition.
also try an different id name since it is not a static method.
-Original Message-
From: eric [mailto:[EMAIL PROTECTED]]
To: Tomcat Users List
[EMAIL PROTECTED]
cc:
07/11/02 11:47 Subject: Re: Cannot use bean from jsp,
but servlet ok. I'm dying
seems like a name conflict - both the class and the variable are named
FormBean. i would suggest using
id=myFormBean
and
%=myFormBean.getUserName()%
Have you tried %@page import=beans.FormBean% at the top of your JSP?
eric wrote:
Help. Absolutely stuck. Tomcat cannot find my bean classes no matter what
when called from jsp pages. From within servlets no problem.
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional
Ah - good eyes. That's probably the problem.
[EMAIL PROTECTED] wrote:
seems like a name conflict - both the class and the variable are named
FormBean. i would suggest using
id=myFormBean
and
%=myFormBean.getUserName()%
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For
-
From: Eddie Bush [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, July 11, 2002 1:07 PM
Subject: Re: Cannot use bean from jsp, but servlet ok. I'm dying!
Ah - good eyes. That's probably the problem.
[EMAIL PROTECTED] wrote:
seems like a name conflict - both the class
You would need the following:
%@ page language=java import=beans.FormBean contentType=text/html %
jsp:useBean id=FormBean class=beans.FormBean scope=request /
Also, is your FormBean.class in webapps\xxx\WEB-INF\classes\beans directory?
Roger Whitcomb
Computer Associates
Senior Software Engineer
Try moving the = right next to % in your input ... value= clause:
input type=text name=userName value=%= FormBean.getUserName() %
Roger Whitcomb
Computer Associates
Senior Software Engineer
Development
Phone: +1 408 965 8653
FAX: +1 408 965 8805
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Message -
From: Eddie Bush [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, July 11, 2002 1:07 PM
Subject: Re: Cannot use bean from jsp, but servlet ok. I'm dying!
Ah - good eyes. That's probably the problem.
[EMAIL PROTECTED] wrote:
seems like a name conflict - both
Seems like you are mixing jsp action tags and java class instances.
Use jsp:usebean with jsp getpropery
or
Use import in @...% tag and create an instance
-Original Message-
From: eric [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 12:18 AM
To: [EMAIL PROTECTED]
Subject:
Subject: RE: Cannot use bean from jsp, but servlet ok. I'm dying!
Seems like you are mixing jsp action tags and java class instances.
Use jsp:usebean with jsp getpropery
or
Use import in @...% tag and create an instance
-Original Message-
From: eric [mailto:[EMAIL PROTECTED]]
Sent
I think I saw a reply mention you don't have an import statement in your jsp
to locate your class
%@page import=beans.FormBean%
-Original Message-
From: eric [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 1:18 AM
To: [EMAIL PROTECTED]
Subject: Cannot use bean from jsp, but
'
Subject: RE: Cannot use bean from jsp, but servlet ok. I'm dying!
I think I saw a reply mention you don't have an import statement in your jsp
to locate your class
%@page import=beans.FormBean%
-Original Message-
From: eric [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 1:18 AM
I just noticed you have usebean and not useBean. If this is how you coded
it, your Bean is not getting instanciated. That will give you the error your
are seeing. Remember JSP Tags are case sensitive.
Ron
-Original Message-
From: eric [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11,
This was it.
I had usebean, instead of useBean. Argghhh.
Thanks so much to all of you.
- Original Message -
From: Ron Day [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, July 11, 2002 3:40 PM
Subject: RE: Cannot use bean from jsp, but servlet ok. I'm dying
16 matches
Mail list logo