Win a copy of Hello World this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

how to access images outside of GWT war file in jetty server

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

Needs some urgent tips if some one might have faced this before :

i am deploying a gwt WAR application in jetty server . in the client gwt classes inside WAR is rendering images . i wanted to keep all the images outside of the WAR file and needs to access images inside my gwt application . The reason being i wanted to keep images outside of WAR files because my images are keep changing for my application , so i wanted to keep put of WAR file .

Does anybody can provide me some tips about how to acccess these external images inside my GWT java classes ?

i am having a feeling like , GWT web application container is bit different from rest J2EE web container ..

Thanks,
Guru
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been trying to do exactly the same thing today and came across this post (coincidentally posted yesterday :-)
I can't believe this is not a common requirement, but I haven't found a solution yet..
Please post back here if you find a solution and so will I.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming you put your files in the following locations:

jetty/webapps/root.war
jetty/webapps/files/example.jpg

and your application is accessible on example.com

then you would access example.jpg from your clientside code as following:

relative: "/files/example.jpg"
or absolute: "http://example.com/files/example.jpg"


 
no wonder he is so sad, he hasn't seen this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!