OK, I am sorting my way through the minimalist documentation that comes with Tomcat 4.0, the JSP QuickStart Guide (
http://java.sun.com/products/jsp/html/jsptut.html)- which refers to Tomcat version 3.0, and the great tutorial at jsptut.com.
I have managed to run all the samples that come with Tomcat, I can run the samples that come with the Quickstart guide. I have even managed to follow through and write JSP code, based on the tuotrial at jsptut.com.
It is the JSP using Bean class that is giving me grief for almost one whole day.
I am using JDK 1.3.1, Tomcat 4.0.1 on a windows NT 4 PC.
I was running all the examples from the JSPTUT.com by placing them under the
tomcat_home/webapps/root folder , without any problem.
I created a bean class and placed the .java and the .class files under
tomcat_home/webapps/root/web_inf/classess folder,
but the compiler does not see the class.
Here is the error I get
Class org.apache.jsp.UserData not found.
After looking at the example from Sun's Quickstart, I changed the directory structure so that the .jsp and .html files are under
tomcat_home/webapps/mytutorial folder and the .java and .class files for the bean class are under
tomcat_home/webapps/mytutorial/web-inf/classes folder. No luck still. In fact I am not even able to bring up the html file. I get the famous 404 error.
So my questions are :
How can I set up another folder under tomcat_home/webapps to contain all the code I am writing?
Where should I place the bean class files so that the JSP compiler can see them ? I saw in some examples that included an applet, they had used the "codebase" attribute. Do I have to use something similar with bean classes as well?
Thanks