Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Ranch Article About Struts 1.1

 
Mikey Warren
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just tried running through the examples in the two articles linked to at the top of this forum - they're very good as a quick introduction to getting a simple struts app. running.

- but I had a problem getting the 1.1 version working with the javascript validation. First the xml file should be "validation.xml" not "validations.xml" as its referred to in the article.
Second (I suppose this was my fault - but others may make the same mistake) the struts-config.xml file needs to refer to version 1.1 in the doctype (not 1.0). If you're just following the instructions then its easy not to notice this.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for letting us know. I'll tip Tom about these so he can update the article.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem with the name of the file is that I wasn't consistent in the article, sometimes using validation.xml and sometimes using validations.xml. But it only took a year for someone to notice.
 
Mikey Warren
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Feel I'm being picky now, but just incase it helps anyoe else, the minlength of 5 set in validation.xml won't allow user to log on (as "user" is less than 5 characters long obviously) - so change the minLength, or the username of user, in loginBean.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, Mikey. I think I will make you my official proof reader!
By the way, Mikey is my son's name so you are automatically on my good list!
[ April 01, 2004: Message edited by: Thomas Paul ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic