java - Error in Form Action attribute struts2 -
my login.jsp in web folder.
and action specified :
struts.xml
<package name="admin" extends="struts-default" namespace="/secure"> <action class="actions.loginaction" name="authenticateuser"> <result name="success" type="redirect">index</result> <result name="input">/login.jsp</result> <result name="error">/login.jsp</result> </action> </package> login.jsp
<s:form action="secure/authenticateuser" method="post"> </s:form> ========================
at first request works.
but if validate() method of action returns errors creates url as:
"secure/secure/authenticateuser" form action attribute.
i tried <s:url> tag still same problem can me. or may provide alternate solution this.
your action attribute on form tag possibly has wrong name. use
<s:form namespace="/secure" action="authenticateuser" method="post">
Comments
Post a Comment