This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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
It's not a secret anymore!