This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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

Win a copy of Android Security Essentials Live Lessons this week in the Android 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
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: include tag
Similar Threads
server side includes
Editing html tags in a *.htm file
Jsp Error
write byte[] to file?