0

Do Servlet filters have any issues with detecting SSL requests?

I have a filter that works okay with normal http request but it does not detect https request.

Any advice here would be appreciated.

2 Answers 2

1

Do Servlet filters have any issues with detecting SSL requests?

AFAIK no.

Any advice here would be appreciated.

Check that your web container is configured to listen for HTTPS requests. For Tomcat, check the "connector" elements in your "server.xml" file.

Sign up to request clarification or add additional context in comments.

2 Comments

Hi Stephen, Thanks for your reply. My web server is actually Sun One, and it serves as a proxy for requests to an app server. I'm trying to deploy a filter that encrypts some parameters and sends it to the app server. Do you happen to know if filters can be deployed on a separate server and still be able to pass modified attributes to another machine on the network?
Send them as request parameters.
1

I have a servlet filter that works with both SSL and non-SSL connections, and I can determine whether the connection is SSL or not by invoking the method HttpServletRequest.isSecure(). So this should work, once SSL is configured properly in the container (and that is usually the tricky part). Check the configuration against the documentation for setting up SSL for your container, and look in that documentation for an option to enable SSL debugging; that should help identify what is going wrong.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.