jsp cannont find my bean class

2006-01-09 Thread marju jalloh
 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

2006-01-09 Thread Tim Funk

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jsp cannont find my bean class

2006-01-09 Thread Edoardo Panfili
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


-- 
[EMAIL PROTECTED]
AIM: edoardopn
Jabber: [EMAIL PROTECTED]
tel:075 9142766

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



Re: jsp cannont find my bean class

2006-01-09 Thread marju jalloh
I understand what you mean but where the jsp file should be

Edoardo Panfili [EMAIL PROTECTED] 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


-- 
[EMAIL PROTECTED]
AIM: edoardopn
Jabber: [EMAIL PROTECTED]
tel:075 9142766

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





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

RE: jsp cannont find my bean class

2006-01-09 Thread marju jalloh
I don`t know what is going wrong
  
  I place my compiled bean in mywabapps/WEF-INF/classes/com
  and my jsp file in mywebapps and my path is
  jsp:useBean id=stringBean class=com.mybean /
  
  when access I got two error
  1. 
  
javax.servlet.ServletException: com/mybean (wrong name: mybean
  2.   
java.lang.NoClassDefFoundError: com/mybean (wrong name: mybean)
  
  can someone help
  Thanks
Fredrik Rubensson [EMAIL PROTECTED] wrote:  Hi,

   Where to place the jsp file? 

It can be in any directory under you webapp. Typically you place it in
the root directory of your app. So if your app is called mygoodapp the
jsp can be placed in /webapps/mygoodapp/ or any
subdirectory. If it is called jsppage.jsp you can access it with
http://localhost:8080/mygoodapp/jsppage.jsp assuming that you have a
default installation of tomcat.

Regards,
Fredrik Rubensson

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




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: jsp cannont find my bean class

2006-01-09 Thread Dwayne A. Ghant

You got the right idea.

Now just place the bean  into  your mywabapps/WEF-INF/classes/com/mybean
directory and you should be fine.

Just to be safe make sure you JSP page recompiles.

marju jalloh wrote:


I don`t know what is going wrong
 
 I place my compiled bean in mywabapps/WEF-INF/classes/com

 and my jsp file in mywebapps and my path is
 jsp:useBean id=stringBean class=com.mybean /
 
 when access I got two error
 1. 
 
javax.servlet.ServletException: com/mybean (wrong name: mybean
 2.   
java.lang.NoClassDefFoundError: com/mybean (wrong name: mybean)
 
 can someone help

 Thanks
Fredrik Rubensson [EMAIL PROTECTED] wrote:  Hi,

 

 Where to place the jsp file? 
   



It can be in any directory under you webapp. Typically you place it in
the root directory of your app. So if your app is called mygoodapp the
jsp can be placed in /webapps/mygoodapp/ or any
subdirectory. If it is called jsppage.jsp you can access it with
http://localhost:8080/mygoodapp/jsppage.jsp assuming that you have a
default installation of tomcat.

Regards,
Fredrik Rubensson

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




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
 




--
Dwayne A. Ghant
Application Developer
Temple University
215.204.3467
[EMAIL PROTECTED]


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