I'm using Intellij and GWT, I created a GWT project and Intellij has automatically created the directory structure. I have then tried to add an external image, however I am getting a 404 when trying to retrieve the image.
Project structure is below:
project
-- .idea
-- out
-- src
---- com.project
-------- client
-------- server
-------- project.gwt.xml
-- web
---- images
-------- myimage.png
---- WEB-INF
---- project.css
---- project.html
I am setting the image URL with:
img.setUrl(GWT.getModuleBaseURL() + "images/myimage.png");
I have read a few similar issues saying it need to be placed within an images folder within the war folder, however with intellij it has not generated a war folder, just the web folder, so I am thinking my issue may be around this.
I had no problems doing the same thing when using GWT with Eclipse however I now have to use Intellij.
You need to use:
img.setUrl("images/myimage.png");
web
folder is not related to GWT modules - it's the same for the entire app.