• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validation not triggering when deployed into Tomcat

 
Alex Smith
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im fairly new to java / Tomcat (as is our entire development team, long story short we used to be .Net and Domino developers then one day we were told to develop in java) anyway, I have created a war file of our java development which I have deployed to our Tomcat server, the application deploys and runs ok but for some reason none of the validation messages are being displayed on the forms.
I have checked the log files in Tomcat and I am receiving the message "g:\program files\apache software foundation\tomcat 7.0\webapps\griddemo\web-inf\classes\config\servicesvalidations.xml (the system cannot find the path specified)" but when I check the directory the file does exist...

Someone has suggested that it may be an permission problem in tomcat but ive added permission into the catalina.policy file (i think the code ive added is
grant codeBase "file:${catalina.home}/webapps/GRIDDEMO/WEB-INF/classes/config -" {
permission java.io.FilePermission "${catalina.home}/webapps/GRIDDEMO/WEB-INF/classes/config", "read, write"; };)

but still no validation messages are being displayed, hopefully that makes sense
 
Prabaharan Gopalan
Ranch Hand
Posts: 66
Java Linux VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe you are loading the file from your application. and just to be on the safer side, "g:\program files\apache software foundation\tomcat 7.0\webapps\griddemo\web-inf\classes\config\servicesvalidations.xml" - are you sure they're of the right case? (especially the WEB-INF part?) and could you try putting the file in a path which doesn't have spaces in them?
 
Campbell Ritchie
Sheriff
Pie
Posts: 47300
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I think that is too difficult a question for us beginners, so I shall try whether it fits better in our Tomcat forum.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17646
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Alex! Can I assume that the reason for all the spaces in your display name is because someone already registered an "Alex Smith"?

I think we lost some context here when the thread was moved, since I'm not sure what these "validation messages" are. However, 2 things do stand out.

1. Your message path includes directories with spaces in their names. That's always something to keep an eye on. Internally, it's usually OK, but command lines and shell scripts sometimes get confused.

2. Assuming that this file is a webapp resource, having a fully-qualified pathname is a flashing indicator. Webapp resources are usually relative to the root of the webapp.

If you could tell us more about the webapp, it would help.
 
Alex Smith
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fixed, the issue did indeed appear to be caused by the spaces in the installation directory. I re-installed tomcat removing any folder names with spaces i.e. \program files\apache software foundation\ and now the validation messages are all being triggered correctly. Thanks again !
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic