Hello!
I try to access a self-written http-servlet named Seminar02.class.
I have created a new directory tree in the tomcat/webapps directory,
named Seminar. I have added /Seminar/Web-Inf/class directory and created
a web.xml-file in Web-Inf. I have put my class-file in the class directory.
Else i added following lines in server.xml in the tomcat-rootdirectory:
<!-- Tomcat Seminar Applikation Context -->
<Context path="/seminar" docBase="Seminar"
debug="0" reloadable="true"/>
I thought this should be enough to point my local tomcat installation to
the Seminar-directory, and if i try to access "localhost:8080/seminar" i
get the content of my Seminar-directory without the Web-Inf directory.
This is my web.xml file in the /Seminar/Web-Inf directory:
------------------------------------------------------------------------------------------
<?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>
<!-- General description of your web application -->
<display-name>Seminare02</display-name>
<description>
This is version 0.4 of an application to perform
wild jdbc-mysql tasks.
</description>
<context-param>
<param-name>webmaster</param-name>
<param-value>[EMAIL PROTECTED]</param-value>
<description>
The EMAIL address of the developer to whom questions
and comments about this application should be addressed.
</description>
</context-param>
<servlet>
<servlet-name>Seminar02</servlet-name>
<description>
This servlet plays the "controller" role
</description>
<servlet-class>Seminar02</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Seminar02</servlet-name>
<url-pattern>/Seminar/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Seminar02</servlet-name>
<url-pattern>/Seminar02</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Seminar02</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout> <!-- 30 minutes -->
</session-config>
</web-app>
------------------------------------------------------------
As you can see i have tried several servlet-mappings - but none of these
seem to take effect: every time i try to access this servlet via
"localhost:8080/seminar/Seminar02" or something close to this ending i
get the tomcat-error-html-output:
The requested resource (/Seminar02) is not available.
I verify that my servlet is working by using the examples-directory,
where i added the same servlet-description and -mapping to the
web.xml-file - and there my servlet is accessible and fine working.
I expect myself to have a lack of understanding the xml-configuration of
tomcat-web-applications. But i'm stuck:
I'm looking for help since weeks. Perhaps i got to an end with my search? ;)
If there is an archive of this list with postings covering these
problems, please let me know.
Ah, some more info you need perhaps about my system-config:
I'm running tomcat-4.0.1 on a win98-machine with a JSDK1.3 (where all
these problems occur in the way i desribed them here - i tried these
things also on a winnt and a win2k machine, and there i meet much more
problems regarding the work of the mm.mysqldriver in my application)
Thanks for any help!
Fabian Sommer
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>