Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP Syntax for including an external file in the DOM when rendering the page in a browser

 
Justin White
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi There,

We have a website hosted using a asp system.

What I would like to know is: is there a way to include an external file e.g. http://www.site.com/snippet_of_html.htm

Could I do the following?:

<html>

<body>

<jsp:include page=http://www.site.com/snippet_of_html.htm"/>

</body>

</html>
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65535
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JSTL <c:import> tag will import external files.

But I'm confused by your mention of ASP. JSP syntax won't work in an ASP environment.
 
Justin White
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I meant JSP, basically I'm using a cms system built for JSP and run on a JSP server so what I'm looking for is a way to avoid having to copy/paste HTML in the box for page content. Currently I'm using an iframe, which lets call a spade a spade here, is tedious at best and that's without getting into the style sheet issues... So basically I need to import HTML from a source that may or may not be on the same domain and on page load it should read as being part of the DOM and not as a separate entity as it is currently doing.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65535
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<c:import>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!