----- Original Message -----
From: "Igor Fedulov" <[EMAIL PROTECTED]>
>
> > > it's all magically worked. I'm not sure if it's a bug or whatnot, but
> > > reader.read(InputStream) seems to work fine while reader.read(URL)
> > > don't...
> >
> > Mmmm. This is kinda strange. Unfortunately in SAX there's no constructor
for
> > InputSource that takes a URL object so we have to convert it to a String
> > first. So currently the URL.toExternalForm() method is called which is
then
> > passed straight into the SAX parser..
> >
> > What exactly does your URL look like as a String? All I can think of is
some
> > funky URL protocol is being used by your ServletContainer but that the
> > String it returns is not a valid URL if you see what I mean..
>
> May be because I use the "file://" protocol in URL? The exact url is:
>
> file:/c:/data/work/projects/ptn/webapp/WEB-INF/conf/sql.xml
>
> Which I compose like following:
>
> 1. Get the WEB-INF/conf/sql.xml from web.xml in ConfigServlet
> 2. Get real path for above using
> request.getServletContext().getRealPath("WEB-INF/conf/sql.xml");

I just wonderer if

URL url = getServletContext().getResource( "WEB-INF/conf/sql.xml");

would return a different URL?

James

> 3. Create java.io.File from above absolute path
> 4. invoke toURL() of java.io.File
>
> BTW notice that it's not "file:///", it's "file:/" protocol. And i tried
> to do toExternalForm() and it returned "file:/blah.."
>
> If I could help with anything else to diagnose the problem let me know,
> I'll be more then happy to do so.
>
> Best regards,
> --
> HTTP is a stateless protocol, and the Internet is a stateless development
> environment
> --
> Igor Fedulov
> E-mail : [EMAIL PROTECTED]
> Work Ph: 773.775.1595
> Home Ph: 773.281.8938
> Cell Ph: 773.580.5935
>
>
>
>
>
> _______________________________________________
> dom4j-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-user


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to