File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts 2 Validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 Validation" Watch "Struts 2 Validation" New topic

Struts 2 Validation

priyam sengupta

Joined: Nov 16, 2008
Posts: 1
I am having a problem with the positioning of the error messages using struts 2 validation. they are displayed on the top of the text field for which i have written the validation. Is there any way to change the positioning of the error messages to the right hand side of the text field which is my requiremnt. I have tried modifying the struts 2 core.jar file but i couldnt find anything related with positioning of the messages. The least i could do was changing the color of the error message by changing the controlheader-core.ftl file. Any help will be greatly appreciated..
David Newton

Joined: Sep 29, 2008
Posts: 12617

You're on the right track, although I'd suggest it might be easier to create your own theme and work from that. You can also extract the FreeMarker files instead of unjar-ing and re-jar-ing the S2 libs.

I suspect you just didn't modify the relevant files correctly; it's all in there though. Off the top of my head I don't recall which file it is.

PS: The Struts-DEV mailing list is for the development of Struts itself, not user questions. Please use the Struts-USER mailing list for your own development questions.

I agree. Here's the link:
subject: Struts 2 Validation
It's not a secret anymore!