Try,
InputStream is =
getServletContext().getResourceAsStream("/WEB-INF/Schemas/MySchema.xml");
This will work whether the webapp is deployed as a directory on the file
system or as a .war file.
Jake
At 05:31 AM 7/10/2002 -0500, you wrote:
>Yes, that seems to be the case. The problem is that I'm validating
>arbitrary xml files using namespaces, and the schema locations specified
>in those files are relative to the application directory. In other
>words, xerces is expecting to find them in the same directory as the
>class file, which does not work with tomcat.
>
>I was hoping that I could use either server.xml or web.xml entries to
>point to the location of these files. What is the "best" documentation
>(most complete) for those files?
>
>Thanks - edwardJones
>On Wed, 10 Jul 2002, Andrew Conrad wrote:
>
> > I'm not positive, but I was under the impression that you cannot see
> > inside the WEB-INF folder.
> >
> > I would just create a new folder in the root of your app and reference
> > them absolutely "/Schemas"
> >
> > - Andrew
> >
> > -----Original Message-----
> > From: Dr. Edward R. Jones [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 10, 2002 4:26 AM
> > To: [EMAIL PROTECTED]
> > Subject: Where to place XML Schemas in Tomcat?
> >
> >
> > Hi,
> >
> > I need to read .xsd (schemas) for xerces validation under tomcat. How
> > do
> > I get tomcat to look for them in a directory like WEB-INF/schemas ?
> > Currently, tomcat is looking for them in the root of the main drive
> > (under
> > windows 2K professional).
> >
> > Thanks for your help - edwardJones
> >
> >
>
>--
>****************************************************************************
> Edward R. Jones, Ph.D. | email: [EMAIL PROTECTED]
> Texas A&M Univ. - Corpus Christi | phone: (361) 825-5840
>****************************************************************************
>
>
>--
>To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>