File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes restricting a JSP to HTTPS access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "restricting a JSP to HTTPS access" Watch "restricting a JSP to HTTPS access" New topic

restricting a JSP to HTTPS access

Manuj Bawa

Joined: Dec 13, 2004
Posts: 7

I am using tomcat 4.1 and SSL is implemented on Apache, so all the pages can be accessed through http as well as https, but there is this one page that should only be accessed through HTTPS, Is Filter defination in deployment descriptor and defining Filter Implementation class the correct solution to this?

Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

"Manuj" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy. User names cannot be obviously fake and must constist of a first name and a last name.

You can change your user name here.

Thanks! and welcome to the JavaRanch!

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Tarun Gandhi

Joined: Jan 13, 2003
Posts: 13
You can try the following as well:

String scheme = request.getScheme();

//forward to the https url
I agree. Here's the link:
subject: restricting a JSP to HTTPS access
It's not a secret anymore!