I have been at this for several days now and frankly, it's driving me crazy that I can't seem to find a solution to it. I had this working a while back, but now that I need it working for an assignment at university it just won't run my servlets.
I'm using Jakarta Tomcat 5.5.7 and J2SE Development Kit 5.0.01. .jsp pages work fine, but the servlets I'm attempting to load just give me the error message;
The requested resource (/cc213/submit) is not available.
Of course, this made me think there was something wrong with where I was placing the servlet or how I was referencing it in web.xml, but I can't find the problem.
My web.xml contains the following;
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<servlet>
<servlet-name>submissionServlet</servlet-name>
<servlet-class>marks.Submit</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>submissionServlet</servlet-name>
<url-pattern>/cc213/submit</url-pattern>
</servlet-mapping>
</web-app>
My directory structure;
$Tomcat_home\webapps\cc213\ - contains .jsp files and .html files etc
$Tomcat_home\webapps\cc213\WEB-INF\web.xml
$Tomcat_home\webapps\cc213\WEB-INF\classes\marks\ - contians Submit.class and Submit.java
When trying to access this servlet I go to http://localhost:8080/cc213/index.jsp and submit a form there that has action="/cc213/submit". I've looked this over again and again and I can't find the error. It's probably some detail I've missed, but I've looked all over the net trying to find a solution and can't seem to find one. I'd really appreciate any help.
Regards,
Thor