[英]HTTP Status 404 - The requested resource (/BookStore/index.html) is not available
[英]Dynamic Web Application The requested resource (/helloWorld/index.html) is not available
使用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>
您将resteasy servlet映射到/*
。 因此,如果您没有映射到/index.html
的JAX-RS控制器,则可以预期。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.