Re: [displaytag-user] displaying image using displaytag
Brought to you by:
fgiust
From: Eve P. <gor...@ms...> - 2009-09-23 11:27:09
|
Yes, You are right. eve From: mi...@al... To: dis...@li... Date: Wed, 23 Sep 2009 11:56:29 +0100 Subject: Re: [displaytag-user] displaying image using displaytag Hello all, Isn't this an issue with how different containers handle relative and absolute paths? Just my two cents. Miguel On Wed, 2009-09-23 at 10:20 +0100, Eve Pokua wrote: Hello Ibraham, mike, and W. OS It seems like I am not alone on this issue. Please see the following thread from glassfish users. I'm going to install tomcat and test my application and update you on this. Thanking you for all your help. http://forums.java.net/jive/thread.jspa?messageID=365245 eve From: gor...@ms... To: dis...@li... Date: Tue, 22 Sep 2009 18:27:38 +0100 Subject: Re: [displaytag-user] displaying image using displaytag Mike, In tomcat jsp are placed in the - Installed - dir \tomcat\WORK\tomcat\ROOT and servlets are placed - E:\tomcat\WORK\tomcat\ROOT\web-inf\classes that's how I do mine in tocat. Of cause, the tomcat is a web server not a whole application server. I am using glassfish. Some body suggested placing in tomcat\Work\tomcat\ROOT\images images being the folder containing the images and ROOT would contain jsps. so construct as- > <display:column> > <img src="../images/${bpic}"/> > </display:column> in the database the string menjeans.png is contained in the table attribute. But in glassfish, as you may already know it works like this: I have created a project folder / dir using netbeans as e.g Enterappli Now my jsp files are in:- dir\Enterappli\Enterappli-war\web\viewapp.jsp my servlets are in- dir\Enterappli\Enterappli-war\src\java\myservletfiles\myservletcontrol.java Now I have my images folder in- Enterappli\Enterappli-war\images im the attribute on my table in the DB, I've menjeans.png which is a string. my servlet invoke the bean and forward data to my jsp as in the case of MVC design. Ok now my jsp already display the data except the pic. So how do I construct it: <display:column><img border="1" src="../images/${bpic}" height="200" width="200" title="Picture"/></display:column> bpic is an attribute of my table in the database. Pls, any suggestion. Thanking you in advance. eve > Date: Tue, 22 Sep 2009 18:59:22 +0200 > From: sg...@gm... > To: dis...@li... > Subject: Re: [displaytag-user] displaying image using displaytag > > Eve Pokua schrieb: > > Mike, > > > > I've done as suggested. Something seems to be working but not quite. > > > > I've put the images im my web-inf folder > > of my web client. Then I have stored the string in the table as > > menjeans.png > > > > then I access it as- > > > > <display:column><img border="1" src="/WEB-INF/${balpic}" height="200" width="200" title="Bale Picture"/></display:column> > > > > The browser has the x thing at the colomn of the picture. > > > > Hope I've understodd what you said but the problem is just > > the browser. > > Hi Eve, > > you almost did it. > > But keep in mind that the WEB-INF is an interna folder and is never > exposed to the outside world. You either move it elsewhere in your > webapp our your map it with a servlet. > > I don't know your usecase so I can't give an appropriate advice. > > Mike > > ------------------------------------------------------------------------------ > 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 > dis...@li... > https://lists.sourceforge.net/lists/listinfo/displaytag-user Beyond Hotmail - see what else you can do with Windows Live. Find out more. Beyond Hotmail - see what else you can do with Windows Live. Find out more. ------------------------------------------------------------------------------ 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 dis...@li... 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/ |