Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

from https to http?

John Doe

2007-01-03

Replies:

Hi,

 I new in the list. I hope can help somebody someday, but now I need
a hand to solve this mail's subject question.

 I have configured a tomcat application to use https in a arbitrary
jsp file (just for testing) when the user request it. So, the webapp's
"web.xml" file contains the following:

=== from here ===
<security-constraint>
  <display-name>LoginConstraint</display-name>
  <web-resource-collection>
    <web-resource-name>Login</web-resource-name>
    <description>Test to start a session</description>
    <url-pattern>/ssl/*</url-pattern>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    <http-method>HEAD</http-method>
    <http-method>PUT</http-method>
    <http-method>OPTIONS</http-method>
    <http-method>TRACE</http-method>
    <http-method>DELETE</http-method>
  </web-resource-collection>
  <user-data-constraint>
     <description>Test to request SSL access</description>
     <transport-guarantee>CONFIDENTIAL</transport-guarantee>
  </user-data-constraint>
</security-constraint>
=== to here ===

  In addition I have a a "index.jsp" with this content:

=== from here ===
<html>
  <head>...</head>
  <body>
    <h1>Index test</h1>
    <a href="ssl/restricted.jsp">Go to SSL page</a>
  </body>
</html>
=== to here ===

 And finally in the "restricted.jsp" file have this

=== from here ===
<html>
  <head>...</head>
  <body>
    <h1>Restricted test</h1>
    <a href="../index.jsp">Back to index</a>
  </body>
</html>
=== to here ===

  The "problem" is: when I go from "index.jsp" to "restricted.jsp"
the URL gets replaced (correctly) by
"https://localhost:8443/testSSL/restricted.jsp", _but_ when I want to
go from "restricted.jsp" back to "index.jsp" using the anchor defined
in it the URL is not replace by the standard "http" URL and then gets
stuck with a "https://localhost:8443/testSSL/index.jsp" URL instead of
the original "http://localhost:8080/testSSL/index.jsp"

Have I made a mistake here, is a missconfiguration or an conceptual
error of mine?

Any light to this is welcome. Forgive is this topic has been discused
but I can't found any similar to my question.

Cheers!

Pablo.

---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.