Re: Java/TomCat How to Configure a Servlet contextPath
- From: Lew <lew@xxxxxxxxxxxxx>
- Date: Fri, 31 Oct 2008 11:12:15 -0700 (PDT)
Rich Morey wrote:
http://localhost/javaApp/TestClass/Action1
would load TestClass? Currently I get a 404 with the above URL. I
Read
<http://tomcat.apache.org/tomcat-6.0-doc/appdev/deployment.html>
It is highly unusual to refer to classes directly in the app URL.
Instead one refers to mappings to servlets (ideally JSPs in most
cases), which as Mark Space said are set in the web.xml.
In your example URL (aside: the words "Java" and "Class" in the URL
are bad practice), "javaApp" is the application context and
"TestClass" is the servlet or page identifier.
I'm not sure what you mean by the word "load" in "would load
TestClass?". "Loading a class" has a meaning different from
"displaying a page". What the URL does is identify to the app server
(e.g., Tomcat) what page you want to display, or alternatively, what
servlet you want to invoke. Loading a class is what Tomcat does, or
may do, as part of accessing the specified resource, but is by no
means what the URL signifies.
--
Lew
.
- Follow-Ups:
- Re: Java/TomCat How to Configure a Servlet contextPath
- From: Rich Morey
- Re: Java/TomCat How to Configure a Servlet contextPath
- References:
- Java/TomCat How to Configure a Servlet contextPath
- From: Rich Morey
- Re: Java/TomCat How to Configure a Servlet contextPath
- From: Mark Space
- Java/TomCat How to Configure a Servlet contextPath
- Prev by Date: Re: making swing application to launch from desktop
- Next by Date: Re: Is statement.executeBacth() a transaction?
- Previous by thread: Re: Java/TomCat How to Configure a Servlet contextPath
- Next by thread: Re: Java/TomCat How to Configure a Servlet contextPath
- Index(es):
Relevant Pages
|