ED,
That helps. I am using glassfish. so where should i put the
images? please each row in the database has an image.
so in my attribute of my table, i suppose I should stored the location
of the image. e.g
c:/bapics
Then use the img tag as you've mentioned below. Please, most importantly
where should I put the images in glassfish?
<display:column>
> <img src="../images/${bpic}"/>
> </display:column>
Thank you. I really apprecaite all your help.
eve
> Date: Tue, 22 Sep 2009 09:36:23 +0100
> From: e...@mws-systems.co.uk
> To: displaytag-user@lists.sourceforge.net
> Subject: Re: [displaytag-user] displaying image using displaytag
>
> Eve Pokua wrote:
> > Micheal/ Ibraham.
> >
> > Thank you all.
> >
> >
> > But I am still having problems
> >
> > <td>
> > <div style=""><img border="1"
> > src="c:/bapics/<%=(bpic)%>" height="160" width="160"
> > title="picture2"/></div>
> > </td>
> >
> This will not work. the src attribute is used by the CLIENT's browser to
> find the image. The src above tells the client's browser to look on
> THEIR C drive for the image. It's unlikely to be there.
>
> >
> > I have the string Dock.jpg in an attribute in the table
> > If I use this:
> > <display:column property="bpic" title="Picture"/>
> > the string Dock.jpeg is displayed but not as image.
> No. Because DisplayTag is taking the property and outputting its value
> as a string. You need to put it into an img tag.
>
>
> >
> > All I want to do is tell the img tag src to display whatever .jpeg is
> > in the bpic attribute
> > to be display as image. Why I'm I having so much problems?
> >
> > It seems to work for this guy.-
> >
> > http://www.coderanch.com/t/453478/JSP/java/Displaying-images-dynamically-from-database
> >
>
> That's because his images are in a sub-folder relative to the location
> of his jsp page.
>
> Assuming you're using Tomcat:
>
> if your jsp page is at /ROOT/jsps/mytableofimages.jsp and your images
> are in /ROOT/images you can construct a <display:column> tag:
>
> <display:column>
> <img src="../images/${bpic}"/>
> </display:column>
>
> Which will tell the client browser to request the image from your web
> server's images folder.
>
> Of course if you're using a Servlet or Struts Action then the path to
> the image will be relative to the Servlet's location NOT the jsp page.
>
> Ed!
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> displaytag-user mailing list
> displaytag-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/displaytag-user
_________________________________________________________________
Get the best of MSN on your mobile
http://clk.atdmt.com/UKM/go/147991039/direct/01/
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user