| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3253 人关注过本帖
标题:出现错误: Unable to load class for JSP!
只看楼主 加入收藏
qngwycjh
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2006-3-4
收藏
 问题点数:0 回复次数:3 
出现错误: Unable to load class for JSP!

<1>启动C:\Tomcat 5.5\bin下面的tomcat5.exe

<2>在C:\Tomcat 5.5\conf\server.xml中,
添入部分代码为:
<Context path="/myapp" docBase="C:\Tomcat 5.5\webapps\myapp" debug="0" reloadable="true">
</Context>

<3>jsp源代码放在: C:\Tomcat 5.5\webapps\myapp 中.
C:\Tomcat 5.5\webapps\myapp\WEB-INF 下包括:目录classes 和lib,以及web.xml
目录class中的文件已经过编译,生成class文件,
web.xml的内容为:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!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>My Web Application</display-name>
<description>
A application for test.
</description>
</web-app>

<4>在浏览中输入:http://localhost:8080/myapp/index.jsp
结果显示为:

搜索更多相关主题的帖子: load Unable JSP class 
2006-04-08 16:01
qngwycjh
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2006-3-4
收藏
得分:0 

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to load class for JSP
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
2006-04-08 16:02
qngwycjh
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2006-3-4
收藏
得分:0 

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to load class for JSP
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

org.apache.jasper.JasperException: Unable to load class for JSP
	org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:598)
	org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:315)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
	java.net.URLClassLoader$1.run(Unknown Source)
	java.security.AccessController.doPrivileged(Native Method)
	java.net.URLClassLoader.findClass(Unknown Source)
	org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:133)
	org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
	org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:596)
	org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:315)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.15 logs.


Apache Tomcat/5.5.15

2006-04-08 16:02
qngwycjh
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2006-3-4
收藏
得分:0 
谢谢各位XDJM来帮忙,在线等..
2006-04-08 16:03
快速回复:出现错误: Unable to load class for JSP!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.062483 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved