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 JSPAn error occurred at line: 2 in the jsp file: /test/admin/news_manage.jspGenerated servlet error:
    [javac] Compiling 1 source fileD:\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\test\admin\news_005fmanage_jsp.java:48: incompatible types
found   : java.lang.String
required: int
switch(lx)  {
       ^An error occurred at line: 2 in the jsp file: /test/admin/news_manage.jspGenerated servlet error:
D:\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\test\admin\news_005fmanage_jsp.java:49: incompatible types
found   : java.lang.String
required: int
  case ggfb:
               ^An error occurred at line: 2 in the jsp file: /test/admin/news_manage.jspGenerated servlet error:
D:\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\test\admin\news_005fmanage_jsp.java:54: incompatible types
found   : java.lang.String
required: int
      case cyxy:
           ^An error occurred at line: 2 in the jsp file: /test/admin/news_manage.jspGenerated servlet error:
D:\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\test\admin\news_005fmanage_jsp.java:60: incompatible types
found   : java.lang.String
required: int
  case hdsj:
               ^An error occurred at line: 2 in the jsp file: /test/admin/news_manage.jspGenerated servlet error:
D:\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\test\admin\news_005fmanage_jsp.java:66: incompatible types
found   : java.lang.String
required: int
  case wycy:
               ^An error occurred at line: 2 in the jsp file: /test/admin/news_manage.jspGenerated servlet error:
D:\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\test\admin\news_005fmanage_jsp.java:72: incompatible types
found   : java.lang.String
required: int
  case sztz:
               ^
               ^
6 errors
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:418)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:461)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:442)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)
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.
出现这样的错误帮我看看阿

解决方案 »

  1.   

    switch(lx)中的参数不能用String型,要转成int型。
      

  2.   

    可是在java中不时可以写成String吗?
    那要是这样的话下面的条件就不能是String le 
      

  3.   

    switch里面不能用string,java下也一样的如果你一定要比较的话,还是用ifelse if 吧
      

  4.   

    found   : java.lang.String
    required: int //需要int类型
    switch(lx)  {
           ^
    学会看日志报告8!
      

  5.   

    String 类型要用equals()方法,如:
    if(lx.equals("ggfb")){
         zzbjxm="广告发布";
         select_list="<option value=\"71\">项目广告</option>"+"<option value=\"72\">产品广告</option>";
    }if....
      

  6.   

    我觉得楼主还是要好好看一看JAVA的语法哦!
      

  7.   

    谢谢,这个问题刚才就解决了,哎半年前学的java现在都忘记完最近没有事情就来看看基本上都快忘记了现在突然来学jsp好困难阿!
    希望大家能给点帮助谢谢了