Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322448

Summary: Provide a mechanism to add a custom look when serving static resources.
Product: [RT] Jetty Reporter: Jared Chapman <jaredjchapman>
Component: serverAssignee: Greg Wilkins <gregw>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: jaredjchapman, jesse.mcconnell, jetty-inbox, mgorovoy
Version: 7.2.0   
Target Milestone: 7.1.x   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
screenshot of the page of links styled with the default stylesheet
none
jetty-util patch
jesse.mcconnell: iplog+
jetty-servlet patch
jesse.mcconnell: iplog+
jetty-server patch jesse.mcconnell: iplog+

Description Jared Chapman CLA 2010-08-11 19:38:54 EDT
Created attachment 176421 [details]
screenshot of the page of links styled with the default stylesheet

The DefaultServlet and ResourceHandler can be used to serve out static content in the form of a typical directory-type listing of links.  I've provided a proposed mechanism for adding style to this listing of links by adding a reference to a stylesheet resource in the HTML generated in Resource.getListHTML(...).

If using the DefaultServlet, a stylesheet can be specified by providing its location as an init parameter.  If using the ResourceHandler, a stylesheet can be specified by providing its location with the same means as you would set the resourceBase on the ResourceHandler.

If no stylesheet is provided, a default stylesheet will be used to style the HTML.  

Thoughts/comments/suggestions?
Comment 1 Jared Chapman CLA 2010-08-11 19:39:40 EDT
Created attachment 176422 [details]
jetty-util patch
Comment 2 Jared Chapman CLA 2010-08-11 19:40:14 EDT
Created attachment 176423 [details]
jetty-servlet patch
Comment 3 Jared Chapman CLA 2010-08-11 19:40:41 EDT
Created attachment 176424 [details]
jetty-server patch
Comment 4 Greg Wilkins CLA 2010-08-16 10:47:27 EDT
thanks for the contribution!

applied in 2215 with a few minor tweaks, reformats and name changes.

cheers
Comment 5 Jesse McConnell CLA 2011-09-20 15:52:08 EDT
Resolved -> Closed