Hi,

I'm having troubles submitting data through an form/action which is protected by the servlet container. Let me explain
better the problem:


I'm using struts (ver 1.1). I have a JSP containing a form (whith method=POST) to collect some data from a user. Something like:

<html:form action="/submit" method="post">
...
...
</html:form>

The submission is protected by container security, i.e. the url of the action (e.g. /submit.do ) is declared in a <security-constraint> block in the web.xml file:

 <security-constraint>
 <web-resource-collection>
  <web-resource-name>private action</web-resource-name>
  <url-pattern>/submit.do</url-pattern>
 </web-resource-collection>
 <auth-constraint>
  <role-name>admin</role-name>
 </auth-constraint>
</security-constraint>

The container (Tomcat 4.1.24) is configured to ask credentials by means of a FORM login, i.e.:

<login-config>
 <auth-method>FORM</auth-method>
 <realm-name>private</realm-name>
 <form-login-config>
  <form-login-page>/login.jsp</form-login-page>
  <form-error-page>/loginerror.jsp</form-error-page>
 </form-login-config>
</login-config>

As expected, when I fill the form and press the submission button the login form appears.
I fill it with user name and password, then I press the submisison button of the login form.


What appens then is that the Action that I'm using to handle the submitted data doesn't receive the
data. The Action Form contains null values. The action is declared with
'session' as scope in my struts-config file. i.e.:


<action path="/submit"
  scope="session" type="org.myexample.MyAction" >
  <forward name="success" path="/aJpsPage.jsp" included="true"/>
</action>

Do you know if this is a fault of mine, Tomcat, Struts or, maybe, an expected behavior ?

best regards, roberto.

--
Roberto Tiella
Automated Reasoning Systems - ITC-irst
Via Sommarive 18 - Povo
38050 TRENTO - ITALY
[EMAIL PROTECTED]
tel: +390461314452
http://sra.itc.it



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



Reply via email to