tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Marnell <jlm...@yahoo.com>
Subject Cannot run my first servlet
Date Wed, 28 Aug 2002 13:14:25 GMT

I give up - I hope someone can look over the setup and tell me what's wrong. I'm getting the
404 resource not available when I try to invoke the servlet from action statement of form.
I'm concerned that I don't have the servlet URI correct on the action statement.

[root@redfish jmarnell]# pwd
/usr/local/src/jakarta-tomcat-4.0.4/webapps/jmarnell
[root@redfish jmarnell]# ls -F
form1.html  WEB-INF/
[root@redfish jmarnell]# ls -F WEB-INF
classes/  src/  web.xml
[root@redfish jmarnell]# more WEB-INF/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>
   <display-name>Form1 application</display-name>
   <description>process a form's input</description>
   <servlet>
      <servlet-name>Form1</servlet-name>
      <servlet-class>Form1</servlet-class>
   </servlet>
   <servlet-mapping>
      <servlet-name>Form1</servlet-name>
      <url-pattern>/Form1</url-pattern>
   </servlet-mapping>
</web-app>
[root@redfish jmarnell]# ls WEB-INF/classes
Form1.class
[root@redfish jmarnell]# more form1.html
<html><title>form1</title><body>
<form method=post action="/Form1">
Enter your message below.<br><br>
<textarea name=message></textarea><br><br>
<input type=submit value="Send it"></form>
</html>
[root@redfish jmarnell]# 
 

Let me know if you need more info and thanks.

 



---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message