java ee - WAR: Should web pages be inside WEB-INF directory or out of it -
java ee 7 documentation
https://docs.oracle.com/javaee/7/tutorial/packaging003.htm
suggest web pages should out side of web-inf
directory while of times see them in places root/web-inf/view
or root/web-inf/jsp
etc.
could body describe strategy should followed , not?
i recommend pages stored under web-inf.
if they're outside may open security hole. web container protects web-inf users not able access contents unless application directs them there. aligned web (java) frameworks when resolve views , generate actual web contents.
storing plain view files outside web-inf may work (for example if serve plain html or old school jsp files) may alleviate processing web layer does.
best keep view files (not pages!) inside web-inf , have web framework (jsf, spring mvc, struts, ...) deal them.
Comments
Post a Comment