It's not a secret anymore!*
The moose likes Struts and the fly likes SSLEXT behavior-- rewrite works, page doesn't come up Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "SSLEXT behavior-- rewrite works, page doesn Watch "SSLEXT behavior-- rewrite works, page doesn New topic
Author

SSLEXT behavior-- rewrite works, page doesn't come up

Rex Norm
Ranch Hand

Joined: Dec 11, 2010
Posts: 41
Hi all,

I'm using sslext to control ssl use on my site. I think I've installed it correctly, based on the scanty documentation available. However, it seems to be losing the port number during the url rewrite.

I'm running on localhost:8080 (a development machine) and I've got ssl installed on port 443 using Tomcat's keystore (self signed cert that has been installed in the browser)

In my action config, I have:



When I follow a link to this form, the browser gives me: https://localhost/someAction;(some session ID) -- this then gets set to cookies after the first page. I think I'm ok with this, and this seems to be normal container behavior too.

When i go to a page handled by an UNSECURE action:



I get: http://localhost/someAction2;sessionID (and no page comes up).

Is this hardcoded in the sslext library? As a workaround, I tried to get my Eclipse-controlled Tomcat environment to work on port 80, but I keep getting errors that there is another server operating on port 80 (I have none-- I can only think that Eclipse has soemthing to do with this).

ANy thoughts on how I can:
1.) get appropriate port rewriting (if that is the problem)? Is this a Tomcat config problem? the scheme rewriting seems to work (e.g. http --> https and back)
2.) how to get port 80 to work to test it (or to get 8080 to work).

_r

PS as an aside, one reason I used 443 is that 8443 was giving all sorts of behavior, which led me to believe that ports were being lost in the rewrite.
Rex Norm
Ranch Hand

Joined: Dec 11, 2010
Posts: 41
I should also mention that I'm on struts 1.3.10 using the composableRequestProcessor.
Rex Norm
Ranch Hand

Joined: Dec 11, 2010
Posts: 41
OK.... more info. I downloaded the source, and it seems that they DO hardcode the ports (http = port 80; https = 443). Setting these in the struts config per their example doesn't seem to do anything.

I've set my server.xml on tomcat to run on 80/443 and it now seems to work.

_R
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SSLEXT behavior-- rewrite works, page doesn't come up