tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Bainbridge <ja...@jblinux.org>
Subject Re: Tomcat 4.1.24/Win2K - Servlet not found.
Date Wed, 25 Jun 2003 16:45:20 GMT
On Thu, 26 Jun 2003 00:37, Rohit Bapat wrote:
> <web-app>
> <servlet>
> <servlet-name>Testing</servlet-name>
> <servlet-class>****???***</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>****???***</servlet>
> <url-pattern>****???***</url-pattern>
> </servlet-mapping>
> </web-app>

/me wishes books and tutorials wouldn't assume the servlet invoker was 
enabled...
<web-app>
<servlet>
<servlet-name>Testing</servlet-name>
<servlet-class>TestingServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Testing</servlet>
<url-pattern>Testing</url-pattern>
</servlet-mapping>
<web-app>

http://localhost:8080/Testing

Although you might still get problems as your class should be in a package eg.

WEB-INF/
	/classes
		/com
			/mydomain
				/myapp
					TestingServlet.class

and you would have a 

package com.mydomain.myapp;

statement within your TestingServlet.java file then modify the web.xml to:

<web-app>
<servlet>
<servlet-name>Testing</servlet-name>
<servlet-class>com.mydomain.myapp.TestingServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Testing</servlet>
<url-pattern>Testing</url-pattern>
</servlet-mapping>
<web-app>

Regards,
-- 
Jason Bainbridge
http://jblinux.org

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message