Option 1.
Use <s:form href="https://fqdn/context/myaction.action";>

Option 2.

In struts.xml put your login form into a package with a different namespace. eg "/secure". Then setup a security-constraint in web.xml so that access to resources in that namespace ("eg /secure/*") requires HTTPS (a CONFIDENTIAL transport guarantee). You'll find examples of this everywhere.

If you need automatic HTTP<->HTTPS redirection you'll need a redirect interceptor. Another user contributed their version in a prior discussion but I can't find the link.

regards,
Jeromy Evans

Srinivas.N. wrote:
I dont directly specify any URL with the <s:form> tag - I use the <s:form>
tag with an action parameter as in <s:form action="login"...>

I want the login action to be invoked via https.

For example, the <s:url> tag has a parameter called scheme, which can be be
set to https - I dont see anything similar in the <s:form> tag.

I am sure I am missing something. Requiring a login form to be submitted via
https seems like a basic need for which there has to be a simple solution.

Thanks
SN


yitzle wrote:
On 8/16/07, Srinivas.N. <[EMAIL PROTECTED]> wrote:
Struts 2 - Is there a way by which I can configure a form submission to
use
https?

Thanks
SN
You should be able to specify the <s:form > url to point to any URL,
including https
I am using Axis, though, and it doesn't nativaly support https. It can
be done, but I found it to be a pain

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






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

Reply via email to