You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Hoi Fai Leung <ch...@usa.net> on 2000/07/27 22:52:14 UTC

Re: [Change /test/servlet/HelloWorld to /test/HelloWorld]

I would like to see the solution to this too.  I have tried to play around in
the web.xml file with no success.  What I did is this:

If I have a myServlet.class in, say, the context, examples, I can excess to it
by:
http://[IP address]/examples/servlet/myServlet


<servlet>
  <servlet-name>myServlet</servlet-name>
  <servlet-class>MyServletName</servlet-class>
</servlet>


Now I can access to it by:
http://[IP address]/examples/servlet/MyServletName

<servlet-mapping>
<servlet-name>MyServletName</servlet-name>
<url-pattern>/MyServletName</url-pattern>
</servlet>

Now, I think I should be able to access to it by:
http://[IP address]/examples/MyServletName

However, this last step doesn't work.  Am I doing anything wrong?  I am using
win98, apache 1.3.12, with release vision of tomcat 3.1.

Thanks,
Hoi


Ravindra Wankar <rw...@iname.com> wrote:
> 
> I am able to access a HelloWorld servlet via the URL
> 
> http://localhost/test/servlet/HelloWorld
> 
> What do I need to change for http://localhost/test/HelloWorld (without
> the /servlet/) to work?
> 
> Thanks
> -- Ravi.


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

Re: [Change /test/servlet/HelloWorld to /test/HelloWorld]

Posted by Jeremy Linzer <jl...@alabanza.com>.
check your case. One time you have myServlet and another time MyServlet

Hoi Fai Leung wrote:

> I would like to see the solution to this too.  I have tried to play around in
> the web.xml file with no success.  What I did is this:
>
> If I have a myServlet.class in, say, the context, examples, I can excess to it
> by:
> http://[IP address]/examples/servlet/myServlet
>
> <servlet>
>   <servlet-name>myServlet</servlet-name>
>   <servlet-class>MyServletName</servlet-class>
> </servlet>
>
> Now I can access to it by:
> http://[IP address]/examples/servlet/MyServletName
>
> <servlet-mapping>
> <servlet-name>MyServletName</servlet-name>
> <url-pattern>/MyServletName</url-pattern>
> </servlet>
>
> Now, I think I should be able to access to it by:
> http://[IP address]/examples/MyServletName
>
> However, this last step doesn't work.  Am I doing anything wrong?  I am using
> win98, apache 1.3.12, with release vision of tomcat 3.1.
>
> Thanks,
> Hoi
>
> Ravindra Wankar <rw...@iname.com> wrote:
> >
> > I am able to access a HelloWorld servlet via the URL
> >
> > http://localhost/test/servlet/HelloWorld
> >
> > What do I need to change for http://localhost/test/HelloWorld (without
> > the /servlet/) to work?
> >
> > Thanks
> > -- Ravi.
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1