java - Serving static content in a Tomcat webapp -


in tomcat webapp in circumstances should we
serve static content using tomcat default servlet
, in other case should placing it
in directories @ same level (not under, of course) of web-inf ?

i hope question clear enough,thanks.

files placed under web-inf not accessible via url cannot served static content. typically place there configuration files or other internals.

as static content, can use not need special access. example if content can seen depends on user logged in, need provide such logic in servlet , store files under web-inf otherwise, can "guess" correct url able retrieve them.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -