一个普通的jsp页面,在JBuilder自带的环境下能正常运行,而在另外的tomcat环境下却报编译错误,请教高手这是什么问题,怎样解决,谢谢!
错误信息如下:
type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Unable to compile class for JSPGenerated servlet error:
    [javac] javac: invalid flag: 5.0\common\endorsed
    [javac] Usage: javac <options> <source files>
    [javac] where possible options include:
    [javac]   -g                        Generate all debugging info
    [javac]   -g:none                   Generate no debugging info
    [javac]   -g:{lines,vars,source}    Generate only some debugging info
    [javac]   -nowarn                   Generate no warnings
    [javac]   -verbose                  Output messages about what the compiler is doing
    [javac]   -deprecation              Output source locations where deprecated APIs are used
    [javac]   -classpath <path>         Specify where to find user class files
    [javac]   -sourcepath <path>        Specify where to find input source files
    [javac]   -bootclasspath <path>     Override location of bootstrap class files
    [javac]   -extdirs <dirs>           Override location of installed extensions
    [javac]   -d <directory>            Specify where to place generated class files
    [javac]   -encoding <encoding>      Specify character encoding used by source files
    [javac]   -source <release>         Provide source compatibility with specified release
    [javac]   -target <release>         Generate class files for specific VM version
    [javac]   -help                     Print a synopsis of standard options org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:437)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:497)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
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.30 logs.

解决方案 »

  1.   

    lz装jdk了吗?如果安装了就查查环境变量是否都配置了
      

  2.   

    呵呵,jdk的问题,jbuilder是自带jdk的,你换到别的地方就要安装jdk配置环境变量了。。
      

  3.   

    jdk装了,环境也配置了,应该不是这样的问题.
      

  4.   

    感觉这个问题是由于JBuilder和tomcat所使用的JDK不一致所致,最好都设置成为1.5的JDK试试
      

  5.   

    To gshywx: 我是版主的话, 删你没商量! 学不是这样学的!
      

  6.   

    JBuilder和tomcat所使用的JDK不一致所致,
      

  7.   

    我已经把jb的jdk设置成了机器上装的jdk了,还是一样的问题,而且tomcat以前也运行过这个jb写出来的jsp.
      

  8.   

    这样看你运行的程序内容 把tomcat所用的调到和jb用的一致
      

  9.   

    明显你的JBuilder不能通过编译JSP文件
      

  10.   

    放在tomcat的默认应用目录下,没有问题,可以运行,但是当把应用的目录改成其它目录时,就报上面的错误了.为什么呢