Получение «Исходный сервер не нашел текущего представления для целевого ресурса или не хочет раскрывать, что он существует». - PullRequest
0 голосов
/ 31 декабря 2018

Я прочитал этот вопрос , который предлагает добавить index.html, и я сделал это, в дополнение к добавлению его в мой <welcome-file-list>.Ошибка по-прежнему сохраняется.

Я использую TomEE 8.0.0-M1 с Java EE8 (и, следовательно, JSF 2.3), Java 11 и выполняю это через Intellij.

web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app 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_4_0.xsd"
         version="4.0">
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>

    <servlet>
        <servlet-name>FacesServlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>FacesServlet</servlet-name>
        <url-pattern>*.xhtml</url-pattern>
    </servlet-mapping>

    <welcome-file-list>
        <welcome-file>index.xhtml</welcome-file>
    </welcome-file-list>
</web-app>

Структура проекта

enter image description here

Веб-фасет

enter image description here

Ошибка

Type: Status Report

Message: Not found

Description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

URL-адреса, которые я пробовал

http://localhost:8080
http://localhost:8080/MeetPatient
http://localhost:8080/MeetPatient/web

Что я должен сделать, чтобы найти index.xhtml?

...