Setting up a web app in Tomcat 4
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jon_Kurland
Posted On:   Monday, February 11, 2002 09:57 AM

I am new to using Tomcat and I am trying to set up a web application in tomcat. I am having trouble getting tomcat to see a javabean that I created. I have a directory webappsROOTwebapp that has all of the jsp files in it. I also have a directory webappsROOTwebappWEB-INFclasses where the javabean, TestBean, is placed. I have the package set to webapp within the bean. I can browse to all of the jsp pages but when I try to hit the javabean, I get the following error: type Exception report message Internal Server Error description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request. exception org.apache.jasp   More>>

I am new to using Tomcat and I am trying to set up a web application in tomcat. I am having trouble getting tomcat to see a javabean that I created. I have a directory webappsROOTwebapp that has all of the jsp files in it. I also have a directory webappsROOTwebappWEB-INFclasses where the javabean, TestBean, is placed. I have the package set to webapp within the bean. I can browse to all of the jsp pages but when I try to hit the javabean, I get the following error:



type Exception report


message Internal Server Error


description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.


exception


org.apache.jasper.JasperException: Unable to compile class for JSP


An error occurred at line: 6 in the jsp file: /webapp/checkresult.jsp


Generated servlet error:
D:Program FilesApache Tomcat 4.0worklocalhost\_webappcheckresult$jsp.java:67: Class webapp.TestBean not found.


webapp.TestBean SoapBean = null;


Any help would be greatly appreciated.

   <<Less

Re: Setting up a web app in Tomcat 4

Posted By:   Amine_Trabelsi  
Posted On:   Monday, February 11, 2002 10:20 AM

The solution is quite simple.
Try to create a sub-directory of webappWEB-INFclasses, example pck1. Then ensure that all your beans belong to pck1.
i.e alla the java code of the beans begin with : package pck1;


generally you have to work with packages instead of putting all your code together!! it's the same thing with the JSP and so on..


You should create a subdir to webapps also!!


Regards,

Zorgan
About | Sitemap | Contact