You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jim Marnell <jl...@yahoo.com> on 2002/08/28 15:14:25 UTC

Cannot run my first servlet

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

RE: Cannot run my first servlet

Posted by "Sexton, George" <gs...@mhsoftware.com>.
You are trying to use mod_webapp, and you don't have the warp connector
enabled properly.

-----Original Message-----
From: Jim Marnell [mailto:jlmswf@yahoo.com]
Sent: 28 August, 2002 8:15 AM
To: Tomcat Users List
Subject: RE: Cannot run my first servlet



A thousand thanks - it's working. On another note - I noticed the following.
I wonder if it's a real problem or maybe just complaining that I don't have
mod_jk installed - any ideas?
[root@redfish logs]# more apache_log.2002-08-26.txt
2002-08-26 12:12:52 [org.apache.catalina.connector.warp.WarpConnector] Error
acc
epting requests
java.net.SocketException: Socket closed
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:343)
        at java.net.ServerSocket.implAccept(ServerSocket.java:438)
        at java.net.ServerSocket.accept(ServerSocket.java:409)
        at
org.apache.catalina.connector.warp.WarpConnector.run(WarpConnector.ja
va:590)
        at java.lang.Thread.run(Thread.java:536)
Thanks again..jim
 "Sexton, George" wrote:try: /servlet/Form1" method=post>

-----Original Message-----
From: Jim Marnell [mailto:jlmswf@yahoo.com]
Sent: 28 August, 2002 7:14 AM
To: tomcat-user@jakarta.apache.org
Subject: Cannot run my first servlet



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
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">


Form1 application
process a form's input

Form1
Form1


Form1
/Form1


[root@redfish jmarnell]# ls WEB-INF/classes
Form1.class
[root@redfish jmarnell]# more form1.html


Enter your message below.





 [input]

[root@redfish jmarnell]#


Let me know if you need more info and thanks.





---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes


--
To unsubscribe, e-mail:
For additional commands, e-mail:



---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Cannot run my first servlet

Posted by Jim Marnell <jl...@yahoo.com>.
A thousand thanks - it's working. On another note - I noticed the following. I wonder if it's a real problem or maybe just complaining that I don't have mod_jk installed - any ideas?
[root@redfish logs]# more apache_log.2002-08-26.txt
2002-08-26 12:12:52 [org.apache.catalina.connector.warp.WarpConnector] Error acc
epting requests
java.net.SocketException: Socket closed
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:343)
        at java.net.ServerSocket.implAccept(ServerSocket.java:438)
        at java.net.ServerSocket.accept(ServerSocket.java:409)
        at org.apache.catalina.connector.warp.WarpConnector.run(WarpConnector.ja
va:590)
        at java.lang.Thread.run(Thread.java:536)
Thanks again..jim
 "Sexton, George" wrote:try: /servlet/Form1" method=post>

-----Original Message-----
From: Jim Marnell [mailto:jlmswf@yahoo.com]
Sent: 28 August, 2002 7:14 AM
To: tomcat-user@jakarta.apache.org
Subject: Cannot run my first servlet



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
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">


Form1 application
process a form's input

Form1
Form1


Form1
/Form1


[root@redfish jmarnell]# ls WEB-INF/classes
Form1.class
[root@redfish jmarnell]# more form1.html


Enter your message below.





 [input] 

[root@redfish jmarnell]#


Let me know if you need more info and thanks.





---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes

RE: Cannot run my first servlet

Posted by "Sexton, George" <gs...@mhsoftware.com>.
try: <form method=post action="/<context>/servlet/Form1">

-----Original Message-----
From: Jim Marnell [mailto:jlmswf@yahoo.com]
Sent: 28 August, 2002 7:14 AM
To: tomcat-user@jakarta.apache.org
Subject: Cannot run my first servlet



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


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>