| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 913 人关注过本帖
标题:希望有问题共同探讨
取消只看楼主 加入收藏
wangguan
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2004-10-16
收藏
 问题点数:0 回复次数:0 
希望有问题共同探讨

朋友,你们好,用j2sdk1.4.2和tomcat5.0在运行程序如下:

<html> <!-- Copyright (c) 1999 The Apache Software Foundation. All rights reserved. -->

<%@ page session="false"%>

<body bgcolor="white"> <jsp:useBean id='clock' scope='page' class='dates.JspCalendar' type="dates.JspCalendar" />

<font size=4> <ul> <li> Day of month: is <jsp:getProperty name="clock" property="dayOfMonth"/> <li> Year: is <jsp:getProperty name="clock" property="year"/> <li> Month: is <jsp:getProperty name="clock" property="month"/> <li> Time: is <jsp:getProperty name="clock" property="time"/> <li> Date: is <jsp:getProperty name="clock" property="date"/> <li> Day: is <jsp:getProperty name="clock" property="day"/> <li> Day Of Year: is <jsp:getProperty name="clock" property="dayOfYear"/> <li> Week Of Year: is <jsp:getProperty name="clock" property="weekOfYear"/> <li> era: is <jsp:getProperty name="clock" property="era"/> <li> DST Offset: is <jsp:getProperty name="clock" property="DSTOffset"/> <li> Zone Offset: is <jsp:getProperty name="clock" property="zoneOffset"/> </ul> </font>

</body> </html> 时,出现错误提示,

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: dates.JspCalendar
	org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:122)
	org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1050)
	org.apache.jasper.compiler.Node$GetProperty.accept(Node.java:1078)
	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2156)
	org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2206)
	org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2212)
	org.apache.jasper.compiler.Node$Root.accept(Node.java:484)
	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2156)
	org.apache.jasper.compiler.Generator.generate(Generator.java:3228)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:284)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:437)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

root cause

java.lang.ClassNotFoundException: dates.JspCalendar
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1365)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1212)
	org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:120)
	org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1050)
	org.apache.jasper.compiler.Node$GetProperty.accept(Node.java:1078)
	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2156)
	org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2206)
	org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2212)
	org.apache.jasper.compiler.Node$Root.accept(Node.java:484)
	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2156)
	org.apache.jasper.compiler.Generator.generate(Generator.java:3228)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:284)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:437)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

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

上面程序即为,tomcat5.0中所带例子jsp-examples中的dates/data.jsp 问题出在其在例子中运行时成功,而在把它改名后放在root下时却不行了,请指教。

另:朋友,我是新手,但对jsp学习有强烈欲望,希望和你们成为朋友,以后共同探讨,我的QQ是113083867。

  若在论坛中回复,请找发表者为wangguan的,回复。谢谢。

搜索更多相关主题的帖子: 探讨 
2004-10-17 11:59
快速回复:希望有问题共同探讨
数据加载中...
 
   



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

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