简体   繁体   English

Servlet中的属性文件位置

[英]Properties files location in Servlets

Is it safe to store .properties in WEB-INF/classes ? .properties存储在WEB-INF/classes .properties中是否安全? Can anybody see its content via browser? 有人可以通过浏览器查看其内容吗?

WEB-INF is not directly accessible from a browser, so most normal browser activity should not find it. 无法从浏览器直接访问WEB-INF ,因此大多数正常的浏览器活动都找不到它。

However, if the server does not restrict navigation by .. (parent of), many things on the server may become visible that were never meant to be. 但是,如果服务器不以..(的父项)限制导航,则服务器上的许多内容可能会变得可见,而这本来是不应该的。 (Yes, that is improper implementation, but humans are involved.) (是的,这是不正确的实现,但是涉及到人。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM