Discussion

URL Page Re-Direct to use HTTPS

hi all,

We have a requirement here....

When i access the application using "http://server1:9080/prweb/PRServlet?"
the page should be automatically routed to "https://server1:9443/prweb/PRServlet?"

Any thoughts...

thx,
naveen

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

August 7, 2009 - 2:25pm

<security-constraint>
<web-resource-collection>
<web-resource-name>PRBasic</web-resource-name>
<url-pattern>/PRServlet</url-pattern>
<url-pattern>/PRServlet/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<user-data-constraint>
<description>SSL required</description>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>

Adding the above code to web.xml will work...

July 10, 2009 - 4:46pm

Let me explain you little more.

In our application we have two links

1) LDAP Link

2) Non LDAP link (http://server1:9080/prweb/PRServlet? Used by administrators and business analysts)

For the audit purpose we have to make non LDAP link SSL enabled. But the LDAP link will be as it is.

So when ever we try to access http://server1:9080/prweb/PRServlet? It should route to https://server1:9443/prweb/PRServlet?

We are using PRPC V5.1 SP2 and Websphere V6.0.2.

In websphere if we enable the global security it automatically routes http://server1:9060/ibm/console to https://server1:9043/ibm/console (this link is for admin console of IBM Websphere)

July 13, 2009 - 10:51am

In our environment.
PRPC is deployed as an Enterprise application.

So we have only one application server instance and no web servers.

so we were not able to use Apache mod_rewrite

Any ideas will help here.

thx
naveen.