我需要设置表单 validator 的 landingPage 属性。我看到 The Form Authenticator Valve 支持像 landingPage 这样的配置属性。
http://www.ide.iitkgp.ernet.in/docs/config/valve.html#Form_Authenticator_Valve
我试过这样设置
<Valve className="org.apache.catalina.authenticator.CustomFormAuthenticator856" landingPage="/Landingpage.do"/>
但在添加此服务器后,它本身无法正常工作。那么如何在 server.xml 中指定属性。
最佳答案
为什么你有“org.apache.catalina.authenticator.CustomFormAuthenticator856”作为 className?它不在 Tomcat 文档中。 FormAuthenticator 的正确值为“org.apache.catalina.authenticator.FormAuthenticator”。 我还认为 landingPage 不需要前导“/”。
所以你的阀门标签应该是:
<Valve className="org.apache.catalina.authenticator.FormAuthenticator" landingPage="Landingpage.do"/>
关于java - 如何设置 FormAuthenticator 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57692150/