新手求救:这样jsp运行环境可以吗?

sunbowen86 2002-05-18 07:41:20
操作系统:win98/2000
Apache Tomcat 4.0
jdk1.4
在98下下载,解压,安装成功后(c:\jdk1.4; c:\Progam Files\Apache Tomcat 4.0)
因为曾有同志告诉过我说Apache Tomcat 4.0不用设置环境变量,所以直接运行
c:\windows\Start Menu\programs\Apache Tomcat 4.0\start tomcat
打开浏览器,输入:http://localhost:8080显示成功画面
但运行jsp程序如下时候:
<%@ page language="java"
import="java.util.*;"
%>
<html>
<head>
</head>
<body>
<center>
<%=new Date() %>
</center>
</body>
</html>
却显示:
A Servlet Exception Has Occurred
org.apache.jasper.JasperException: Unable to compile class for JSPimport javax.servlet.*;
^
public class kk$jsp extends HttpJspBase {
^
2 errors

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:543)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
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:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1005)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1098)
at java.lang.Thread.run(Unknown Source)
不知道是什么意思,是否我的环境根本没有配好?
请高人指点一二,不胜感激

...全文
5 点赞 收藏 2
写回复
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
puzzle_tom 2002-05-19

<%@ page language="java"
import="java.util.*;"
%>

改为:(import="" 中不包含“;”)
<%@ page import="java.util.*" %>
回复
chrischen79 2002-05-19
你的jsp代码贴出来
回复
发动态
发帖子
Web 开发
创建于2007-09-28

7.9w+

社区成员

Java Web 开发
申请成为版主
社区公告
暂无公告