Config
$CATALINA_HOME\conf\web.conf
1 | <servlet> |
When param listings
is true, /
can list all files
1 | <!-- The mapping for the default servlet --> |
The pattern mapping is this, for all no mapping servlet-mapping
request.
Process
1 | protected void doGet(HttpServletRequest request, |
- judge resource existence
- judge file readable
- set response head
content-type
base on file type - judge file time
- set response timeout
- stream operation