aspose file tools*
The moose likes JSP and the fly likes Regarding Include directive element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Regarding Include directive element" Watch "Regarding Include directive element" New topic
Author

Regarding Include directive element

karthikeyan piramanayagam
Greenhorn

Joined: Feb 16, 2006
Posts: 22
Hi Friends,

Is it possible to include a "gif" file in a JSP page

I have used the following syntax:

<%@ include file="feather.gif" %>

But im not getting the output. Is there any way to include an image in our JSP file?

Plz help me as soon as possible

Regards...
P.karthikeyan
Kj Reddy
Ranch Hand

Joined: Sep 20, 2003
Posts: 1704
Use img html tag to include gif. The syntax looks like this:

<img src="feather.gif">
karthikeyan piramanayagam
Greenhorn

Joined: Feb 16, 2006
Posts: 22
No, still im not getting it. Actually its not like servlet,Jsp, its something like jetspeed,one of the tool to develope websites. Its a different frame work, so using img i dint get it. Do u know any other way using JSP

Regards...
P.karthikeyan
Kj Reddy
Ranch Hand

Joined: Sep 20, 2003
Posts: 1704
do not know aboout jet speed..

you can try this but not sure it will work
out.print("<img src='feather.gif'>");
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

The right way to put an image in a page is with the <img ..> tag.
If it's not working, it is most likely due to the path, listed in the src attribute, being wrong.

Where is your image file and what are you entering for the src attribute?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regarding Include directive element
 
Similar Threads
Inheritence with JSP
Unable to read file
can i include portion of jsp using include tag
Include page to div
Wordpress and jsp