You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Matt Raible <ma...@raibledesigns.com> on 2002/04/25 04:14:39 UTC
Using c:import to include the contents of a file
I want to do the following:
<c:import url="file://d:\repository\assets\doc.html"/>
However, I get an UnknownHostException - is it possible to do this with
JSTL? My only solution (so far) is to use an iframe and do:
<iframe src="file://d:\repository\assets\doc.html"></iframe>
It's the only way I've found to read a file from the filesystem when
it's outside Tomcat's webapps directory.
Thanks,
Matt
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Using c:import to include the contents of a file
Posted by Matt Raible <ma...@raibledesigns.com>.
Great - thanks again!
> -----Original Message-----
> From: Martin Cooper [mailto:martin.cooper@tumbleweed.com]
> Sent: Wednesday, April 24, 2002 8:53 PM
> To: Tag Libraries Users List; matt@raibledesigns.com
> Subject: Re: Using c:import to include the contents of a file
>
>
> Yes, you can do this. You need to use three slashes at the
> front, so your example would be:
>
> <c:import url="file:///d:\repository\assets\doc.html"/>
>
> From the remaining separators, you can use either '/' or '\',
> but personally I always use '/' because then I don't have to
> worry about which I can use where.
>
> --
> Martin Cooper
>
>
> ----- Original Message -----
> From: "Matt Raible" <ma...@raibledesigns.com>
> To: "'Tag Libraries Users List'" <ta...@jakarta.apache.org>
> Sent: Wednesday, April 24, 2002 7:14 PM
> Subject: Using c:import to include the contents of a file
>
>
> > I want to do the following:
> >
> > <c:import url="file://d:\repository\assets\doc.html"/>
> >
> > However, I get an UnknownHostException - is it possible to do this
> > with JSTL? My only solution (so far) is to use an iframe and do:
> >
> > <iframe src="file://d:\repository\assets\doc.html"></iframe>
> >
> > It's the only way I've found to read a file from the
> filesystem when
> > it's outside Tomcat's webapps directory.
> >
> > Thanks,
> >
> > Matt
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Using c:import to include the contents of a file
Posted by Martin Cooper <ma...@tumbleweed.com>.
Yes, you can do this. You need to use three slashes at the front, so your
example would be:
<c:import url="file:///d:\repository\assets\doc.html"/>
>From the remaining separators, you can use either '/' or '\', but personally
I always use '/' because then I don't have to worry about which I can use
where.
--
Martin Cooper
----- Original Message -----
From: "Matt Raible" <ma...@raibledesigns.com>
To: "'Tag Libraries Users List'" <ta...@jakarta.apache.org>
Sent: Wednesday, April 24, 2002 7:14 PM
Subject: Using c:import to include the contents of a file
> I want to do the following:
>
> <c:import url="file://d:\repository\assets\doc.html"/>
>
> However, I get an UnknownHostException - is it possible to do this with
> JSTL? My only solution (so far) is to use an iframe and do:
>
> <iframe src="file://d:\repository\assets\doc.html"></iframe>
>
> It's the only way I've found to read a file from the filesystem when
> it's outside Tomcat's webapps directory.
>
> Thanks,
>
> Matt
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Using c:import to include the contents of a file
Posted by Hans Bergsten <ha...@gefionsoftware.com>.
Matt Raible wrote:
> I want to do the following:
>
> <c:import url="file://d:\repository\assets\doc.html"/>
>
> However, I get an UnknownHostException - is it possible to do this with
> JSTL? My only solution (so far) is to use an iframe and do:
>
> <iframe src="file://d:\repository\assets\doc.html"></iframe>
>
> It's the only way I've found to read a file from the filesystem when
> it's outside Tomcat's webapps directory.
I'm pretty sure that the backslashes are interpreted as the Java escape
character. Try with forward slashes instead.
Hans
--
Hans Bergsten hans@gefionsoftware.com
Gefion Software http://www.gefionsoftware.com
JavaServer Pages http://TheJSPBook.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>