File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes include tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "include tag" Watch "include tag" New topic

include tag

Vandiyadevan senthan
Ranch Hand

Joined: Nov 11, 2003
Posts: 37
Hi All,

Could you please advice me whether can we include image using <%@include %> tag in jsp?
ie.,<%@include file="../images/image.jpg"%>.I tried ,but i could not.

But when I include that image in html file and after trying with this code ie.,<%@ include file="<filename>.html" %>(included image in html page using <img> tag.It works fine.

Pls clear this.

Warm Regards,
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

A simple HTML 'img' tag will suffice.
The browser will make a separate request for the image.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: include tag
jQuery in Action, 3rd edition