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 2003/10/24 13:59:27 UTC

using c:import to import local files

I have a requirement to allow reading of "assets" for a website from a
local CD.  These assets might be images, flash movies, html/text pages,
etc.  I've got everything working but rendering html/text.  When I do
the rendering of text/html online, I use <c:import
url="/assets/filename.html"/>, and offline, I do <c:import
url="file:///e:/assets/filename.html"/>.  I can enter this fine in
Mozilla and the page will come up, but JSTL's c:import tag says it can't
find the file.

2 questions:

1.  Can I use c:import to import a local HTML file onto a page?
2.  If not, is there any way to do this?

Thanks,

Matt



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: using c:import to import local files

Posted by "Ruth, Brice" <br...@fiskars.com>.
The <c:import> statement runs server-side, I assume when you say "local" 
you mean local to whomever is viewing the page from your server, not 
local to the server. If that's the case, then there is no way you can do 
this with the <c:import> tag, since the local machine *never* sees this 
- it is parsed purely on the server, at which point HTML (if any) is 
sent to the browser to be rendered. To do something like this, you 
*might* be able to used a cryptographically signed JavaScript that can 
access the file system local to a user viewing the page.

Otherwise, what you're really looking for is to right a Java application 
with a rendering component for HTML, and not a browser.

Matt Raible wrote:

>I have a requirement to allow reading of "assets" for a website from a
>local CD.  These assets might be images, flash movies, html/text pages,
>etc.  I've got everything working but rendering html/text.  When I do
>the rendering of text/html online, I use <c:import
>url="/assets/filename.html"/>, and offline, I do <c:import
>url="file:///e:/assets/filename.html"/>.  I can enter this fine in
>Mozilla and the page will come up, but JSTL's c:import tag says it can't
>find the file.
>
>2 questions:
>
>1.  Can I use c:import to import a local HTML file onto a page?
>2.  If not, is there any way to do this?
>
>Thanks,
>
>Matt
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>  
>

-- 
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org