Stumped
Sorry there were several problems with the last post so i fixed it and reposted.
I have an issue. I am trying to deploy a Servlet using the Sysdeo Tomcat plugin for the latest release of Eclipse. I've followed the instructions from here but I'm having no luck. I can't access the servlet from my browser.
Solved it. The Problem was simple. I had to shutdown and restart Tomcat. Doh!
Here's the web.xml file:
Here's the context path from the server.xml file:
The directory structure is:
C:\eclipse\workspace\Test\WEB-INF\classes\test\TestServlet.class
I'm trying to access it via http://localhost:port/Test/TestServlet
Thanks for any help.
Solved it. The Problem was simple. I had to shutdown and restart Tomcat. Doh!
package test;
import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
public class TestServlet extends HttpServlet {
PrintWriter out = null;
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
out = response.getWriter();
out.println("");
out.println("");
out.println("My Butt");
out.println("");
out.println("");
}
}Here's the web.xml file:
<!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>TestServlet</servlet-name>
<servlet-class>TestServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>TestServlet</servlet-name>
<url-pattern>/TestServlet</url-pattern>
</servlet-mapping>
</web-app>
Here's the context path from the server.xml file:
<Context path="/Test" reloadable="true" docBase="C:\eclipse\workspace\Test" workDir="C:\eclipse\workspace\Test\work" />
The directory structure is:
C:\eclipse\workspace\Test\WEB-INF\classes\test\TestServlet.class
I'm trying to access it via http://localhost:port/Test/TestServlet
Thanks for any help.
