码头返回403禁止 [英] Jetty returning 403 Forbidden

查看:129
本文介绍了码头返回403禁止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将我的Web应用程序从tomcat移植到Jetty.我正在使用Jetty运行器来启动它. 我正在使用以下命令启动Jetty:

Hi I am porting my web app from tomcat to Jetty. I am using the Jetty runner to launch it. I am using the following command to launch Jetty:

java -jar jetty-runner.jar --port --path url-path-war路径

java -jar jetty-runner.jar --port --path url-path path-to-war

但是,当我尝试从浏览器浏览到时,出现以下错误:

However when I try to browse to the from the browser I get the following error:

HTTP错误403

HTTP ERROR 403

问题访问.原因:

Forbidden

在日志中,我看到以下警告:

In the logs i see the following Warning:

WARN:oejs.SecurityHandler:没有用于以下身份验证器:{RoleInfo,C [*, all_auth_users]}

WARN:oejs.SecurityHandler:No authenticator for: {RoleInfo,C[*, all_auth_users]}

我试图开箱即用地使用Jetty,并且尚未在任何地方自定义任何配置.要进行这项工作,是否需要任何其他配置?

I am trying to use Jetty out of the box and haven't customized any config anywhere. Is there any additional configuration required to make this work?

推荐答案

可能的原因:您的war/webapp定义了安全性约束,但尚未指定要在服务器端使用的身份验证类型.

Likely cause: your war/webapp has security constraints defined, but you haven't specified what authentication type to use on the server side.

要么:

  • 从war/webapp WEB-INF/web.xml文件中删除<security-constraint>.或..
  • 在服务器端添加身份验证方案.在etc/jetty-testrealm.xml中查看使用HashLoginService身份验证器的示例.
  • Remove your <security-constraint> in your war/webapp WEB-INF/web.xml file. or..
  • Add an Authentication scheme on the server side. Look at etc/jetty-testrealm.xml for an example using the HashLoginService authenticator.

这篇关于码头返回403禁止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆