Try this one in your RemoteServiceServlet
class to get the absolute path
of any resources placed under war
directory that will be actually the path of server directory when deployed on server.
String pngFullPath = this.getThreadLocalRequest().getSession().getServletContext()
.getRealPath("images/1.png");
System.out.println(pngFullPath);
String icoFullPath = this.getThreadLocalRequest().getSession().getServletContext()
.getRealPath("favicon.ico");
System.out.println(icoFullPath);
output:
D:\Workspace\GWTProject\war\images\1.png
D:\Workspace\GWTProject\war\favicon.ico
Now change it as per the placement of test.jrxml
file in your project.
here is the project structure: