Re: [Resin-interest] Redirect or forwarding

2010-08-19 Thread Riccardo Cohen
I'm doing url-rewriting in code and not in conf. What I do is write some 
servlet mapping :

   servlet-mapping url-pattern=/fr/* servlet-name=urlmanager/
   servlet-mapping url-pattern=/en/* servlet-name=urlmanager/

In the urlmanager servlet, I'm able to redirect or forward any request 
based on the current context (request url and application configuration)

To redirect :
response.sendRedirect(page);
To forward :
request.getRequestDispatcher(page).forward(request,response);

About the choice between forward or redirect, it depends only if you 
want the browser's url to change or not. This has also an effect on 
search engine optimization.

On 18/08/10 20:52, Francis, Steve (IHG) wrote:
 I'm not sure if I want a redirect of a forward here.  I'll explain.  I
 have a linux host with multpile IP addresses, and therefore, multiple
 DNS names. I'd like to be able to send requests for a base dns name with
 nothing after the .com to a specific application.
 http://hmisupportqa.hiw.com http://hmisupportqa.hiw.com/ to
 http://hmisupportqa.hiw.com/support/SupportServer
 and
 http://hmi-qa.hiw.com http://hmi-qa.hiw.com/ to
 http://hmi-qa.hiw.com/mqsservlet/ViewHdxMsg
 and still allow the standard website to be viewed via
 http://adczlnxhmiqa1.hiw.com http://adczlnxhmiqa1.hiw.com/
 What I don't want is a bad url that redirects other valid urls such as
 http://hmisupportqa.hiw.com/support/DisplayHotelStatus back to the
 http://hmisupportqa.hiw.com/support/SupportServer as that would break
 the application.
 Is this possible? I couldn't really tell from the doc.
 Thanks,
 *Steve Francis*
 *Technical Advisor - zSeries, zLinux, z/OS*
 IHG
 Alpharetta Data Center
 Ph: 770-442-7157
 Cell: 770-906-3122
 IM: francisihg



 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest

-- 
Riccardo Cohen
Architecte du Logiciel
http://www.architectedulogiciel.fr
+33 (0)6.09.83.64.49
Membre du réseau http://www.reflexe-conseil-centre.org


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] Redirect or forwarding

2010-08-18 Thread Francis, Steve (IHG)
I'm not sure if I want a redirect of a forward here.  I'll explain.  I
have a linux host with multpile IP addresses, and therefore, multiple
DNS names.  I'd like to be able to send requests for a base dns name
with nothing after the .com to a specific application.
 
 http://hmisupportqa.hiw.com http://hmisupportqa.hiw.com/   to
http://hmisupportqa.hiw.com/support/SupportServer
http://hmisupportqa.hiw.com/support/SupportServer 
 
and
 
http://hmi-qa.hiw.com http://hmi-qa.hiw.com/   to
http://hmi-qa.hiw.com/mqsservlet/ViewHdxMsg
http://hmi-qa.hiw.com/mqsservlet/ViewHdxMsg 
 
and still allow the standard website to be viewed via 
 
http://adczlnxhmiqa1.hiw.com http://adczlnxhmiqa1.hiw.com/ 
 
What I don't want is a bad url that redirects other  valid urls such as
http://hmisupportqa.hiw.com/support/DisplayHotelStatus
http://hmisupportqa.hiw.com/support/DisplayHotelStatus   back to  the
http://hmisupportqa.hiw.com/support/SupportServer
http://hmisupportqa.hiw.com/support/SupportServer   as that would
break the application.
 
Is this possible?  I couldn't really tell from the doc.
 
Thanks,
 
Steve Francis
Technical Advisor - zSeries, zLinux, z/OS
IHG
Alpharetta Data Center
Ph:  770-442-7157
Cell:  770-906-3122
IM: francisihg
 
___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest