Hi there.
I'm having some problems getting a test servlet to be recognised on my account - JSP is definitely working (tech support uploaded a test file that shows that), and resin is compiling the .class files from the .java files, but for the life of me I can't actually get the servlet to be recognised. This is my web.xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="
http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<!-- This is the test servlet -->
<servlet>
<servlet-name>myServlet</servlet-name>
<servlet-class>TestClass</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myServlet</servlet-name>
<url-pattern>/servlet/*.do</url-pattern>
</servlet-mapping>
<!-- New servlets after this -->
</web-app>
And the Java file I'm using is a modified version of one I found elsewhere on the forum:
import java.io.*;
import javax.servlet.http.*;
import javax.servlet.*;
public class TestClass extends HttpServlet {
public void doGet (HttpServletRequest req,
HttpServletResponse res)
throws ServletException, IOException
{
PrintWriter out = res.getWriter();
out.println("Hello, world!");
out.close();
}
}
I've tried accessing the servlet at a dozen addresses, but the one that I understand should work is:
http://www.monkeys-at-keyboards/servlet/myServlet.do... but nothing except a 'page not found' message.
I know I'm probably missing something frustratingly simple, but I just can't see what my problem is - any help would be hugely appreciated.
Thanks,
Drakkos