You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chris Ward <cw...@go-integral.com> on 2001/02/06 20:18:04 UTC

to switch contexts, do you have to change all your JSP URL's?

Is there a way to code the URL's in the JSP pages so that they don't care
what the context is? If I have contexts for webapps/foo1 and webapps/foo2,
how do I write the URL's so that I don't have to change the URL from
"foo1/myservlet" to "foo2/servlet" if I change the context that it is run
from, or want to have both running?

Chris

----------------------------------
Chris Ward - Developer
@ integral business solutions
tel: 651.631.3144
fax: 651.631.2544
email: cward@go-integral.com
web: www.go-integral.com


RE: to switch contexts, do you have to change all your JSP URL's?

Posted by Chris Ward <cw...@go-integral.com>.
Is that the only way? I understand how that would be implemented, but I have
inherited an application that was not set up that way, and would require a
fix on every JSP and servlet.

Chris

-----Original Message-----
From: CPC Livelink Admin [mailto:cpclvlnk@fitzpatrick.cc]
Sent: Tuesday, February 06, 2001 1:32 PM
To: tomcat-user@jakarta.apache.org
Subject: RE: to switch contexts, do you have to change all your JSP
URL's?



HttpRequest.getContextPath() returns the  portion of the request URI that
indicates the context of the request.

-----Original Message-----
From: John Golubenko [mailto:golubenkoj@columbiafunds.com]
Sent: Tuesday, February 06, 2001 2:26 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: to switch contexts, do you have to change all your JSP
URL's?


<%= request.getRequestURI() %> will return current URL.



>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 2/6/01, 11:18:04 AM, "Chris Ward" <cw...@go-integral.com> wrote
regarding to switch contexts, do you have to change all your JSP URL's?:


> Is there a way to code the URL's in the JSP pages so that they don't care
> what the context is? If I have contexts for webapps/foo1 and
webapps/foo2,
> how do I write the URL's so that I don't have to change the URL from
> "foo1/myservlet" to "foo2/servlet" if I change the context that it is run
> from, or want to have both running?

> Chris

> ----------------------------------
> Chris Ward - Developer
> @ integral business solutions
> tel: 651.631.3144
> fax: 651.631.2544
> email: cward@go-integral.com
> web: www.go-integral.com


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org

NOTICE:  This communication may contain confidential or other privileged
information.  If you are not the intended recipient, or believe that you
have received this communication in error, please do not print, copy,
retransmit, disseminate, or otherwise use the information.  Also, please
indicate to the sender that you have received this email in error, and
delete the copy you received.  Any communication that does not relate to
official Columbia business is that of the sender and is neither given nor
endorsed by Columbia.  Thank you.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org


RE: to switch contexts, do you have to change all your JSP URL's?

Posted by CPC Livelink Admin <cp...@fitzpatrick.cc>.
HttpRequest.getContextPath() returns the  portion of the request URI that
indicates the context of the request.

-----Original Message-----
From: John Golubenko [mailto:golubenkoj@columbiafunds.com]
Sent: Tuesday, February 06, 2001 2:26 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: to switch contexts, do you have to change all your JSP
URL's?


<%= request.getRequestURI() %> will return current URL.



>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 2/6/01, 11:18:04 AM, "Chris Ward" <cw...@go-integral.com> wrote
regarding to switch contexts, do you have to change all your JSP URL's?:


> Is there a way to code the URL's in the JSP pages so that they don't care
> what the context is? If I have contexts for webapps/foo1 and
webapps/foo2,
> how do I write the URL's so that I don't have to change the URL from
> "foo1/myservlet" to "foo2/servlet" if I change the context that it is run
> from, or want to have both running?

> Chris

> ----------------------------------
> Chris Ward - Developer
> @ integral business solutions
> tel: 651.631.3144
> fax: 651.631.2544
> email: cward@go-integral.com
> web: www.go-integral.com


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org

NOTICE:  This communication may contain confidential or other privileged
information.  If you are not the intended recipient, or believe that you
have received this communication in error, please do not print, copy,
retransmit, disseminate, or otherwise use the information.  Also, please
indicate to the sender that you have received this email in error, and
delete the copy you received.  Any communication that does not relate to
official Columbia business is that of the sender and is neither given nor
endorsed by Columbia.  Thank you.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org



Re: to switch contexts, do you have to change all your JSP URL's?

Posted by John Golubenko <go...@columbiafunds.com>.
<%= request.getRequestURI() %> will return current URL.



>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 2/6/01, 11:18:04 AM, "Chris Ward" <cw...@go-integral.com> wrote 
regarding to switch contexts, do you have to change all your JSP URL's?:


> Is there a way to code the URL's in the JSP pages so that they don't care
> what the context is? If I have contexts for webapps/foo1 and 
webapps/foo2,
> how do I write the URL's so that I don't have to change the URL from
> "foo1/myservlet" to "foo2/servlet" if I change the context that it is run
> from, or want to have both running?

> Chris

> ----------------------------------
> Chris Ward - Developer
> @ integral business solutions
> tel: 651.631.3144
> fax: 651.631.2544
> email: cward@go-integral.com
> web: www.go-integral.com


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org

NOTICE:  This communication may contain confidential or other privileged information.  If you are not the intended recipient, or believe that you have received this communication in error, please do not print, copy, retransmit, disseminate, or otherwise use the information.  Also, please indicate to the sender that you have received this email in error, and delete the copy you received.  Any communication that does not relate to official Columbia business is that of the sender and is neither given nor endorsed by Columbia.  Thank you.