RE: [jetty-user] How to link to images from servlet

andrej rolih <[email protected]>
Newsgroups gmane.comp.java.jetty.support
Message-ID <[email protected]>
Can you explain this a little? What sort of filter? How can I implement it? All I want is to display images in the servlet. Problem is that I don't know how to get to them. Oh and the server itself is embedded into my application - if this changes anything.

Date: Wed, 23 Feb 2011 18:12:33 -0800
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [jetty-user] How to link to images from servlet



  


    
    Message body
  
  
    On 2/23/2011 5:20 PM, andrej rolih wrote:
    
      
      Hi!
      

      I have a one ServletContextHandler with one servlet added - with
      path "/*". Problem is that I don't know how to serve a simple
      image/stylesheet. If I open localhost:8080/ my servlet appears, if
      I open localhost:8080/whatever my servlet appears ... I want / to
      be reserved for the servlet but I need something like /files to
      serve my images/stylesheets. Problem is that I don't know how to
      serve static contect inside my servlet.
      

      

      Thank you for any help! 
    

    It sounds like a filter would better suit your needs.

    

    -- 
Lobos Studios - Website Design, Programming, IT Support
Phone: 877.919.4WEB (877.919.4932) (Toll-free)
Phone: 760.684.8859 (Victor Valley)
www.LobosStudios.com -- www.facebook.com/LobosStudios
www.twitter.com/LobosStudios
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.