java Wildfly:如果我调用我的 Web 应用程序,为什么我只会得到“禁止”?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/35036646/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Wildfly: Why I get only "Forbidden" if I call my Web application?
提问by Steffen
Yesterday our web application ran fine on WildFly 9. Since this morning I get only a "Forbidden" in the web browser. We don't use JAAS. There is also no difference if I set the following value to false
in the standalone.xml
:
昨天我们的 web 应用程序在 WildFly 9 上运行良好。从今天早上开始,我在 web 浏览器中只看到一个“禁止”。我们不使用 JAAS。也没有区别,如果我下面的值设置为false
在standalone.xml
:
...
<subsystem xmlns="urn:jboss:domain:ejb3:3.0">
...
<default-missing-method-permissions-deny-access value="true"/>
...
</subsystem>
...
What can be the reasons that WildFly only shows the "Forbidden" page?
WildFly 只显示“禁止”页面的原因是什么?
EDIT
编辑
If I set the log level for package org.jboss.security
to TRACE
I get the following message in the log file while calling the page:
如果我将包的日志级别设置org.jboss.security
为TRACE
我在调用页面时在日志文件中收到以下消息:
2016-01-27 12:58:15,354 TRACE [org.jboss.security] (default task-5) PBOX00354: Setting security roles ThreadLocal: null
Not sure what this means ...
不知道这是什么意思...
采纳答案by Steffen
My EAR project and the inherited WAR project in eclipse was broken. There were several things missing like at example the application.xml
.
我的 EAR 项目和 eclipse 中继承的 WAR 项目坏了。缺少一些东西,例如application.xml
.
Not sure why these things are missing and where I have lost it. But after fixing both projects deployments it works again.
不知道为什么这些东西丢失了,我在哪里丢失了它。但是在修复两个项目部署后,它又可以工作了。
回答by pravin chaudhari
That build must be corrupted. Re-build the application, create war again and deploy it again. It will work.
该构建必须已损坏。重新构建应用程序,再次创建War并再次部署它。它会起作用。
回答by Bruno L.
That can occur if you do not have any index.htmlfile at the root of the war file (in WebContent in Eclipse)or your write it wrongly like: Index.html
如果您在 war 文件的根目录中没有任何index.html文件(在 Eclipse 中的 WebContent 中)或者您错误地编写它,例如:Index.html,就会发生这种情况
Same issue if <welcome-file>
is not properly set up in WEB-INF/web.xmldescriptor
如果<welcome-file>
未在WEB-INF/web.xml描述符中正确设置,也会出现同样的问题