Re: How to redirect URLs

2006-07-18 Thread Martin Gainty
Assuming your workers.properties have enabled forwardAll = true (that is the 
Apache workers say all requests go to Tomcat)
http://tomcat.apache.org/tomcat-4.0-doc/config/ajp.html

From Tomcat
Create a request dispatcher using a path calculated as follows: {ServletPath} + 
/ + {ServletSelector} + {PathRemainder} 

2 avenues
1)RequestDispatcher.forward() will forward the request to the constructed 
ServletPath/ServletSelector/PathRemainder or
2)jsp:forward
http://java.sun.com/products/jsp/tags/11/syntaxref11.fm9.html
whereas the URL can be either absolute ot relative to current JSP

Be mindful that 
The request and the response objects come from the original Servlet's service 
method and forwards are routed before any response is provided,
http://java.sun.com/j2ee/sdk_1.2.1/techdocs/api/javax/servlet/RequestDispatcher.html#forward(javax.servlet.ServletRequest,%20javax.servlet.ServletResponse)

HTH,
Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: Nilesh Shastrakar [EMAIL PROTECTED]
To: 'Tomcat Users List' users@tomcat.apache.org; 'Martin Gainty' [EMAIL 
PROTECTED]
Sent: Tuesday, July 18, 2006 12:21 AM
Subject: RE: How to redirect URLs


 Thnaks for help,
 
 But where do I specify forward for /test/JSP/ondemand/rdtest/login.jsp
 
 If someone type the url www.abc.com/forward it should redierct to above jsp.
 
 Regards
 Nilesh,
 -Original Message-
 From: Martin Gainty [mailto:[EMAIL PROTECTED] 
 Sent: Monday, July 17, 2006 7:31 PM
 To: Tomcat Users List
 Subject: Re: How to redirect URLs
 
 I would suggest in the forward webapp web.xml that you update the
 welcome-file-list to point to your jsp
 e.g.
 web.xml contents of www.abc.com (forward webapp)
 
 welcome-file-list
  welcome-file/test/JSP/ondemand/rdtest/login.jsp/welcome-file
 /welcome-file-list
 
 M-
 *
 This email message and any files transmitted with it contain confidential
 information intended only for the person(s) to whom this email message is
 addressed.  If you have received this email message in error, please notify
 the sender immediately by telephone or email and destroy the original
 message without making a copy.  Thank you.
 
 
 
 - Original Message - 
 From: Nilesh Shastrakar [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Sent: Monday, July 17, 2006 8:59 AM
 Subject: How to redirect URLs 
 
 
 Dear All,
 
 
 
 I have setup the Tomcat sever and Application, its working fine..
 
 but I got the long URL now I want to make it short
 
 Ex : 
 
 
 
 http://www.abc.om/test/JSP/ondemand/rdtest/login.jsp
 
 
 
 I want www.abc.com/forward  if  someone  types this URL in browser the
 site
 should 
 
 Redirect to above URL.
 
 
 
 Could anyone please help me how to do it in Tomcat?
 
 
 
 Regards
 
 Nilesh.
 
 
 
 
 

 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


RE: How to redirect URLs

2006-07-18 Thread Propes, Barry L
usually within a request dispatcher object within the servlet.

-Original Message-
From: Nilesh Shastrakar [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 11:21 PM
To: 'Tomcat Users List'; 'Martin Gainty'
Subject: RE: How to redirect URLs


Thnaks for help,

But where do I specify forward for /test/JSP/ondemand/rdtest/login.jsp

If someone type the url www.abc.com/forward it should redierct to above jsp.

Regards
Nilesh,
-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 7:31 PM
To: Tomcat Users List
Subject: Re: How to redirect URLs

I would suggest in the forward webapp web.xml that you update the
welcome-file-list to point to your jsp
e.g.
web.xml contents of www.abc.com (forward webapp)

welcome-file-list
  welcome-file/test/JSP/ondemand/rdtest/login.jsp/welcome-file
/welcome-file-list

M-
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: Nilesh Shastrakar [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Monday, July 17, 2006 8:59 AM
Subject: How to redirect URLs 


 Dear All,
 
 
 
 I have setup the Tomcat sever and Application, its working fine..
 
 but I got the long URL now I want to make it short
 
 Ex : 
 
 
 
 http://www.abc.om/test/JSP/ondemand/rdtest/login.jsp
 
 
 
 I want www.abc.com/forward  if  someone  types this URL in browser the
site
 should 
 
 Redirect to above URL.
 
 
 
 Could anyone please help me how to do it in Tomcat?
 
 
 
 Regards
 
 Nilesh.
 
 
 
 
 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to redirect URLs

2006-07-17 Thread Barrie Selack
I've been using this Url Rewrite Filter for several years now.. and it's
actively developed with new features.

http://tuckey.org/urlrewrite/

Regards,
Barrie


Dear All,

 

I have setup the Tomcat sever and Application, its working fine..

but I got the long URL now I want to make it short

Ex : 

 

http://www.abc.om/test/JSP/ondemand/rdtest/login.jsp

 

I want www.abc.com/forward  if  someone  types this URL in browser the site
should 

Redirect to above URL.

 

Could anyone please help me how to do it in Tomcat?

 

Regards

Nilesh.

 

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to redirect URLs

2006-07-17 Thread Martin Gainty
I would suggest in the forward webapp web.xml that you update the 
welcome-file-list to point to your jsp
e.g.
web.xml contents of www.abc.com (forward webapp)

welcome-file-list
  welcome-file/test/JSP/ondemand/rdtest/login.jsp/welcome-file
/welcome-file-list

M-
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: Nilesh Shastrakar [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Monday, July 17, 2006 8:59 AM
Subject: How to redirect URLs 


 Dear All,
 
 
 
 I have setup the Tomcat sever and Application, its working fine..
 
 but I got the long URL now I want to make it short
 
 Ex : 
 
 
 
 http://www.abc.om/test/JSP/ondemand/rdtest/login.jsp
 
 
 
 I want www.abc.com/forward  if  someone  types this URL in browser the site
 should 
 
 Redirect to above URL.
 
 
 
 Could anyone please help me how to do it in Tomcat?
 
 
 
 Regards
 
 Nilesh.
 
 
 
 
 


Re: How to redirect URLs

2006-07-17 Thread Ibrahim . Siddiqui
Excuse me,
I don't mean to interrupt an existing thread but could someone tell me how 
to properly create anew thread for Tomcat related questions?
I have an immediate issue regarding tomcat performace monitoring.

Thanks
Ibrahim





Nilesh Shastrakar [EMAIL PROTECTED]
07/17/2006 05:59 AM
Please respond to Tomcat Users List

 
To: users@tomcat.apache.org
cc: 
Subject:How to redirect URLs


Dear All,

 

I have setup the Tomcat sever and Application, its working fine..

but I got the long URL now I want to make it short

Ex : 

 

http://www.abc.om/test/JSP/ondemand/rdtest/login.jsp

 

I want www.abc.com/forward  if  someone  types this URL in browser the 
site
should 

Redirect to above URL.

 

Could anyone please help me how to do it in Tomcat?

 

Regards

Nilesh.

 

 




**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly prohibited.

Thank you.



RE: How to redirect URLs

2006-07-17 Thread Propes, Barry L
Look in the web.xml file. Perhaps within servlet mapping is what you're looking 
for?
At least it's that way in Tomcat 4 series.

-Original Message-
From: Nilesh Shastrakar [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 8:00 AM
To: users@tomcat.apache.org
Subject: How to redirect URLs 


Dear All,

 

I have setup the Tomcat sever and Application, its working fine..

but I got the long URL now I want to make it short

Ex : 

 

http://www.abc.om/test/JSP/ondemand/rdtest/login.jsp

 

I want www.abc.com/forward  if  someone  types this URL in browser the site
should 

Redirect to above URL.

 

Could anyone please help me how to do it in Tomcat?

 

Regards

Nilesh.

 

 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to redirect URLs

2006-07-17 Thread Richard Mixon
Take a look at the section of this page on the tomcat-users mailing list:
  http://tomcat.apache.org/lists.html

Basically you just create a new email (I.E. do not reply to an existing
email from the list), address it to  users@tomcat.apache.org with an
appropriate Subject and message Body.

HTH 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 10:02 AM
To: Tomcat Users List
Cc: users@tomcat.apache.org
Subject: Re: How to redirect URLs

Excuse me,
I don't mean to interrupt an existing thread but could someone tell me how
to properly create anew thread for Tomcat related questions?
I have an immediate issue regarding tomcat performace monitoring.

Thanks
Ibrahim





Nilesh Shastrakar [EMAIL PROTECTED]
07/17/2006 05:59 AM
Please respond to Tomcat Users List

 
To: users@tomcat.apache.org
cc: 
Subject:How to redirect URLs


Dear All,

 

I have setup the Tomcat sever and Application, its working fine..

but I got the long URL now I want to make it short

Ex : 

 

http://www.abc.om/test/JSP/ondemand/rdtest/login.jsp

 

I want www.abc.com/forward  if  someone  types this URL in browser the site
should 

Redirect to above URL.

 

Could anyone please help me how to do it in Tomcat?

 

Regards

Nilesh.

 

 





**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly
prohibited.

Thank you.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to redirect URLs

2006-07-17 Thread Nilesh Shastrakar
Thnaks for help,

But where do I specify forward for /test/JSP/ondemand/rdtest/login.jsp

If someone type the url www.abc.com/forward it should redierct to above jsp.

Regards
Nilesh,
-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 7:31 PM
To: Tomcat Users List
Subject: Re: How to redirect URLs

I would suggest in the forward webapp web.xml that you update the
welcome-file-list to point to your jsp
e.g.
web.xml contents of www.abc.com (forward webapp)

welcome-file-list
  welcome-file/test/JSP/ondemand/rdtest/login.jsp/welcome-file
/welcome-file-list

M-
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: Nilesh Shastrakar [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Monday, July 17, 2006 8:59 AM
Subject: How to redirect URLs 


 Dear All,
 
 
 
 I have setup the Tomcat sever and Application, its working fine..
 
 but I got the long URL now I want to make it short
 
 Ex : 
 
 
 
 http://www.abc.om/test/JSP/ondemand/rdtest/login.jsp
 
 
 
 I want www.abc.com/forward  if  someone  types this URL in browser the
site
 should 
 
 Redirect to above URL.
 
 
 
 Could anyone please help me how to do it in Tomcat?
 
 
 
 Regards
 
 Nilesh.
 
 
 
 
 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]