Hi Maxim,

I tried that method. In my web app I can access a image using this url,

http://localhost:8080/ClipArts/images.jpeg

Then I tried,

((WebApplication)
WebApplication.get()).getServletContext().getRealPath("ClipArts")
((WebApplication)
WebApplication.get()).getServletContext().getRealPath("ClipArts/images.jpeg")
((WebApplication)
WebApplication.get()).getServletContext().getRealPath("/ClipArts/images.jpeg")

Each of these cases it return null. Also I am suing this code inside a
Constructor of a Custom behavior. What can be the reason?

Thanks!



On Wed, Aug 28, 2013 at 4:46 PM, Maxim Solodovnik <solomax...@gmail.com>wrote:

> ((WebApplication) WebApplication.get()).getServletContext()
> .getRealPath("images")
>
>
> On Wed, Aug 28, 2013 at 6:11 PM, Andun Sameera <andun...@gmail.com> wrote:
>
> > Hi All,
> >
> > I have a use case like this which needs some help. There is folder in my
> > web app called images. There are some images in that folder which are
> > dynamically added. In my application, I want to list down URLs for all
> > these images. Can any one give me some hints ?
> >
> > Thanks!
> >
> > --
> > Regards
> > Andun S.L. Gunawardana
> > Undergraduate
> > Department of Computer Science And Engineering
> > University of Moratuwa
> > Sri Lanka
> >
> > Blog - http://www.insightforfuture.blogspot.com/
> > LinkedIn - http://www.linkedin.com/pub/andun-s-l-gunawardana/34/646/703
> > Twitter -http://twitter.com/AndunSLG
> >
>
>
>
> --
> WBR
> Maxim aka solomax
>



-- 
Regards
Andun S.L. Gunawardana
Undergraduate
Department of Computer Science And Engineering
University of Moratuwa
Sri Lanka

Blog - http://www.insightforfuture.blogspot.com/
LinkedIn - http://www.linkedin.com/pub/andun-s-l-gunawardana/34/646/703
Twitter -http://twitter.com/AndunSLG

Reply via email to