Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 404 index.html文件出错_Java_Html_Http Status Code 404_Web.xml_File Structure - Fatal编程技术网

Java 404 index.html文件出错

Java 404 index.html文件出错,java,html,http-status-code-404,web.xml,file-structure,Java,Html,Http Status Code 404,Web.xml,File Structure,当我运行我的项目时,我得到一个404错误,我的JBoss服务器运行正常 以下是index.html中的: <html> <body> <form action="/services/customers" method="post"> First Name: <input type="text" name="firstname"/><br/> Last Name: <input type="text" name="lastname

当我运行我的项目时,我得到一个404错误,我的JBoss服务器运行正常

以下是index.html中的:

<html>
<body>

<form action="/services/customers" method="post">
First Name: <input type="text" name="firstname"/><br/>
Last Name: <input type="text" name="lastname"/><br/>
<INPUT type="submit" value="Send">
</form>

</body>
</html>

这也给了404一些关于如何让项目运行的想法

试着键入localhost并从浏览树中选择您的文件

我认为问题在于
。jsf库找不到您的页面

尝试将
更改为
*.jsf


然后将
重命名为index.jsf,并在index.html旁边创建一个空的index.jsf文件。

这样我就可以从它的位置启动文件了吗?抱歉,只是不太清楚你的意思。我们可以试试。/我不确定,但是你应该可以使用localhost,我从来没有在我的端口上输入过。
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web- app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<display-name>SIMS</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<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>javax.wcs.rs.Application</param-name>
<param-value>org.jboss.samples.webservices.MyRESTApplication</param-value>
</context-param>
<listener>
<listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
</listener>
<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>/faces/*</url-pattern>
</servlet-mapping>
</web-app>
http://localhost:8080/SIMS/index.html