0

Eclipse + JBoss + RESTEasy を使用して動的 Web アプリケーションを作成し、新しいプロジェクトに取り組みました。シェルを起動して実行しようとしています。

私のプロジェクト エクスプローラーには、次のルート プロジェクト->WebContent->index.html があります。

に行くとhttp://localhost:8080/helloWorld/index.html 、次のエラーが表示されます。

description The requested resource (/helloWorld/index.html) is not available.

添付は私のweb.xmlです

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="3.0"
 xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
 <display-name>helloWorld</display-name>
 <context-param>
  <param-name>javax.ws.rs.Application</param-name>
  <param-value>com.test.helloWorld.webservices.MyhelloWorldApplication</param-value>
 </context-param>
 <listener>
  <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
 </listener>
 <servlet>
  <servlet-name>Resteasy</servlet-name>
  <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
 </servlet>
 <servlet-mapping>
  <servlet-name>Resteasy</servlet-name>
  <url-pattern>/*</url-pattern>
 </servlet-mapping>
 <context-param>
   <param-name>resteasy.scan</param-name>
   <param-value>true</param-value>
</context-param>
<context-param>
   <param-name>resteasy.servlet.mapping.prefix</param-name>
   <param-value>/</param-value>
</context-param>
 <welcome-file-list>
  <welcome-file>/www/index.html</welcome-file>
 </welcome-file-list>
</web-app>
4

1 に答える 1

0

You mapped the resteasy servlet to /*. So if you don't have a JAX-RS controller mapped to /index.html, this is expected.

于 2013-07-24T21:10:00.723 に答える