这是我的问题。例如,我有一些HTML文件Description.html,它包含类似这样的内容
Bill.jpg与html文件在同一目录中。
此外,我还有UiBinder小部件,其中包含名为面板的SimplePanel。
在这个小部件的ui.xml中看起来像
...
...
此小部件的构造函数是:
public SomeWidget() {
initWidget(uiBinder.createAndBindUi(this));
panel.setWidget(new HTMLPanel(HtmlTextResources.htmlFile().getText());
}
问题点 - bill.img 不显示。
控制台显示
> [WARN] 404 - GET /bill.jpg (127.0.0.1) 1373 bytes Request headers
> Host: 127.0.0.1:8888
> Connection: keep-alive
> Cache-Control: no-cache
> Accept: image/webp,*/*;q=0.8
> Pragma: no-cache
> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153
> Safari/537.36
> *****************
> Accept-Encoding: gzip,deflate,sdch
> Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4,it;q=0.2,uk;q=0.2 Response
> headers
> Content-Type: text/html;charset=ISO-8859-1
> Cache-Control: must-revalidate,no-cache,no-store
> Content-Length: 1373
我如何解决这个问题?通过html使用图片是必要的