| Author |
Appliation Server - HTML Include
|
Prakash Nathan
Greenhorn
Joined: Sep 11, 2005
Posts: 6
|
|
Hi 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 JSP. im using the following to include the HTML file <jsp:include page='<%=filepath%>'/> The issue is filepath is considered with reference to the application example: if filepath=/html/static/temp.html 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? Please help. Regards Prakash A
|
 |
Joan Horta Tosas
Ranch Hand
Joined: Feb 01, 2007
Posts: 59
|
|
|
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.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
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 is 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 ]
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: Appliation Server - HTML Include
|
|
|