I deployed war file with some static resource (.zip) on glassfish server @ physical location {WebAppRoot}/resources/WebFiles/zippedFiles/{FileName}.zip
so for downloading/accessing file from browser relative path or URI will be {domain.com}/resources/WebFiles/zippedFiles/{FileName}.zip
.Someday before i am trying to enable resume support for downloading such files after some Googleing i come to know that i have to tell glassfish that .zip file is an static content,so after adding
<servlet-mapping>
<servlet-name>DefaultServlet</servlet-name>
<url-pattern>.zip</url-pattern>
</servlet-mapping>
Resume support is enabled.
So my question is,Before adding <servlet-mapping>
how the .zip file is served? Is that file handled by DispatcherServlet (Dynamic content)? How the server knows URI({domain.com}/resources/WebFiles/zippedFiles/{FileName}.zip
) is of an file not the controller or JSP (view) for which DispatcherServlet is resposible.
And one last what is benefit of adding such <servlet-mapping>
?
There is a 'default servlet' that handles all unmapped resources.