我正在关注教程http://javanetbeans.net78.net/kb/60/web/tutorial-webapps.html
当我到达“使用 servlet 创建前端控制器”部分时,我收到来自 Netbeans 的错误消息,指出“不支持 Web 应用程序版本”
使用 netbeans 6.8
任何人都能够解释为什么我收到这个提示?
这是我的 web-xml 文件的内容
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<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_2_5.xsd"
id="/Midnight" version="2.5">
<session-config>
<session-timeout>30</session-timeout>
</session-config>
</web-app>
Run Code Online (Sandbox Code Playgroud)