私は最近参加したプロジェクトのウェルカムページを再設定しようとして問題があります。 JBoss 7とWildfly 10を使用してアプリケーションをテストしますが、両方のサーバーが同じ方法で失敗します。welcome-file-listがサーバーによって無視されていますか?
私はこの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