On 2/20/07, Daniele Dellafiore <[EMAIL PROTECTED]> wrote:
> Hi, I am getting crazy on loading an image from a file saved on a
> "custom" folder on the server.
> The folder layout is such that we have: "web/WEB_INF". My image files
> are in "web/upload" for no particular reason, I can put them anywhere
> I want.
>
> Depiste this, I cannot figure out how to load images! Examples are
> related to files that are in source folders (and I cannot do this) and
> other examples just create a custom BufferedImage.
>
> I have tried with this code:
>
>
>                 final String uriString = "/upload/" + pathname;
>                 File file = new File("");
>                 BufferedDynamicImageResource resource = new 
> BufferedDynamicImageResource();
>                 try {
>                         file = new File(".", uriString);
>                         BufferedImage image = ImageIO.read(file);
>                         resource.setImage(image);
>                 } catch (IOException ex) {
>                         LogFactory.getLog(getClass()).info("pathname " + 
> pathname);
>                         LogFactory.getLog(getClass()).info("IO Exception: " + 
> file);
>                 }
>

Sorry, email sent before was completed.

I am not able to find out resources and I am wondering if I am
following the right wicket way to load images.
See that I am not trying to load this way images for buttons or such,
this images are part of my archive but they are not stored in the DB,
just saved directly on the file system.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to