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

源程序! <html> <head> <title>JSP Date Example</title> </head> <%@ page language="java"%> <%@ page contentType="text/html;charset=GB2312"%> <body> <%!int value=0;%> <% for(int i=1;i<=100;i++) { value=value+i; } %> <p>从1加到100的结果为:<%=value%></p> <p>今天是:<%=new.java.util.Date()%></p> </body> </html> 用tomcat调试的时候出现

message

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

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
    [javac] Since fork is true, ignoring compiler setting.
    [javac] Compiling 1 source file
    [javac] Since fork is true, ignoring compiler setting.
    [javac] D:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\lesson1_jsp.java:62:  expected
    [javac]       out.print(new.java.util.Date());
    [javac]                    ^
    [javac] D:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\lesson1_jsp.java:62: '(' or '[' expected
    [javac]       out.print(new.java.util.Date());
    [javac]                                      ^
    [javac] 2 errors



	at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
	at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
	at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
	at java.lang.Thread.run(Thread.java:534)


Apache Tomcat/4.1.24

的东西!是什么意思!怎么解决呢?新手告急!谢谢

2005-10-21 20:35
海天一笑
Rank: 1
等 级:新手上路
帖 子:29
专家分:0
注 册:2004-12-24
收藏
得分:0 
谢谢!
通过data类可以获得本地系统的时间!有没有什么办法!
让本地系统的时间改变呢!比如变快一小时!慢一分钟!
2005-10-23 11:43
快速回复:新手求救!!
数据加载中...
 
   



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

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