tomcat-users mailing list archives

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

Hi,
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 [mailto:antonypaul24@hotmail.com]
>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 192.168.4.10
>Tomcat running on 192.168.4.60
>
>In JSP how I have to create URL
><a href="admin/index.jsp">Home</a> is enough
>OR
><a href="192.168.4.10/admin/index.jsp">Home</a>
>OR
><a href="192.168.4.60/admin/index.jsp">Home</a>
>
>I will use some custom tag to generate the server portion.
>
>This application may be deployed with multiple Apache and Tomcat
instances.
>I have no experience in this kind of work.
>
>rgds
>Antony Paul
>
>----- Original Message -----
>From: "Antony Paul" <antonypaul24@hotmail.com>
>To: <tomcat-user@jakarta.apache.org>
>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
JSP/struts-config
>when
>> 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
and
>> 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
>heavy
>> 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
>expect
>> them to help me.
>>
>> rgds
>> Antony Paul
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message