tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ron Day" <ron...@ronday.cc>
Subject RE: You used <servlet-mapping> to make your servlet work, but what about a JSP page with a bean?
Date Tue, 14 Jan 2003 22:53:52 GMT
No, your syntax is correct. Must be another problem.

sorry

-----Original Message-----
From: Wilson Snook [mailto:operations@planman91.fsnet.co.uk]
Sent: Tuesday, January 14, 2003 4:56 PM
To: Tomcat Users List
Subject: Re: You used <servlet-mapping> to make your servlet work, but
what about a JSP page with a bean?


Thanks Ron, but please note bean is declared to be in:

    package coreBeans;

and directory structure is

    %TOMCAT_HOME%/webapps/core/WEB-INF/classes/coreBeans/FormBean.class

AFAIK that is the correct form, unless you are saying that it has to be:

    package com.coreBeans;

and

    %TOMCAT_HOME%/webapps/core/WEB-INF/classes/com/coreBeans/FormBean.class

instead.

Also, note bean works if the application components are moved to appropriate
directories under the 'examples' folder.  I'm pretty sure the bean is not
the problem.  It seems to me Tomcat cannot 'see' the class even though it is
in the right place (I think).

Wilson

----- Original Message -----
From: "Ron Day" <ronday@ronday.cc>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Tuesday, January 14, 2003 10:38 PM
Subject: RE: You used <servlet-mapping> to make your servlet work, but what
about a JSP page with a bean?


> Is your bean in a package? If not Tomcat will not find it in the default
> package.
>
> just add "package com.mypackage" to bean source, and put class file in
> classes/com/mypackage
>
> ron
>
> -----Original Message-----
> From: Wilson Snook [mailto:operations@planman91.fsnet.co.uk]
> Sent: Tuesday, January 14, 2003 4:31 PM
> To: Tomcat Users List
> Subject: You used <servlet-mapping> to make your servlet work, but what
> about a JSP page with a bean?
>
>
> I am a newbie experiencing a very frustrating problem.  I have a web
> application that uses a packaged javabean.  When I create a web
application
> with the correct directory structure under the 'webapps' directory (see
> below), having created a context in 'server.xml', going to the localhost
> page produces the following error:
>
>  HTTP Status 500: ...JasperException: Cannot find any information on
> property 'uName' in a bean of type 'coreBeans.FormBean'...
>
> BUT...if I move this application's components in the appropriate
directories
> under the 'examples' folder, it works (therefore the JSP page and the bean
> are not broken in any way).
>
> BUT...if I leave the webapp where it is and disable the bean, the JSP page
> works (although that's not a lot of use <g>) even if I use JSP statements
in
> it.  I do have Apache HTTP server on this machine, but I mention it
without
> knowing how this would be relevant in any way.
>
> AND...I tested another web application that uses a servlet and this would
> not work either.  HOWEVER...I fixed that by using a suitable
> <servlet-mapping> tag in 'web.xml'.  Unfortunately, I don't think I can do
> this with a bean (or can I?).
>
> Does anyone out there know:
>     1) why my webapp can't find the bean class?
>     2) why mapping a servlet solves a similar problem for a JSP page using
> it?
>     3) how I can get my webapp to find the bean class?
>
> I won't at this stage post the webapp JSP page, bean code or xml since I
> know they work if placed under the 'examples' directory.
>
> This problem has been driving me nuts for nearly a week and if anybody
could
> shed some light upon it I think I would be close to ecstatic.
>
> TIA,
>
> Wilson
>
> ::Tomcat 4.1.18
> ::Apache 2.043
> ::Win2K
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> My directory structure is:
>
>     %TOMCAT_HOME%/webapps/core/
>             -->index.jsp
>             -->WEB-INF/classes/coreBeans/FormBean.class
>
> My context in 'server.xml' is:
>
>     <Context path="/core" docBase="core" debug="0" reloadable="true" />
>
> The (unmodified) virtual host is
>
>     <Host name="localhost" debug="0" appBase="webapps"
>        unpackWARs="true" autoDeploy="true">
>       <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
>                         append="true"  />
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>
>
>
>



--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message