tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Goyer" <mgo...@uwaterloo.ca>
Subject Can't install servlets?
Date Wed, 14 May 2003 02:17:12 GMT
Have I gone crazy? I'm using Tomcat 4.1.24 and can't install any
servlets (though the default examples work).

Here is my HelloWorld test that doesn't work:

Web.xml:

<!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>HelloWorld</servlet-name>
	
<servlet-class>com.transpose.erecs.servlets.HelloWorld</servlet-class>
	</servlet>
</web-app

HelloWorld.java:

package com.transpose.erecs.servlets;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

public class HelloWorld
	extends HttpServlet
{

	public void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
		doPost(request, response);
	}

	public void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
		PrintWriter out;
		response.setContentType("text/html");
		out = response.getWriter();
		out.println("HelloWrold");
	}

But yet I'm getting nothing at
http://localhost:8080/erecs/servlet/HelloWorld. I also don't see
anything weird in the log files.

Thanks,
Matt


---------------------------------------------------------------------
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