*
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "include tag" Watch "include tag" New topic
Author

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,
Senthan
Ben Souther
Sheriff

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
 
Consider Paul's rocket mass heater.
 
subject: include tag
 
Similar Threads
server side includes
html
Editing html tags in a *.htm file
Jsp Error
write byte[] to file?