Hi Aditya, Well I have two apps, once is an App Engine variant, and they are a little different in their response, although neither will display the image.
My App Engine version (when running in hosted mode) displays in red on the console that two files can't be found: Aug 9, 2010 10:13:51 PM com.google.appengine.tools.development.LocalResourceFileServlet doGet WARNING: No file found for: /favicon.ico Aug 9, 2010 10:17:54 PM com.google.appengine.tools.development.LocalResourceFileServlet doGet WARNING: No file found for: /mywebapp/GoogleCode.png The hosted mode of the non-App Engine version types out some kind of information that looks like header info or request info, but no paths or filenames. In the browser, the image just doesn't show up, ( unless I use a full URL, that is. ) -Kevin On Aug 9, 5:23 am, aditya sanas <[email protected]> wrote: > do you get any error message while doing this...? > probably that might help you to track exactly where it is searching > for googlecode.png. > > -- > Aditya > > > > On Mon, Aug 9, 2010 at 2:44 PM, kstokes <[email protected]> wrote: > > I'm using Eclipse on Windows. > > > I have added a GWTCanvas to the demo app and am trying to load an > > image and display it with code which is > > omething like this: > > >http://code.google.com/p/google-web-toolkit-incubator/wiki/ImageLoader > > > My problem is that the image only loads and displays if I have a > > complete URL like > > > // String[] imageUrls = new String[] {" > >http://www.knivesplus.com/ > > media/SC-104OT.jpg"}; /* This works fine */ > > String[] imageUrls = new String[] > > {"images/GoogleCode.png"}; /* > > This does not work. */ > > > However, I have created an 'images' folder in my war folder in > > Eclipse, and the following image in the HTML displays just fine: > > <img src="images/GoogleCode.png"><img> > > > I don't understand why the app has no problem reading the image from > > the relative path when displaying the HTML, but cannot find the image > > using the ImageLoader class. > > > What can I do so that I can add images to my eclipse project which I > > can then use with GWTCanvas? > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Web Toolkit" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<google-web-toolkit%2Bunsubs > > [email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
