java.lang.NoClassDefFoundError: javax/servlet/http/HttpSession
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.catalina.security.SecurityClassLoad.loadSessionPackage(SecurityClassLoad.java:82)
at org.apache.catalina.security.SecurityClassLoad.securityClassLoad(SecurityClassLoad.java:41)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:216)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpSession
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 15 more 以上为报错内容 上网查了下 说是配置文件中的servlet的路径错了
以下是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>
<display-name>jstzmonitor</display-name>
<distributable />
<servlet>
<servlet-name>ServletConfigurator</servlet-name>
<servlet-class>org.logicalcobwebs.proxool.configuration.ServletConfigurator</servlet-class>
<init-param>
<param-name>propertyFile</param-name>
<param-value>WEB-INF/classes/db.properties</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<init-param>
<param-name>org.apache.velocity.properties</param-name>
<param-value>WEB-INF/velocity.properties</param-value>
</init-param>
<servlet-name>MainServlet</servlet-name>
<servlet-class>
com.chinda.webstats.servlets.MainServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MainServlet</servlet-name>
<url-pattern>/MainServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>ReportManagerServlet</servlet-name>
<servlet-class>com.shgjj.bbs.servlet.ReportManagerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ReportManagerServlet</servlet-name>
<url-pattern>/report</url-pattern>
</servlet-mapping>
<!-- 统计平台 -->
<servlet>
<servlet-name>WebStatServlet</servlet-name>
<servlet-class>com.chinda.stat.servlet.WebStatServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>WebStatServlet</servlet-name>
<url-pattern>/webStat</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>100</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>MainServlet</welcome-file>
</welcome-file-list>
</web-app>
急等急等!!!!!!!!!!!!!!
有可能是web.xml中没有进行配置写错了类名
或 缺少jar包,把servelet.jar导入你的程序里面