This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Automatic validation is not working with dispatch action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Automatic validation is not working with dispatch action" Watch "Automatic validation is not working with dispatch action" New topic
Author

Automatic validation is not working with dispatch action

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

Hi.
I have have a dispatch action with two methods: view (to view the cart) , add (to add a book to cart).
This dispatch action have an action form associated with it, this form uses automatic validation (not javascript).
The previous form is used by add method.
Here is a snippet:

Upon sucess, bookDetails.jsp displays a message, upon fail , another message.
The problem is when /action/cart.do?operation=view is called , bookDetails.jsp displayed again.
The problem solved when input attribute and the accompanying entry in validation.xml removed.
But validation should happened, how to over come this problem ?
 
jQuery in Action, 2nd edition
 
subject: Automatic validation is not working with dispatch action
 
Similar Threads
how to show errors on the same page?
Validation and HttpSession
Getting the following Exception
tokens and validations are not playing well
Struts Validation Problem