You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Diana Fu <di...@nexsi.com> on 2000/08/16 01:02:15 UTC
url mapping problem
i'm learning to run the hello app that was used in the "Developing
Application with Tomcat" doc,
and am running into url mapping problems.
in usr/tomcat/conf/tomcat.conf, i added:
ApJServMount /myapp /root
<Location /myapp/WEB-INF/ >
AllowOverride None
deny from all
</Location>
in usr/tomcat/conf/server.xml, i added:
<Context path="/myapp" docBase="webapps/myapp" debug="0"
reloadable="true">
</Context>
in usr/tomcat/webapps/myapp/WEB-INF/web.xml, i have:
<servlet>
<servlet-name>HelloServlet</servlet-name>
<servlet-class>Hello</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloServlet</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>
i can get to the servlet by going to
http://localhost/myapp/servlet/Hello as expected.
however, http://localhost/myapp/hello returns:
Not Found
The requested URL /myapp/hello was not found on this server.
it appears that the servlet url mapping isn't working. what did i do
wrong?
thanks,
diana
Re: url mapping problem
Posted by Diana Fu <di...@nexsi.com>.
from what i understand, port 8080 is for tomcat running stand-alone.
i want apache to pass the request on to tomcat via the standard httpd
port.
(and yes, what you proposed would work, but my problem is that
myapp/hello url mapping
doesn't work)
thanks.
Frank Applin wrote:
> Try http://localhost:8080/myapp/servlet/Hello and see if that helps.
>
> Frank
>
> ----- Original Message -----
> From: "Diana Fu" <di...@nexsi.com>
> To: <to...@jakarta.apache.org>
> Sent: Tuesday, August 15, 2000 6:02 PM
> Subject: url mapping problem
>
> > i'm learning to run the hello app that was used in the "Developing
> > Application with Tomcat" doc,
> > and am running into url mapping problems.
> >
> > in usr/tomcat/conf/tomcat.conf, i added:
> > ApJServMount /myapp /root
> > <Location /myapp/WEB-INF/ >
> > AllowOverride None
> > deny from all
> > </Location>
> >
> > in usr/tomcat/conf/server.xml, i added:
> > <Context path="/myapp" docBase="webapps/myapp" debug="0"
> > reloadable="true">
> > </Context>
> >
> > in usr/tomcat/webapps/myapp/WEB-INF/web.xml, i have:
> >
> > <servlet>
> > <servlet-name>HelloServlet</servlet-name>
> > <servlet-class>Hello</servlet-class>
> > </servlet>
> >
> > <servlet-mapping>
> > <servlet-name>HelloServlet</servlet-name>
> > <url-pattern>/hello</url-pattern>
> > </servlet-mapping>
> >
> > i can get to the servlet by going to
> > http://localhost/myapp/servlet/Hello as expected.
> > however, http://localhost/myapp/hello returns:
> > Not Found
> > The requested URL /myapp/hello was not found on this server.
> >
> > it appears that the servlet url mapping isn't working. what did i do
> > wrong?
> >
> > thanks,
> >
> > diana
> >