Two questions:
1. Where to define my own web application folder?
Tomcat 4.1.30 default application folder is /webapp/examples/, I found in /conf/server.xml :
<Host>
<Context path="/examples" docBase="examples" debug="0"
reloadable="true" crossContext="true"/>
</Host>
Can I just add my webapplication here inside the same <host> tag like
<Host ....>
<Context path="/examples" docBase="examples" debug="0"
reloadable="true" crossContext="true"/>
<Context path="/myappliction" docBase="myapplication" debug="0"
reloadable="true" crossContext="true"/>
</Host>
After I can put my stufll like
/webapp/myapplication/WEB-INF/classes/*.class
/webapp/myapplication/WEB-INF/jsp/*.jsp
/webapp/myapplication/WEB-INF/web.xml
2. I learn to edit /webapp/examples/WEB-INF/web.xml, replace the one with a simple version as the followings to
test. Not working when I try
http://localhost/examples/servlet/HelloServlet <?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>
<
servlet>
<servlet-name>HelloServlet</servlet-name>
<servlet-class>HelloServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloServlet</servlet-name>
<url-pattern>/HelloServlet</url-pattern>
</servlet-mapping>
<web-app>