tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Best practice for generating URL's
Date Wed, 25 Aug 2004 14:45:11 GMT

Use relative URLs whenever possible, e.g. "../admin" or
"../someapp/admin" or just "admin/index.jsp" (if the admin virtual
directory is on the same level as the current page with the links.  In
the long-term, servers move, addresses can change, new servers come
around, etc, and so absolute links with hard-coded server addresses can
be a pain.  Note that none of this is specific to Tomcat or even to
JSP/servlets: this is basic web design.

Yoav Shapira
Millennium Research Informatics

>-----Original Message-----
>From: Antony Paul []
>Sent: Wednesday, August 25, 2004 10:43 AM
>To: Tomcat Users List
>Subject: Re: Best practice for generating URL's
>My scenario is
>Apache running at
>Tomcat running on
>In JSP how I have to create URL
><a href="admin/index.jsp">Home</a> is enough
><a href="">Home</a>
><a href="">Home</a>
>I will use some custom tag to generate the server portion.
>This application may be deployed with multiple Apache and Tomcat
>I have no experience in this kind of work.
>Antony Paul
>----- Original Message -----
>From: "Antony Paul" <>
>To: <>
>Sent: Tuesday, August 24, 2004 2:19 PM
>Subject: Best practice for generating URL's
>> Hi all,
>>     What is the best practice for generating URL's in
>> the application is behind a web server and both are run in different
>> machines. Some pages uses SSL. In one application I saw them using a
>> properties file and using a static method to get the proptocol,server
>> context portion. Is that really necessary ?. Or leaving links without
>> protocol,servername and context name.
>> My new scenario is this.
>> Apache on one machine with a domain name.
>> Tomcat in another machine(I think it needs to be because of expected
>> traffic)
>> It have some pages which must use SSL.
>> It is using Struts and how to manage links in struts-config.xml.
>> There will be lot of people who worked on this kind of scenario and I
>> them to help me.
>> rgds
>> Antony Paul
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

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

View raw message