• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

WebContent on classpath?

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to do simple XML validation against a Schema (ha! nothing is ever that simple). In past projects, we have located the /xsd directory under the /WebContent directory of a web project. In these past projects we had to use WSAD and WAS. On a new project we're trying to use lighter tools and use Eclipse/Tomcat 4.1. Tomcat for development, although it is deployed on WAS, but I've already digressed enough.

On WAS, we were able to load the XSD with the following code



and this worked just fine. However, in Tomcat, the url in the code above is coming back as null. So is the /WebContent directory not on the classpath in Tomcat, but it is in WAS?
[ December 27, 2006: Message edited by: B Preston ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where is your xsd directory?
 
Bob Peterson
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The /xsd directory is directly under the /WebContent directory. So a snippet of the directory structure is




[BSouther: Added UBB CODE tags so the directory structure would make sense]
[ December 28, 2006: Message edited by: Ben Souther ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure how WAS builds its classpath.
In Tomcat, I have always needed to put resources under the WEB-INF/classes directory if I wanted them picked up from the classpath.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic