[thelist] need help loading default image, then changing it with actual image

Chris Johnston fuzzylizard at gmail.com
Tue Nov 15 23:48:20 CST 2005


On 11/15/05, Hassan Schroeder <hassan at webtuitive.com> wrote:
>
> Chris Johnston wrote:
>
> >
> > File file = new File("images/big/" + document.getFileType() + ".png");
> > boolean iconExists = file.exists();
> >
>
>
> Always more than one way to do it :-)
>
>
This is true. Actually what I was trying to do worked. As soon as I moved
the war file to a stand alone implementation of Tomcat. I was trying to run
the app using the embedded Tomcat server in NetBeans which tends to mess
with the way an app is deployed in order to get it to work.

As soon as I deployed the war file properly (in the webapps directory) the
code started to work.

Thank you for your suggestions and ideas though. I am going to have to
remember the ServletContext.getRealPath() method. That could come in handy
in the future.

Chris

--
www.fuzzylizard.com <http://www.fuzzylizard.com>



More information about the thelist mailing list