Re: Java/TomCat How to Configure a Servlet contextPath
- From: Rich Morey <richard.morey@xxxxxxxxx>
- Date: Fri, 31 Oct 2008 11:23:47 -0700 (PDT)
Hi --
Thank you both for your quick replies.
In your example URL (aside: the words "Java" and "Class" in the URL
are bad practice), "javaApp" is the application context and
I am aware of this. I just did that for my own learning curve.
This is correct. However, if your web.xml file isn't set correctly,
this won't load. Want did you do to configure the web.xml? Can you show us?
I should say that I am just learning Java & Tomcat at this point. My
web development experience prior to this was with Delphi. When
building a Delphi web app a URL would look something like this:
http://host/library.dll/action?
In this case, the "library.dll" file could/would contain multiple
"actions" that could be invoked like this:
http://host/library.dll/action1?
http://host/library.dll/action2?
etc. This would allow me to develop related functionality within a
single library. For example, I recently completed a payment processing
DLL for a client. In this case the URLs were something like this:
http://host/payment.dll/Cash?
http://host/payment.dll/Check?
http://host/payment.dll/CreditCard?
Each action, in this case "Cash", "Check", "CreditCard" was invoked
from within the single library, "payment.dll". I would like to
replicate this kind of configuration within Java, mostly because this
has been the methodology I have used in the past and so I "think"
along these lines.
Thanks
Rich
"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: Juha Laiho
- Re: Java/TomCat How to Configure a Servlet contextPath
- From: Mark Space
- Re: Java/TomCat How to Configure a Servlet contextPath
- From: Lew
- Re: Java/TomCat How to Configure a Servlet contextPath
- From: Owen Jacobson
- 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
- Re: Java/TomCat How to Configure a Servlet contextPath
- From: Lew
- Java/TomCat How to Configure a Servlet contextPath
- Prev by Date: Re: Is statement.executeBacth() a transaction?
- Next by Date: Re: 7.0 wishlist?
- 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
|