org.benow.web.css
Class CSSPathHandler
java.lang.Object
org.benow.web.path.PathHandler
org.benow.web.path.FileBasedPathHandler
org.benow.web.path.file.StaticContentPathHandler
org.benow.web.css.CSSPathHandler
public class CSSPathHandler
- extends StaticContentPathHandler
A small css path handler. Delivers as static, but checks to see if /path/some.custom.css exists
for requested css /path/some.css. If it does, the content of the custom css is appended to the
end of the requested css. This allows for the inclusion of the custom css which overrides
the custom css, and does so all in the same request, minimizing connection overhead.
Customizations to css (usually packaged in jars, such as benow-web.jar) can be done by creating
a file.custom.css.
- Author:
- andy
|
Method Summary |
boolean |
canHandle(java.lang.String path)
Return true if the handler can handle the given path. |
protected void |
deliverResource(java.lang.String requestPath,
org.benow.java.packager.resource.ResourceEntry resource)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CSSPathHandler
public CSSPathHandler()
canHandle
public boolean canHandle(java.lang.String path)
- Description copied from class:
PathHandler
- Return true if the handler can handle the given path. Path is in format /dir/childdir/item.ext. It will never be null
and will always start with a /.
- Overrides:
canHandle in class StaticContentPathHandler
- Returns:
deliverResource
protected void deliverResource(java.lang.String requestPath,
org.benow.java.packager.resource.ResourceEntry resource)
throws java.io.FileNotFoundException,
java.io.IOException
- Overrides:
deliverResource in class FileBasedPathHandler
- Throws:
java.io.FileNotFoundException
java.io.IOException