2016-07-26 86 views
0

我碰到这篇文章https://wiki.apache.org/tomcat/FAQ/Password 他们提到了使用资源实体来隐藏密码。我在哪里把资源实体文件放在〜tomcat /目录下?

我照他们建议把即

<!DOCTYPE Server [ 
<!ENTITY % resources SYSTEM "resources.txt"> 
%resources; 
]> 

在server.xml中和中提到

密码= “资源”;

而在resources.txt我只提到密码值说foo123。 然后我将resources.txt放置在〜tomcat/conf目录中,与放置server.xml的位置相同。

在catalina.out中我收到错误,如下面

Parse Fatal Error at line 1 column 1: The markup declarations contained or 
pointed to by the document type declaration must be well-formed. 

这种设置不工作。我不知道如何调试这个问题。 你能提出一些建议吗?

回答

0

下面是该解决方案是如何工作的:

resources.txt放在同一文件夹中的server.xml即tomcat的〜/ conf目录/

在resources.txt你需要将信息写入作为一个实体

<!ENTITY resources "foo1223"> 

资源标签这里应与你在server.xml中

提供了什么
相关问题