tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillermo Labatte <labat...@yahoo.com>
Subject Re: New ROOT
Date Tue, 22 Jan 2002 12:11:34 GMT
John Kolvereid wrote:

>Hi GL,
>    I tried it again.  This time it worked.  Now, instead of tricking Tom,
>how can I simply change the default directory from webapps/ROOT to (say)
>/home/httpd/jsp.  And then how can I address jsp files from non-jsp files.
>Do I have to
>        <a href=http://hostname/a.jsp:8080>
>
The URL should be http://hostname:8080/a.jsp

>
>And if so, how do I return.  Must I then
>        <a href=http://hostname/a.htm>
>Any thoughts.  Please advise.  Thanks.
>
That's right.

Now, I think it is better to maintain all content (static and non 
static) under the same roof (i.e. use the same URL space)

After all, you are building a web application. That application consists 
of dynamic content (.jsp, servlets) and static content (html, images). 
Why separate them? If you keep your application together it would be 
easier to manage it (backups, version control, relocation, etc.)

Tomcat can serve static content by itself, so you can put all .html and 
image files alongside your .jsp files. You can also instruct Tomcat to 
use the port 80. This would be the simplest setup and you would not have 
to worry about that :8080 in URLS. Here at work we use this setup for 
individual developer's PCs. So each developer has his own Tomcat server 
in his own PC.

We deploy our application in an intranet server. Since that server also 
uses Apache, there is a conflict with port 80. So we added another IP 
address to that server and make Apache use one of the IP, and Tomcat the 
other. So our webapp still uses port 80 and we do not have to worry 
about the URLs. This setup is still fairly simple.

If you cannot add a IP address to your server, or find Tomcat too slow 
for static content, you can still integrate Tomcat and Apache (using 
mod_jk), and make Apache serve the static content, and Tomcat the 
dynamic content using the same URL space. Since this setup proved to be 
cumbersome (at least for me) we sticked to the previous setup, since we 
did not encounter any performance problem serving our (relativelly 
small) static content with Tomcat.













--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message