• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Execution difference on Application Server

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I experienced a problem of retrieving a gif image from a servlet path, e.g. (http://localhost/folder/resource?id=xxxxxxxxx) when executing the code on the application server. But executing the path on the browser returns the image, and working with a simple java class in command compilation and execution returns the gif as well.
The Application server used is SilverStream eXtend Application Server 3.7.3.
Please if anyone has any experience such, lend a hand.. URGENT.
Regards
-Hean Hean
 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The path that a servlet can see is based on where
the servlet is installed in the application server.
Your servlet can do something like this:
ServletContext myContext = getServletContext();
String rootPath = myContext.getRealPath("") + "/";
Write out that String and you will know what the
servlet can see. You should put the files that you
want the servlet to use below that rootPath. Check
the Servlet information at
http://java.sun.com/products/servlet/index.html
and check the documentation for your app server.
HTH,
Joe
[ January 18, 2002: Message edited by: Joe Gilvary ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic