You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Raghava Rao <ca...@yahoo.com> on 2003/11/12 20:37:17 UTC

How to redirect http request to a secure SSL site?

Hi,
I have jakarta-4.1.24 installed.

I have enabled both HTTP, running on port 80 and
HTTPS, running on 443 on my tomcat server.

So, my HTTP site can be reached at
http://localhost/index.jsp and my secure site can be
reached at https://localhost/index.jsp 

I need help in:
1. When a user browses to http://localhost/index.jsp,
how can he/she be redirected to
https://localhost/index.jsp automatically?

2. What are the conf\server.xml or conf\web.xml
changes that need to be done to achieve the same?

3. Once it's redirected to https, it should continue
the entire session in https.

4. If there is a webpage like
https://localhost/member/user.jsp he/she should not be
able to browse to the same using
http://localhost/member/user.jsp 

Please direct me to any URL's where I can also read
about the same.

Thanks in advance.
Raghava

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How to redirect http request to a secure SSL site?

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
On 11/12/2003 08:37 PM Raghava Rao wrote:
> Hi,
> I have jakarta-4.1.24 installed.
> 
> I have enabled both HTTP, running on port 80 and
> HTTPS, running on 443 on my tomcat server.
> 
> So, my HTTP site can be reached at
> http://localhost/index.jsp and my secure site can be
> reached at https://localhost/index.jsp 
> 
> I need help in:
> 1. When a user browses to http://localhost/index.jsp,
> how can he/she be redirected to
> https://localhost/index.jsp automatically?
> 
> 2. What are the conf\server.xml or conf\web.xml
> changes that need to be done to achieve the same?
> 
> 3. Once it's redirected to https, it should continue
> the entire session in https.
> 
> 4. If there is a webpage like
> https://localhost/member/user.jsp he/she should not be
> able to browse to the same using
> http://localhost/member/user.jsp 
> 
> Please direct me to any URL's where I can also read
> about the same.

Hi Raghava,
check the servlet specification from Sun. This is all documented there. 
It is configured in the web.xml, and you need to read up on 
security-constraints and user-data-constraints.


Adam
-- 
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org