这是错误日志,有人可以帮我看看可能会磨损什么吗?
In-place deployment at E:\Pavan\Java Web Apps\WebApplication2\build\web
Initializing...
deploy?DEFAULT=E:\Pavan\Java Web Apps\WebApplication2\build\web&name=WebApplication2&contextroot=/WebApplication2&force=true failed on GlassFish Server 3+
Error occurred during deployment: Exception while deploying the app [WebApplication2] : Deployment descriptor file WEB-INF/web.xml in archive [web]. Element [servlet] is not a valid root element. Please see server.log for more details.
E:\Pavan\Java Web Apps\WebApplication2\nbproject\build-impl.xml:1022: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 2 seconds)
这是我的web.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<servlet>
<servlet-name>
Example
</servlet-name>
<servlet-class>Exmple Servlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Example</servlet-name>
<url-pattern>/Example/*</url-pattern>
</servlet-mapping>
<web-app 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"
version="3.0">
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
</web-app>
我的主要目标是创建一个简单的文件来接受用户名和密码,然后将其显示在另一个页面上。