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 form validate() 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 "form validate()" Watch "form validate()" New topic

form validate()

Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
I have a simple form and validate method. The validation works great on a text field. The problem I am having is when validate returns the action error, my form bean is not found on the request. Is this normal behavior. What happens is a logic:equal tag fails since the name attribute is my form bean name, which isn't found. Ideas?
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
I would have to know a little bit more about your JSP, the exact error that you are getting, your input attribute and what the action that displays the page does to provide much help. If there are values on your form that you are populating in the action that displays the page then you might need to have your input point at an action that can do the same thing (or you can store them as hidden fields on your jsp).

- Brent
Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
Hey Brent, I did a complete rebuild this morning and now it works. Not sure what happened, maybe JSP caching.
subject: form validate()
Similar Threads
I am getting error when starting Tomcat .How can I rectify it?
URGENT:Tiles giving bean not defined
Issue: Form bean not being populated.
initialize an array of data to dynamic form bean
Behaviour on failure of validate in form bean