Bookmark Topic Watch 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator


A small app containing a servlet that can stream images from within the web application's directory structure using getResourceAsStream. Because the resources (images in this case) can only be accessed via the StreamServlet this technique could be used to allow access to specific resources to users who are logged into your application and deny them to the general public.

To Run:


  • Download SimpleStream.war to your TOMCAT_INSTALL/webapps directory. If you're using MSIE, make sure it doesn't change the extension to ".zip".
  • Then, click on this link: http://localhost:8080/SimpleStream


  • Donated by: Ben Souther




    CodeBarnServlets
     
    My cellmate was this tiny ad:
    Free, earth friendly heat - from the CodeRanch trailboss
    https://www.kickstarter.com/projects/paulwheaton/free-heat
      Bookmark Topic Watch Topic
    • New Topic