I\'m having trouble building an absolute URL from a relative URL without resorting to String hackery...
Given
http://localhost:8080/myWebApp/someSer
Looks like you already figured out the hard part, which is what host your are running on. The rest is easy,
String url = host + request.getContextPath() + "/someImage.jpg";
Should give you what you need.