• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 Validation Using xml is not working in Ajax call.

 
Nagu Spartan
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts 2 Validation Using xml is not working in Ajax call.

Error :
HTTP Status 404 - No result defined for action com.hbs.erp.action.ApplyLeaveAction and result input

In struts.xml File,
<action name="applyLeave" method="applyLeave" class="com.hbs.erp.action.ApplyLeaveAction">
<result name="input">/ApplyforLeave.jsp</result>
<result name="success">/applyLeaveSubmit.jsp</result>
</action>
JSP File:



 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read. You can edit your post by using the button.
 
Nagu Spartan
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I updated using [code]. now my doubt is , when we implement struts-tags in a JSP page, need to define different action for every method in struts 2 also ...?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not really sure what you're asking.

You can use the config browser plugin to check to see what Struts 2 believes your configuration is. Does the file used as the "input" result's location exist (it is of different case than the "success" result, which is either confusing, or a typo)?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic