Have you tried to use the build script, and build.xml? This will prepare
your webapps directory properly, put the class files in the correct
(expected) place, and you don't need to screw around with the CLASSPATH.
Makes life simpler: after the preparation outlined below, you just
execute "# ./build" from your app development directory after making any
changes. Craig McC., bless his heart, described this in some doc that
comes with Tomcat (I seem to recall).

Eg,
0. # export TOMCAT_HOME=/path_to_tomcat
1. # cd /home/brandon
2. # mkdir test
3. # cd test
4. # mkdir src lib etc web
5. # mkdir src/mypackage
6. # cp InfoBean.java src/mypackage/.
7. # cp build .
8. # cp build.xml .
9. now edit the appropriate lines in build.xml to read:
<project name="test" default="compile" basedir=".">
<property name="app.name" value="test" />
<property name="deploy.home" value="${tomcat.home}/webapps/${app.name}"
/>
10. now edit your jsp file:
<jsp:useBean id="sessionBean" scope="session" class="mypackage.InfoBean"
/>
11. # ./build
12. # cd $TOMCAT_HOME/bin
13. # ./startup.sh




Reply via email to