There are a few things you need to make sure are in place to get the app off the ground.
Make sure the MYSQL database is set up.
Create a new context in Tomcat to run it under Tomcat. To do this, copy a folder called store into <TOMCAT_HOME>/webapps . You must fill out four key items on the Context Addition if you are using Tomcat's Administrator Web app:
Doc Base: javaforcf
Path : /javaforcf
Working Directory: work\Standalone\localhost\javaforcf
SessionID Initializer: org.apache.catalina.session.Standard-Manager
Then save and commit changes.
Restart Tomcat.
You must have the JSTL installed. Click taglibs and download the most recent stable version. I am using jakarta-taglibs-standard-1.0.zip . Extract it using zip or jar to your WEB-INF root in a folder called jstl10 . The web.xml file is included in the listings below.
Note
If you are modifying files and think that your changes are not being reflected, you may need to delete the generated servlet files in the work directory and then restart. This forces Tomcat to recreate the servlets.
If you want to manually set up Tomcat for a new Web application, then you can do so like this:
Edit tomcat4\conf\server.xml file. Under the manager entry (look for <!-- Tomcat Root Context --> ), add this entry:
<Context path="/store" docBase="store" debug="0" privileged="true"/>
Then, you need to write the following files into the directories as specified in the remainder of the chapter.
Top |