wood burning stoves 2.0*
The moose likes Servlets and the fly likes JSP Include Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP Include" Watch "JSP Include" New topic

JSP Include

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I need to include a html file in jsp . this html file is retrieved from a bean. how do I set this html file in jsp include .
for eg
string s3 = bean.getsomething();
s3 is a html file like xxxx.html.
s3 will be populated at runtime thru scriplets.
I need to include this in JSP:include.
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944

relative path
<%@ include file=htmloranyfile %> or
<%@ include file=s3 %>
Tony Alicea

Joined: Jan 30, 2000
Posts: 3222
A "cheat sheet" is available in PDF format from Sun on the JSP tags:

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
I agree. Here's the link: http://aspose.com/file-tools
subject: JSP Include
Similar Threads
html within html?
How to include a HTML in JSP at runtime?
include a html page in JSP file
Why is Runtime.getRuntime().exec() not working in JSP?
This weeks giveaway