Topic: 求救 jsp+javabean

  Print this page

1.求救 jsp+javabean Copy to clipboard
Posted by: jiangsu3000
Posted on: 2004-11-06 14:58

org.apache.jasper.JasperException: /guestbook/index.jsp(15,0) The value for the useBean class attribute guestbook.GuestBookJdbc is invalid.
是怎么了啊?
可以说的具体点没?
在线等
--------------------------谢谢

2.Re:求救 jsp+javabean [Re: jiangsu3000] Copy to clipboard
Posted by: bluepure
Posted on: 2004-11-06 18:49

GuestBookJdbc

改成 guestBookJdbc 。

3.Re:求救 jsp+javabean [Re: bluepure] Copy to clipboard
Posted by: jiangsu3000
Posted on: 2004-11-06 19:03

没有用啊
抱的还是这个错误
怎么回事啊?`
org.apache.jasper.JasperException: /guestbook/index.jsp(15,0) The value for the useBean class attribute guestbook.GuestBookJdbc is invalid.
  org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
  org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
  org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:150)
  org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1227)
  org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
  org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
  org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
  org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
  org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
  org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
  org.apache.jasper.compiler.Generator.generate(Generator.java:3272)
  org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
  org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

4.Re:求救 jsp+javabean [Re: jiangsu3000] Copy to clipboard
Posted by: jiangsu3000
Posted on: 2004-11-06 20:14

=高手给个提示啊
谢谢了

5.Re:求救 jsp+javabean [Re: jiangsu3000] Copy to clipboard
Posted by: chengbd
Posted on: 2004-11-07 01:54

给个提示,就是静下心来,仔细调试!
每天都会遇到这样问问题的方式,俗话说“授之以鱼,不如授之以渔”,学习也应该是这样,不应该就问题而问问题,要学习一下解决问题的办法,别人能解决的,为什么自己就解决不了,不只是经验不足的原因吧?我想更多的是态度问题!
就拿楼主来说,您这是在问和javabean相关的东西了,简单我说这是基本的常识问题,您可能买些书,看看javabean的引用方法,自己来解决的,是吧?其次,您在这里是问和调试相关的问题了,为什么只提供出错信息,不提供到底是哪一句代码引发出错了,是不是没有定位出是哪一句出错?如果是这样,请您先想想调试定位的办法? 如果您知道是哪一句出错了,为什么不提供给大家呢,是你想的不周全吧? 大部分初级问题都是因为想的不周全而错的,但又不肯多想想,仔细查查,不是浪费时间吗?

一点感想,如有过份之处请见谅。

6.Re:求救 jsp+javabean [Re: jiangsu3000] Copy to clipboard
Posted by: jiangsu3000
Posted on: 2004-11-07 07:56

sorry
初次提问
我现在发现可能是我的机器无法编译jsp吧
看看
我的环境 java_home:E:\j2sdk1.4.2\lib;.
path:%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;D:\kv;E:\j2sdk1.4.2\bin;E:\j2sdk1.4.2\lib;.
我的系统,j2sdk1.4.2和tomcat5都是装在e:/下的
为什么我调试jsp的时候出现
 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 compile class for JSP
  org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
  org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)
  org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
  org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
  org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)
  org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
  org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
  org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
  org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

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

7.Re:求救 jsp+javabean [Re: jiangsu3000] Copy to clipboard
Posted by: chengbd
Posted on: 2004-11-07 10:08

将JDK目录下的lib下的tools.jar复制到tomcat下的common\lib,重新启动tomcat试试

8.Re:求救 jsp+javabean [Re: jiangsu3000] Copy to clipboard
Posted by: jiangsu3000
Posted on: 2004-11-07 17:55

可以了
谢谢


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923