Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WebContent on classpath?

 
Bob Peterson
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • 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 ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
Bob Peterson
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • 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 Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic