tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: Context or Mapping problems Apache 2.2 +mod_JK+ Tomcat 5.5
Date Thu, 24 Jul 2008 18:53:23 GMT
Then you should have written your webapp so all the links are computed 
based on the webapp's context.  In jsps you can do this with:

${pageContext.request.contextPath}/webapp/relative/path.jsp

In servlets, you can use request.getContextPath() to get the context 
path and then append your path on to it..

With that strategy, at most you'd have to alter links in static html 
files if the webapp has any.

--David

kohanm wrote:
> The webaplication is done now, but my boss asked me to change the name
> of URL webapplication. IF I change the directory name than there are
> many jsp pages with many links  with old name's webapplication.
>
> On 7/24/08, Caldarale, Charles R <Chuck.Caldarale@unisys.com> wrote:
>   
>>> From: kohanm [mailto:kohan.massoud@gmail.com]
>>> Subject: Re: Context or Mapping problems Apache 2.2 +mod_JK+
>>> Tomcat 5.5
>>>
>>> I want to have a webapplication name /webaplicaiton/welcome.do
>>> different than the directory name (/webapps/booking).
>>>       
>> O.k., I'll bite: why?  That's now how Tomcat is designed to work.
>>
>>     
>>> My Tomcat works if the URL is the same as directory name(or.war file).
>>>       
>> Which is as exactly how it's supposed to work.  Just use one name, and don't make
things more complicated than they need to be.
>>
>>  - Chuck
>>
>>
>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL
and is thus 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message