Java JBoss 网站:HTTP 状态 404
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19439540/
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
JBoss web: HTTP Status 404
提问by KorobOK
My JBoss AS7 is suddenly broke.
HTTP Status 404 - /Aaa
我的 JBoss AS7 突然坏了。
HTTP 状态 404 - /Aaa
type: Status report
message: /Aaa
description: The requested resource (/Aaa) is not available.
web.xml:
网页.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<welcome-file-list>
<welcome-file>MainPage.xhtml</welcome-file>
</welcome-file-list>
</web-app>
jboss-web.xml:
jboss-web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<context-root>/Aaa</context-root>
</jboss-web>
It was working fine earlier. In console any errors are absent. http://localhost:8080
and http://localhost:9990/console
renders normaly.
早些时候它工作正常。在控制台中不存在任何错误。http://localhost:8080
并http://localhost:9990/console
呈现正常。
采纳答案by Harald
Please check the deployment folder of JBoss. The servlet class should be there. If not, your compiling failed. If the class is there, restarting the JBoss service (eclipse, tab Servers, right mouse button on the server, restart) might solve the problem by forcing JBoss to reload the class files.
请检查 JBoss 的部署文件夹。servlet 类应该在那里。如果没有,则您的编译失败。如果类在那里,重新启动 JBoss 服务(eclipse,选项卡服务器,服务器上的鼠标右键,重新启动)可能会通过强制 JBoss 重新加载类文件来解决问题。