| Summary: | Provide a mechanism to add a custom look when serving static resources. | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Jared Chapman <jaredjchapman> | ||||||||||
| Component: | server | Assignee: | 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: |
|
||||||||||||
Created attachment 176422 [details]
jetty-util patch
Created attachment 176423 [details]
jetty-servlet patch
Created attachment 176424 [details]
jetty-server patch
thanks for the contribution! applied in 2215 with a few minor tweaks, reformats and name changes. cheers Resolved -> Closed |
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?