Strona powitalna w REST z Java (JAX-RS) za pomocą Jersey

Wdrażam Restful Web Service za pomocą Jersey. Chcę wyświetlić index.jsp jako stronę powitalną.

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Rest Page</title>
    </head>
    <body>
        <h1>Rest is working!</h1>
    </body>
</html>

Działa dobrze, gdy używam tego kodu w moim pliku web.xml:

<servlet-mapping>
    <servlet-name>Jersey REST Service</servlet-name>
    <url-pattern>/whatever/*</url-pattern>
  </servlet-mapping>

  <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

Problem polega na tym, że wzór użytkownika jest taki:

<url-pattern>/*</url-pattern>

Wszystko działa dobrze z wyjątkiem strony powitalnej. Doceniam wszelką pomoc.

questionAnswers(2)

yourAnswerToTheQuestion