aspose file tools*
The moose likes Tomcat and the fly likes Validation not triggering when deployed into Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Validation not triggering when deployed into Tomcat " Watch "Validation not triggering when deployed into Tomcat " New topic

Validation not triggering when deployed into Tomcat

Alex Smith

Joined: May 01, 2012
Posts: 2
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 "${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

Joined: Oct 16, 2009
Posts: 66

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?

Googling doesn't make you a genius. But not Googling makes you dumber.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 36478
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

Joined: Jun 25, 2001
Posts: 15639

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.

Customer surveys are for companies who didn't pay proper attention to begin with.
Alex Smith

Joined: May 01, 2012
Posts: 2
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:
subject: Validation not triggering when deployed into Tomcat
Similar Threads
Running JForum with Security Policy
Policy File with AXIS
tomcat as service -> cannot start WINWORD.exe
Problems with security policies for Axis2 in Tomcat
Tomcat Java2 Security Issue: modifyThread and modifyThreadGroup