You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by marju jalloh <ja...@yahoo.com> on 2006/01/09 14:44:13 UTC

jsp cannont find my bean class

 Hi everyone
  I`m using Tomcat 4.1.* on Linux .All my servlet and jsp work fine including the interaction with mysql database.
  
  Now I want to test a simple Bean but my jsp cannont find the Bean.
  Where to place the jsp file?
  How to direct the jsp file where to find the bean?
    <jsp:useBean id="stringBean" class="Hello" />
  I used this but it did not find the bean
  
  Can anyone help
  
  Thanks in advance
  
  
  

		
---------------------------------
Yahoo! Photos – Showcase holiday pictures in hardcover
 Photo Books. You design it and we’ll bind it!

Re: jsp cannont find my bean class

Posted by marju jalloh <ja...@yahoo.com>.
I understand what you mean but where the jsp file should be

Edoardo Panfili <ed...@aspix.it> wrote:  marju jalloh ha scritto:
>  Hi everyone
>   I`m using Tomcat 4.1.* on Linux .All my servlet and jsp work fine including the interaction with mysql database.
>   
>   Now I want to test a simple Bean but my jsp cannont find the Bean.
>   Where to place the jsp file?
>   How to direct the jsp file where to find the bean?
>     
>   I used this but it did not find the bean
I am using 5.x and I have no problem with the beans.

Put the class in WEB-INF/classes
if the fully qualified name is com.try.Bean
put it in WEB-INF/classes/com/try/

then in JSP use


it works for me
Edoardo


-- 
edoardo@aspix.it
AIM: edoardopn
Jabber: edoardopa@talk.google.com
tel:075 9142766

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org




		
---------------------------------
Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.

Re: jsp cannont find my bean class

Posted by Edoardo Panfili <ed...@aspix.it>.
marju jalloh ha scritto:
>  Hi everyone
>   I`m using Tomcat 4.1.* on Linux .All my servlet and jsp work fine including the interaction with mysql database.
>   
>   Now I want to test a simple Bean but my jsp cannont find the Bean.
>   Where to place the jsp file?
>   How to direct the jsp file where to find the bean?
>     <jsp:useBean id="stringBean" class="Hello" />
>   I used this but it did not find the bean
I am using 5.x and I have no problem with the beans.

Put the class in WEB-INF/classes
if the fully qualified name is com.try.Bean
put it in WEB-INF/classes/com/try/

then in JSP use
<jsp:useBean id="stringBean" class="com.try.Bean" />

it works for me
Edoardo


-- 
edoardo@aspix.it
AIM: edoardopn
Jabber: edoardopa@talk.google.com
tel:075 9142766

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: jsp cannont find my bean class

Posted by Tim Funk <fu...@joedog.org>.
http://tomcat.apache.org/faq/classnotfound.html

See  "Don't use  packageless classes and declare all imported classes"

-Tim

marju jalloh wrote:
>  Hi everyone
>   I`m using Tomcat 4.1.* on Linux .All my servlet and jsp work fine including the interaction with mysql database.
>   
>   Now I want to test a simple Bean but my jsp cannont find the Bean.
>   Where to place the jsp file?
>   How to direct the jsp file where to find the bean?
>     <jsp:useBean id="stringBean" class="Hello" />
>   I used this but it did not find the bean
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org