The reason is that the invoker servlet is not turned off for the examples. Okay? Check the code and the xml.

At 01:06 PM 11/28/2002 +0000, you wrote:
Well I also tried
http://localhost:8080/study/servlet/com.wrox.projsp.ch03.TestServlet

but the same whereas
http://localhost:8080/examples/servlet/com.wrox.projsp.ch03.TestServlet works


??

Thomas


-----Original Message-----
From: Collins, Jim [mailto:[EMAIL PROTECTED]]
Sent: 28 November 2002 13:04
To: 'Tomcat Users List'
Subject: RE: How to add a servlet to a new Webapp


I believe that servlet has been disabled by default in 4.1.12 for security
reasons. That is probably why you can't use:
http://localhost:8080/study/servlet/TestServlet

Jim

> -----Original Message-----
> From: Curley, Thomas [mailto:[EMAIL PROTECTED]]
> Sent: 28 November 2002 12:58
> To: [EMAIL PROTECTED]
> Subject: How to add a servlet to a new Webapp
>
>
> Hi All,
>
> Using Tomcat 4.1.12 on Win 2K
>
> I am getting a 404 error when I try to create a new webapp
> and add a very basic servlet.  The servlet works if I create
> the package structure within the examples WEB-INF/classes.
> Here are the steps:
>
> 1.    created webapps/study
> 2.    created
> .../study/WEB-INF/classes/com/wrox/projsp/ch03/TestServlet.jav
> a and compiled [ok]
> 3.    added the following line to server.xml after the
> examples </Context>
>
>               <Context path="/study" docBase="study" debug="0" >
>             </Context>
> 4.    just copied the examples web.xml to study/WEB-INF and
> added the following lines
>
>
>     <servlet>
>       <servlet-name>
>           TestServlet
>       </servlet-name>
>       <servlet-class>
>           com.wrox.projsp.ch03.TestServlet
>       </servlet-class>
>     </servlet>
>
>     <servlet-mapping>
>         <servlet-name>TestServlet</servlet-name>
>         <url-pattern>/TestServlet</url-pattern>
>     </servlet-mapping>
>
>
> 5.    restart tomcat
>
>
> RESULT - The requested resource (/study/servlet/TestServlet)
> is not available.
>
>
> Can anyone see what I am missing ?
>
>
>
> thanks
>
>
> Thomas
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>


PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.



--
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]>
Micael

-------------------------------------------------------

This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you


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

Reply via email to