gpt4 book ai didi

authentication - 自定义tomcat的用户认证弹窗

转载 作者:行者123 更新时间:2023-11-28 22:07:09 24 4
gpt4 key购买 nike

我想自定义弹出的对话窗口,要求用户进行身份验证。我正在使用 tomcat 基本身份验证;目前,当用户点击 protected 页面时,他们会看到一个对话框,上面写着

A username and password are being requested by http://localhost:8080. The site says: "Authentication required"

我很确定我在某处读到可以更改此消息。有人知道如何或在哪里吗?

最佳答案

Tomcat 正在使用您可以在 web.xml 中配置的域名

  <login-config>
<auth-method> BASIC </auth-method>
<realm-name> Example Basic Authentication </realm-name>
</login-config>

参见,例如 http://oreilly.com/java/archive/tomcat-tips.html

关于authentication - 自定义tomcat的用户认证弹窗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6668314/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com