You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by sudip shrestha <su...@gmail.com> on 2005/04/15 15:53:46 UTC
ssl-forwarding filter not working in IE 6
Hi : I have following code for automatic ssl-forwarding filter:
public void doFilter(ServletRequest servletrequest, ServletResponse
servletresponse, FilterChain filterchain)
throws IOException, ServletException
{
String s = servletrequest.getScheme();
if( !s.equalsIgnoreCase("http") )
{
//System.out.println( "Normal filter Operation----" );
filterchain.doFilter(servletrequest, servletresponse);
}
else
{
HttpServletResponse response = (HttpServletResponse)servletresponse;
HttpServletRequest request = (HttpServletRequest)servletrequest;
//System.out.println( "currPort: "+request.getServerPort() );
String url = "https://" + request.getServerName();
//System.out.println( "currUrl: "+url );
url = url + ":" + PORT;
//System.out.println( "currUrl: "+url );
url = url + request.getRequestURI();
//System.out.println( "currUrl: "+url );
String queryStr = request.getQueryString();
if( queryStr!=null )
url = url + "?" + queryStr;
//System.out.println( "currUrl: "+url );
response.sendRedirect(url);
return;
}
}
This works perfectly in Firefox. However, IE just sits there till it
throws me a "page cannot be displayed". If I directly type secure
url, e.g., https://domain.com/siteAdd, it works in IE as well, but IE
just cannot seem to forward it to the secure url from the plain url.
Any suggestions?
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: ssl-forwarding filter not working in IE 6
Posted by sudip shrestha <su...@gmail.com>.
But still the question remains is this some sort of bug in IE?
On 4/15/05, sudip shrestha <su...@gmail.com> wrote:
> Actually,
> I have apache serving static pages with jk-connector integrating
> services with Tomcat 5, and I did not show the full script, but I
> would like to redirect to secure url to only those requests coming
> from outside the company intranet.
>
> On 4/15/05, Jason Bainbridge <jb...@gmail.com> wrote:
> > On 4/15/05, sudip shrestha <su...@gmail.com> wrote:
> > > Hi : I have following code for automatic ssl-forwarding filter:
> >
> > Why do it that way? Why not just add transport-guarantee's in your
> > web.xml and setup a redirect port for your http connector in your
> > server.xml?
> >
> > eg. http://www.jguru.com/faq/view.jsp?EID=748030
> >
> > Regards,
> > --
> > Jason Bainbridge
> > http://kde.org - webmaster@kde.org
> > Personal Site - http://jasonbainbridge.com
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: ssl-forwarding filter not working in IE 6
Posted by sudip shrestha <su...@gmail.com>.
Actually,
I have apache serving static pages with jk-connector integrating
services with Tomcat 5, and I did not show the full script, but I
would like to redirect to secure url to only those requests coming
from outside the company intranet.
On 4/15/05, Jason Bainbridge <jb...@gmail.com> wrote:
> On 4/15/05, sudip shrestha <su...@gmail.com> wrote:
> > Hi : I have following code for automatic ssl-forwarding filter:
>
> Why do it that way? Why not just add transport-guarantee's in your
> web.xml and setup a redirect port for your http connector in your
> server.xml?
>
> eg. http://www.jguru.com/faq/view.jsp?EID=748030
>
> Regards,
> --
> Jason Bainbridge
> http://kde.org - webmaster@kde.org
> Personal Site - http://jasonbainbridge.com
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: ssl-forwarding filter not working in IE 6
Posted by sudip shrestha <su...@gmail.com>.
I disabled my filter and have tried this way, once again works with
Firefox but not with IE, exact same results.
On 4/15/05, Jason Bainbridge <jb...@gmail.com> wrote:
> On 4/15/05, sudip shrestha <su...@gmail.com> wrote:
> > Hi : I have following code for automatic ssl-forwarding filter:
>
> Why do it that way? Why not just add transport-guarantee's in your
> web.xml and setup a redirect port for your http connector in your
> server.xml?
>
> eg. http://www.jguru.com/faq/view.jsp?EID=748030
>
> Regards,
> --
> Jason Bainbridge
> http://kde.org - webmaster@kde.org
> Personal Site - http://jasonbainbridge.com
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: ssl-forwarding filter not working in IE 6
Posted by Jason Bainbridge <jb...@gmail.com>.
On 4/15/05, sudip shrestha <su...@gmail.com> wrote:
> Hi : I have following code for automatic ssl-forwarding filter:
Why do it that way? Why not just add transport-guarantee's in your
web.xml and setup a redirect port for your http connector in your
server.xml?
eg. http://www.jguru.com/faq/view.jsp?EID=748030
Regards,
--
Jason Bainbridge
http://kde.org - webmaster@kde.org
Personal Site - http://jasonbainbridge.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org