• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Serving Content from Outside the context

 
ruchi thakur
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am using Jboss-4.0.5 application 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=C:/html/static/temp.html
then JSP include tag is considering path as /sample/C:/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
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this of any help?
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use the <c:import> tag which is part of the JSTL.
With this tag you could access outside the container.

Maybe the following link will help Difference between jsp:include and c:import
 
ruchi thakur
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank In tonnss!!
<c:import> worked for me
Regards,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic