Robert S. Sfeir wrote:
> Ok rookie question I perhaps and here it goes...  I'm trying to figure out a
> clean way of deploying my app so that no matter
> which app server I deploy it to 2 things happen:
>
> 1- The app is bound to a domain name of the user's choice, after they edit
> the appropriate descriptor when the war file expands of course.

As long as you only use relative URLs within the app (which is typically
the case), you shouldn't have to specify the domain name at all.

> 2- The app is bound to the 'root' of the domain name (i.e.
> http://domain.com/ and not http://domain.com/myapp) and not break other apps
> already running with their servlets perhaps pointing to the root also.

Unless I misunderstand what you mean, this is impossible; you can only
have one application per web application deployed as the "root"
application. A web application should be developed so that it works
no matter which context path (e.g. "/myapp" in your example) it's
deployed with. Again, relative URLs within the app is the way to
achieve this. In the few cases where you really need to use the
context path in a URL, you should add it dynamically (using the
request.getContextPath() method).

> I am trying to deploy using a war file, and would like for most of the
> settings to be in place for the end-user-admin to edit quickly in a couple
> of steps.  Don't want the /servlet name in there either.  Just as clean as
> can be.

You should use <servlet> and <servlet-mapping> elements in the web.xml
file to define the URLs used to invoke the servlets instead of using
"/servlet" as a prefix (it's not guaranteed by the spec to be supported
in all containers, even though most do).

> So my question is, is this something that is specific to every app server or
> is there something that I need to look at somewhere to get that info?  I
> can't seem to find anything in the web.xml dtd and I'm guessing at this
> point that this is app server specifc and that this type of info will reside
> in appserver-web.xml (i.e. orion-web.xml jboss-web.xml etc...)

As I hinted at above, if you develop the application correctly, it can
be deployed with any context path, leaving the decision in the hands
of the customer that installs the web app.

Anyway, how to deploy an application (as the "root" application, or
associated with a context path) is vendor-dependent. All containers
must accept a WAR file, but the exact procedure for how to deploy it
varies.

> Any clues would be helpful.  I'm using JSP 1.2 and Servlet 2.3 code base.

I hope the above helps. You may also want to read the servlet spec or
tutorial (that's where the web.xml file and WAR files are described), or
a JSP or servlet book that describes this in more detail.

Hans
--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com
JavaServer Pages        http://TheJSPBook.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to