0
我在尝试重新配置最近加入的项目的欢迎页面时出现问题。 使用JBoss 7和Wildfly 10来测试应用程序,但是两台服务器都以同样的方式失败。欢迎文件列表被服务器忽略?
我希望能够通过这个URL来访问我的web应用程序:
http://localhost:8080/MaisAcoes/
而且我想这个URL显示“的index.xhtml”页面。
问题是:服务器总是在尝试打开“index.jsf”时显示错误404(因为此页面不存在)。它不打开“index.xhtml”页面。
web.xml中:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="3.1"
xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
<display-name>MaisAcoes</display-name>
<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>
<welcome-file-list>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
</web-app>
该页面的index.xhtml位于WebContent文件夹和正确部署...如果我尝试访问该页面直接(http://localhost:8081/MaisAcoes/index.xhtml),页面打开成功。
我在想什么?
确定它不仅仅是浏览器缓存?在隐身窗口中尝试。 – BalusC
@BalusC清理缓存解决了问题!我试图在服务器上执行完整的清理,但我永远不会想到问题出在浏览器的缓存上。非常感谢你! –
Typo web.xhtml? – Runcorn