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

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -