The moose likes Struts and the fly likes Validation form and struts.xwork.chaining Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Validation form and struts.xwork.chaining" Watch "Validation form and struts.xwork.chaining" New topic

Validation form and struts.xwork.chaining

Honzak Troubak
Ranch Hand

Joined: Jan 11, 2013
Posts: 31
Hello guys,

I have troubles with validation of forms.

I decided that I will use way where if have any problem I will call addActionError(getText("error")); and return ERROR.

Unfortunatly I'm using a lot of "type=chain" because I have call more method together. I found is a lot of troubles with using chain. I cant show errors in my <s:actionerror/> because error does not pass through chain.

Maybe only one resolution is use struts.xwork.chaining. I found that I should put

to struts.xml.

With using struts.xwork.chaining it is better but I have still trouble: I have 3 actions. I have to go from action updateTopic to adminTopics.jsp.

And when I set struts.xwork.chaining.copyErrors to true (others both are TRUE) method addTopic() returns Error but methods readTopic() and readConference() didn't run and application skip to page adminTopics.jsp and actionError is showed.

When I set struts.xwork.chaining.copyErrors to false, all methods run OK but <s:actionError> show nothing.

Could anybody say me what should I do?

muyinliu xing

Joined: May 27, 2013
Posts: 1
You can use the new version of Struts like Struts 2.3.14 which I proved working well.
The older version of Struts might had the BUG.
If you find new problems, talk to me
I agree. Here's the link:
subject: Validation form and struts.xwork.chaining
It's not a secret anymore!