Hi David, thanks for your answer. Let say the scenario is a little different 
from my first mail. I am not going to download the xsd file by client. I m 
using a entity resolver inside a JAVA class to resolve a xsd resource inside 
the WEB-INF/xsd directory. There are two ways to access a resource in my case
1) ask for absolute path
2) ask via getResourceAsStream
3) Ask for URL

=> 
The point one is out of discussion, because on server it is not possible to ask 
for absolute path :)
The point two is the usual way to access resources inside a war file on a 
server, but it did lead to the same result as one in my case!!!!
The point three maybe resoolve my problem !
Hier is my Resolver where you see where i call for the xsd:
***************************************************************
public class MyEntityResolver extends DefaultHandler  implements EntityResolver
     {
         public InputSource resolveEntity(String publicId, String systemId)     
     {
                    
......                          
             if( systemId != null && systemId.endsWith(".xsd") )
             {
String xsdURL="http://myServer:5200/MyWebApplication/xsds/cusomer.xsd";;
                        InputStream inputStream = 
MyClass.class.getResourceAsStream(xsdURL);
                        }
                }
........
        }




 


which expect a URL as systemId to find out a xsd file.  

--- David Smith <d...@cornell.edu> schrieb am So, 8.3.2009:

> Von: David Smith <d...@cornell.edu>
> Betreff: Re: download a file inside WEB-INF use its URL on server
> An: "Tomcat Users List" <users@tomcat.apache.org>
> Datum: Sonntag, 8. März 2009, 17:18
> That's on purpose.  Clients
> cannot directly access anything inside the WEB-INF
> folder.  Your best solution is to move the file outside
> it.
> 
> -- David
> 
> 
> On Mar 8, 2009, at 11:36 AM, henry human <henry_hu...@yahoo.de>
> wrote:
> 
> > 
> > Hi
> > I am using tomcat 6. I have a XSD file in the
> WEB-INF/xsds directory inside my web application on tomcat.
> > I am trying to download a xsd file as follow:
> > http://myServer:5200/MyWebApplication/xsds/cusomer.xsd
> Unfortunatelly it dows not work!!!?
> > 
> > 
> > 
> > 
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to