[Configuring Java-enabled WEB Server (Tomcat)]
Add a new Virtual Host to Tomcat. Edit server.xml and add a new context:
<Context
className="org.apache.catalina.core.StandardContext"
crossContext="false"
reloadable="true"
mapperClass="org.apache.catalina.core.StandardContextMapper"
useNaming="true"
debug="0"
swallowOutput="false"
privileged="false"
displayName="Welcome to Tomcat"
wrapperClass="org.apache.catalina.core.StandardWrapper"
docBase="C:\tutorial"
cookies="true" path="/tutorial"
cachingAllowed="false"
charsetMapperClass="org.apache.catalina.util.CharsetMapper">
</Context>
Also edit web.xml. Add the description of the main servlet.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>persistence </display-name>
<description>
persistence
</description>
<servlet>
<servlet-name>main</servlet-name>
<servlet-class>com.jslope.forms.MainServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>main</servlet-name>
<url-pattern>/main</url-pattern>
</servlet-mapping>
</web-app>
If you will use HSQLDB as SQL Server - copy hsqldb.jar to $CATALINA_HOME/common/lib, where $CATALINA_HOME is is the root of the Tomcat installation directory.
For more details visit www.apache.org
Previous page
Tree of contents
Next page