如果我删除servlett-api.jar文件它不会像我用来引用servlet的任何代码那样构建或编译文件。
import javax.servlet.http.HttpServletRequest;
this is the error im getting now [QUOTE]13-Sep-2010 12:22:45 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive ZangV3Spring.war
13-Sep-2010 12:22:49 org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
13-Sep-2010 12:22:49 org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/ZangV3Spring] startup failed due to previous errors
13-Sep-2010 12:22:49 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/ZangV3Spring] registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
13-Sep-2010 12:22:59 org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/ZangV3Spring]
13-Sep-2010 12:22:59 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive ZangV3Spring.war
13-Sep-2010 12:23:03 org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
13-Sep-2010 12:23:03 org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/ZangV3Spring] startup failed due to previous errors
这就是我的网站.xml看起来像
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- -->
<!-- Register and setup my servlet xml files here -->
<servlet>
<servlet-name>appStore</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value></param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>appStore</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/zang-file-service.xml
</param-value>
</context-param>
</web-app>