Test servlet won't run - help?

2003-01-16 Thread Mark
Hi, 

I'm trying to run a simple Hello world servlet called myAppServlet.  I'm using Windows 
XP, Tomcat 4.1, and j2sdk 1.4.1.  The servlet WILL run when I put it in 
webapps/examples/WEB-INF/classes.  I can run it with the browser address, 
http://localhost:8080/examples/servlet/myAppServlet

However, the servlet will not run when I locate it in webapps/myApp/WEB-INF/classes.  
When I try to run it with the browser address, 
http://localhost:8080/myApp/servlet/myAppServlet, I get the HTTP Status 404 error 
message.

I put the following web.xml file into the webapps/myApp/WEB-INF folder, which didn't 
have any effect:

http://java.sun.com/dtd/web-app_2_3.dtd";>


  
myAppServlet
myAppServlet
  
  
myAppServlet
/myAppServlet
  


I also stopped and started the computer to make sure that Tomcat was stopped and 
started again.


It seems as though Tomcat is not seeing my myApp application.  Any help would be 
greatly appreciated.  Thanks in advance.

Mark Steere
[EMAIL PROTECTED]



Re: Test servlet won't run - help?

2003-01-16 Thread Erik Price
Try it from http://localhost:8080/myApp/myAppServlet

That might work -- your URL-mapping doesn't say to look for 
servlet/myAppServlet.


Erik




Mark wrote:
Hi, 

I'm trying to run a simple Hello world servlet called myAppServlet.  I'm using Windows XP, Tomcat 4.1, and j2sdk 1.4.1.  The servlet WILL run when I put it in webapps/examples/WEB-INF/classes.  I can run it with the browser address, http://localhost:8080/examples/servlet/myAppServlet

However, the servlet will not run when I locate it in webapps/myApp/WEB-INF/classes.  When I try to run it with the browser address, http://localhost:8080/myApp/servlet/myAppServlet, I get the HTTP Status 404 error message.

I put the following web.xml file into the webapps/myApp/WEB-INF folder, which didn't have any effect:


  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
  "http://java.sun.com/dtd/web-app_2_3.dtd";>


  
myAppServlet
myAppServlet
  
  
myAppServlet
/myAppServlet
  


I also stopped and started the computer to make sure that Tomcat was stopped and started again.


It seems as though Tomcat is not seeing my myApp application.  Any help would be greatly appreciated.  Thanks in advance.

Mark Steere
[EMAIL PROTECTED]



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




RE: Test servlet won't run - help?

2003-01-16 Thread Turner, John

Do you have a Context defined in server.xml for /myApp?  Check server.xml
for /examples to see what one looks like.  Or, check the docs for Context,
there is a way to auto-deploy Contexts so you don't have to edit server.xml
directly.

John


> -Original Message-
> From: Mark [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 16, 2003 12:36 PM
> To: Tomcat Users List
> Subject: Test servlet won't run - help?
> 
> 
> Hi, 
> 
> I'm trying to run a simple Hello world servlet called 
> myAppServlet.  I'm using Windows XP, Tomcat 4.1, and j2sdk 
> 1.4.1.  The servlet WILL run when I put it in 
> webapps/examples/WEB-INF/classes.  I can run it with the 
> browser address, http://localhost:8080/examples/servlet/myAppServlet
> 
> However, the servlet will not run when I locate it in 
> webapps/myApp/WEB-INF/classes.  When I try to run it with the 
> browser address, 
> http://localhost:8080/myApp/servlet/myAppServlet, I get the 
> HTTP Status 404 error message.
> 
> I put the following web.xml file into the 
> webapps/myApp/WEB-INF folder, which didn't have any effect:
> 
>PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>   "http://java.sun.com/dtd/web-app_2_3.dtd";>
> 
> 
>   
> myAppServlet
> myAppServlet
>   
>   
> myAppServlet
> /myAppServlet
>   
> 
> 
> I also stopped and started the computer to make sure that 
> Tomcat was stopped and started again.
> 
> 
> It seems as though Tomcat is not seeing my myApp application. 
>  Any help would be greatly appreciated.  Thanks in advance.
> 
> Mark Steere
> [EMAIL PROTECTED]
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Test servlet won't run - help?

2003-01-16 Thread Mark
Wow, thanks for the timely response.  That was right on the money.  I love
you guys.  Thanks Erik.

I will be unsubscribing now.  Thanks again.

Mark Steere
[EMAIL PROTECTED]


> Try it from http://localhost:8080/myApp/myAppServlet
>
> That might work -- your URL-mapping doesn't say to look for
> servlet/myAppServlet.
>
>
> Erik
>
>
>
>



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




RE: Test servlet won't run - help?

2003-01-16 Thread PELOQUIN,JEFFREY (HP-Boise,ex1)
As a side note.  

The reason it may have originally worked in the examples webapp is that the
default servlet mapping is explicitly defined.  For all other web apps it is
disabled.

If you place 


invoker
/servlet/*


in the web.xml file you should not need to include servlet in every mapping

-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 10:56 AM
To: Tomcat Users List
Subject: Re: Test servlet won't run - help?


Wow, thanks for the timely response.  That was right on the money.  I love
you guys.  Thanks Erik.

I will be unsubscribing now.  Thanks again.

Mark Steere
[EMAIL PROTECTED]


> Try it from http://localhost:8080/myApp/myAppServlet
>
> That might work -- your URL-mapping doesn't say to look for
> servlet/myAppServlet.
>
>
> Erik
>
>
>
>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>