I have a web-page, there are couple of text boxes and a submit button. On submit, the target url matches the url-pattern for SSL. The target page gets opened as HTTPS, but the textbox values are lost.
request.getParameter("txtUser") is null
Is there any way to access/retreive the submit/request parameters from previous jsp?
web.xml
<security-constraint>
<display-name>Security Constraint</display-name>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<url-pattern>/content/account/passrecover/*</url-pattern>
</web-resource-collection>
<role-name>custom-report-user</role-name>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
You mean that your form is submitting to an HTTP url via POST, and then is automatically being redirected (per the transport-guarantee), to an HTTPS url?
Then no, I don’t think there is any built-in support to save those parameters so that they persist after the redirect. Generally, you would want to make sure the form posted to an HTTPS url directly.
It is possible to implement a server-side mechanism, but it’s not trivial to integrate transparently with the servlet API. Spring Security has some built-in handling and classes for it. (I think one of the key classes in recent versions is RequestCache, but not positive.)