Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322448 - Provide a mechanism to add a custom look when serving static resources.
Summary: Provide a mechanism to add a custom look when serving static resources.
Status: CLOSED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: server (show other bugs)
Version: 7.2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 7.1.x   Edit
Assignee: Greg Wilkins CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-11 19:38 EDT by Jared Chapman CLA
Modified: 2011-09-20 15:52 EDT (History)
4 users (show)

See Also:


Attachments
screenshot of the page of links styled with the default stylesheet (33.68 KB, image/gif)
2010-08-11 19:38 EDT, Jared Chapman CLA
no flags Details
jetty-util patch (1.30 KB, application/octet-stream)
2010-08-11 19:39 EDT, Jared Chapman CLA
jesse.mcconnell: iplog+
Details
jetty-servlet patch (2.43 KB, application/octet-stream)
2010-08-11 19:40 EDT, Jared Chapman CLA
jesse.mcconnell: iplog+
Details
jetty-server patch (3.05 KB, application/octet-stream)
2010-08-11 19:40 EDT, Jared Chapman CLA
jesse.mcconnell: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
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