Re: Java/TomCat How to Configure a Servlet contextPath



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
.



Relevant Pages

  • RE: help
    ... Pls clear the CMOS and load setup default, then set the correct time in CMOS. ... >> You can refer this to the downloaded user manual. ...
    (microsoft.public.windowsxp.hardware)
  • RE: LNK2005 error
    ... Please refer to the following MSDN documentation: ... the "Failed to load" error may be caused by the IIS ... cannot find those shared MFC dlls. ...
    (microsoft.public.vc.ide_general)
  • how do I reinstall RAS
    ... Somehow the security / registry got corrupt and will not load. ... errors from system log are 20028 20037 20035 and all refer to reinstall RAS ...
    (microsoft.public.win2000.ras_routing)
  • Re: digital interface hell..
    ... What would "handling more of its own load in a DSP" refer to...? ...
    (rec.audio.pro)
  • Re: Scrolling problem on some sites
    ... do NOT load in SeaMonkey and most other browsers. ... [When you refer to OE, I suspect you meant to refer to IE...unless you might have configured OE to run in the Internet zone. ... OE runs in Restricted Sites zone and I would strongly advise that you keep it that way!] ...
    (microsoft.public.windows.inetexplorer.ie6.browser)