DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37289>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37289

           Summary: SSL Switching
           Product: Struts
           Version: 1.3.0
          Platform: Other
        OS/Version: other
            Status: NEW
          Keywords: PatchAvailable
          Severity: enhancement
          Priority: P2
         Component: Controller
        AssignedTo: dev@struts.apache.org
        ReportedBy: [EMAIL PROTECTED]


My enhancement relates to the SSL switching within Struts. Enhancement 
requires only small changes to the RequestProcessor which I have already made 
and tested .. actually it's how I currently manage SSL switching in all my 
Struts projects. I made the change originally to 1.2 which is the version I am 
currently using however I have examined 1.3 and the change can be applied 
there also without any rework.

>From a users perspective the change is as simple as setting an attribute 
secure="true" on the <forward> element. When set the RequestProcessor 
automatically manages the switch. If the next forward is not defined as secure 
then the next forward (redirect) switches SSL mode off. All navigations from 
SSL -> SSL are dealt with in the normal way, it's only when switching modes 
that the additional code forces the redirect. Simple change really but answers 
a problem that no doubt many users have with Struts.

Description of change (Classes impacted) :-
Add new attribute "secure" of type "boolean" to the form part of the action 
mapping this is implemented in :-

ForwardConfig 
ActionForward
StrutsConfig.dtd

Add an additional parameter to the ActionServlet config of sslPort. This will 
be configured in the web.xml file.

Remainder of change is a change to the RequestProcessor in the init method to 
nitialise the sslPort using for ssl switching. The other change is in the same 
class in processForwardConfig this is where the switching to and from SSL mode 
takes place.

I have been using this solution for some time in my projects and it works 
well, is simple to implement and understand. I have the code changes (small) 
that are required to the above classes however I haven't attached to this 
enhancement.

Hope this helps

Jonathan Hudson

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to