• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Appliation Server - HTML Include

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
I can't take it! You are too smart for me! Here is the tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic