You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by fretzlaff <fa...@neogrid.com.br> on 2006/05/17 20:58:24 UTC
Context Problem
I created a context for my webapp with a file named teste.xml under the
conf\Catalina\localhost with de content:
<Context patch="/test" docBase="D:/apps/test" reloadable="true"
crossContext="true" debug="3">
</Context>
In my app I have a jsp that calls the link /servlet/TestServlet that is
mapped in the web.xml:
<servlet>
<servlet-name>test.TestServlet</servlet-name>
<servlet-class>test.TestServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>test.TestServlet</servlet-name>
<url-pattern>/servlet/TestServlet</url-pattern>
</servlet-mapping>
The problem is that I catch an exception when I click this link: The
requested resource (/servlet/TestServlet) is not available.
The servlet was loaded whithin the context
(localhost:8080/test/servlet/TestServlet) but the jsp click doesn't consider
the context path and try to call the servlet at
localhost:8080/servlet/TestServlet.
Is something wrong in this configuration?
--
View this message in context: http://www.nabble.com/Context-Problem-t1638158.html#a4436889
Sent from the Tomcat - User forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Context Problem
Posted by Corobitsyn Roman <kr...@dtnm.ru>.
Hello fretzlaff,
See http://tomcat.apache.org/tomcat-5.5-doc/config/context.html for
atributes for container <Context>
You wrote <Context patch="/test" ...
must be <Context path="/test" ...
What is atribute "debug"? I did not found this in docs.
Also see tomcat's logs and output
f> I created a context for my webapp with a file named teste.xml under the
f> conf\Catalina\localhost with de content:
f> <Context patch="/test" docBase="D:/apps/test" reloadable="true"
f> crossContext="true" debug="3">
f> </Context>
f> In my app I have a jsp that calls the link /servlet/TestServlet that is
f> mapped in the web.xml:
f> <servlet>
f> <servlet-name>test.TestServlet</servlet-name>
f> <servlet-class>test.TestServlet</servlet-class>
f> </servlet>
f> <servlet-mapping>
f> <servlet-name>test.TestServlet</servlet-name>
f> <url-pattern>/servlet/TestServlet</url-pattern>
f> </servlet-mapping>
f> The problem is that I catch an exception when I click this link: The
f> requested resource (/servlet/TestServlet) is not available.
f> The servlet was loaded whithin the context
f> (localhost:8080/test/servlet/TestServlet) but the jsp click doesn't consider
f> the context path and try to call the servlet at
f> localhost:8080/servlet/TestServlet.
f> Is something wrong in this configuration?
f> --
f> View this message in context:
f> http://www.nabble.com/Context-Problem-t1638158.html#a4436889
f> Sent from the Tomcat - User forum at Nabble.com.
f> ---------------------------------------------------------------------
f> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
f> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org