【发布时间】:2015-11-23 03:55:19
【问题描述】:
我是初学者,我的 Apache Wicket 应用程序有问题。这是一个 Hello World 应用程序,但我添加了一个文本框。
我使用一些教程完成了该应用程序,它运行良好,但是当我更改了 html 文件和 java 文件中的某些内容时。我收到 HTTP 状态 404 错误。我找到了一个修复程序,您必须将编译器合规级别更改为当前级别以外的其他内容。然后,如果您运行它,它将再次完美运行,但如果您再次更改某些内容,它将给出相同的错误。我使用 tomcat 作为 servlet。
我必须更改并更改级别以使其再次工作。有人能帮我吗。
<?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" id="WebApp_ID" version="3.0">
<display-name>Wicket</display-name>
<filter>
<filter-name>Application</filter-name>
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
<init-param>
<param-name>applicationClassName</param-name>
<param-value>com.ibm.app.HelloWorldApplication</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Application</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
我有这个 html 文件
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org">
<head>
<style>
label {
background-color: #eee;
padding: 4px;
font-size: 102px;
}
.feedbackPanelERROR {
color: red;
}
</style>
</head>
<body>
<h1 wicket:id="greeting">This is greeting from web page.</h1>
<h1>Creating a Text Box</h1>
<div wicket:id="feedback"></div>
<form wicket:id="userForm">
<p>
<label>Username</label>:
<input wicket:id="username" type="text" size="20" />
</p>
<input type="submit" value="Register" />
</form>
</body>
</html>
java 文件是 Quickstart hello world 教程和本教程的组合
【问题讨论】:
标签: apache http-status-code-404 wicket