tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anil Goyal -X (anigoyal - Aricent Technologies at Cisco)" <anigo...@cisco.com>
Subject RE: redirect valve in tomcat
Date Mon, 20 May 2013 15:28:51 GMT


From: Anil Goyal -X (anigoyal - Aricent Technologies at Cisco)
Sent: Monday, May 20, 2013 8:01 PM
To: Tomcat Users List
Subject: redirect valve in tomcat

Hi All,

I am adding a new service in tomcat with name "catalina_new" and deploy an "abc" application
under this.
This application was in running under catalina service previously.
This new service is using connector port 8181 for http and 8444 for https.
Now I want all my request coming for this application on port 8080 to redirect on port 8181
for http ,8443 to redirect on port 8444.
My tomcat server.xml is using a valve class <Valve className="com.cisco.unity.tomcat.valve.ConnectionRedirectValve"
redirectHost=""/>
Some redirection logic is already written in this valve class for some other application but
that is only redirecting the url with  same port.
                if (request.getContextPath().equals("/ciscopca") && request.getRequestURI().startsWith("/ciscopca/unityinbox/"))
{
                    response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
            response.sendRedirect("/inbox");
                }

How I can make a check here for request to redirect based on port number.

Thanks
Anil



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message