File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 3226
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:
subject: JSP Include
It's not a secret anymore!