tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <>
Subject RE: Subdomains and Wars...
Date Thu, 22 Oct 2009 00:36:13 GMT
> From: Tony Anecito []
> Subject: RE: Subdomains and Wars...
> I would have agreed if not for an admin asking about what if a file
> like a jpg was deployed via a war?

It makes no difference.

> I would say the developer should not have static content delivered 
> via war to a app server but that is the way some dev groups deliver
> content.

??? Why not include the related static content with the webapp?  Doing otherwise makes deployment
much more complicated.  Just because a resource is static doesn't mean it won't change from
one release to another.  Bundle it all together; the servlet spec encourages self-contained

> With that in mind how would you expect the content for the http feature
> of Tomcat or even APR to be deployed?

Again, using what you call "subdomains" (it's really aliases) is irrelevant to the server.
 As long as the DNS entries exist to route all the aliases to the same server, and *your*
webapp uses the aliases in the proper places, nothing is required of the server.

For example, if you have a web page named index.html from the default webapp at,
and that page has some images and a style sheet, and you have DNS entries for,, and that all lead to the same server, you can do the following:

1) deploy your webapp as ROOT.war under the default <Host> appBase directory

2) put index.html in the base directory of ROOT.war

3) put the images wherever you want within the ROOT.war, base directory or somewhere else

4) put the style sheet wherever you want within the ROOT.war

(For the sake of discussion, we'll just leave all this in the base directory.)

5) in the index.html file, put the links to the images as*.jpg,
where the asterisk is the image number

6) in the index.html file, put the link to the style sheet as

Magically, the browser will initiate concurrent requests for multiple images and the style
sheet, simply because the host names *appear* to be for different servers.  Really, there's
no magic here - it's all just tricking the browser into ignoring the RFC-recommended limit
of two simultaneous connections to a given host.

And again, there's no server configuration required.

 - Chuck

for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message