A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Appliation Server - HTML Include
Joined: Sep 11, 2005
Mar 22, 2007 07:31:00
I am using Jboss-4 application server in my local server.
I would like to include a HTML file which is placed outside the web application (eg: sample.war) in a
im using the following to include the HTML file
The issue is filepath is considered with reference to the application
then JSP include tag is considering path as /sample/html/static/temp.html
But the structure for the HTML file is C:/html/static/temp.html ( local hard disk )
How to include the HTML file in such case?
Joan Horta Tosas
Joined: Feb 01, 2007
Mar 23, 2007 15:18:00
You cannot include anything from outside your webapp. You can copy the file into your webapp or use a frame/iframe in the html code generated by your JSP to include that page.
Author and ninkuma
Joined: Jan 10, 2002
Mar 23, 2007 15:23:00
Well, I wouldn't consider an iframe an "include". It's a separate page that just happens to be embedded within the window of the first.
And even with an iframe, the HTML file needs to be web accessible.
If the HTML file
web accessible through another web app, you could use the JSTL <c:import> to include it.
But as Joan pointed out, this is best handled at build-time by copying the HTML file to within the bounds of the addressing web application.
[ March 23, 2007: Message edited by: Bear Bibeault ]
Asking smart questions
Books by Bear
I agree. Here's the link:
subject: Appliation Server - HTML Include
What is the differences between 2 includes of JSP?
Problem in sequence of actions in JSP
include and file path
Accessing resources out of context
Serving Content from Outside the context
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014