我无法正确设置我的应用程序欢迎文件以正确重定向到我的 home.xhtml 我试图在 SO 中搜索,但我似乎无法让它工作..对不起..
在我的 web.xml 中,我有这些
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
我的 index.jsp 有这个
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<head>
<title>My App</title>
</head>
<body>
<c:redirect url="/faces/pages/home.xhtml"></c:redirect>
</body>
</html>
当我访问我的应用程序时:
http://localhost:8080/myApp
我什么也没得到,也没有重定向。
有什么问题?