image can show in debug mode, but not when deloyed to weblogic

30 views
Skip to first unread message

tong123123

unread,
Feb 9, 2012, 9:59:49 PM2/9/12
to Google Web Toolkit
in design time, the images is located at
war/Images/abc.png

and I have a class called Commons in client package and stored the
image location as string

public class Commons {
public static final String abc_path = "/Images/abc.png"
........
}

then in the page show image, I write the following
Image abc = new Image (Commons.abc_path);
HorizontalPanel imagePanel = new HorizontalPanel();
imagePanel.add(abc);
......

the image can show in development mode, but when compile and deployed
to weblogic,
the images folder still under war folder
war/Images/abc.png

but the image cannot be shown!!

what is the reason?

Paul Stockley

unread,
Feb 10, 2012, 1:12:49 PM2/10/12
to google-we...@googlegroups.com
Remove the initial '/' i.e.  "Images/abc.png"

There is a difference in the way devmode treats context paths.
Reply all
Reply to author
Forward
0 new messages