我有index.jsp
<form method="POST" action="addEntry">
</form>
提交到addEntry.java
(servlet)
web.xml
<servlet>
<servlet-name>addEntry</servlet-name>
<servlet-class>com.test.addEntry</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>addEntry</servlet-name>
<url-pattern>/addEntry/*</url-pattern>
</servlet-mapping>
使用jBoss 7 当我提交表格时,我得到了
servlet com.test.addEntry不可用。
为servlet分配异常。
我在pom.xml中添加了servlet jar的依赖项
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
错误记录