• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Validation not triggering when deployed into Tomcat

 
Greenhorn
Posts: 2
  • 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
 
Ranch Hand
Posts: 66
VI Editor Java Linux
  • 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?
 
Marshal
Posts: 64654
225
  • 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.
 
Bartender
Posts: 20838
125
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • 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
  • 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 !
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!