日期:2014-05-18  浏览次数:20787 次

eWebEditor在线文本编辑器吕海鹏修改版v0.1.3的问题
一打开上传图片页就出错
org.apache.jasper.JasperException:   Unable   to   compile   class   for   JSP:  

An   error   occurred   at   line:   34   in   the   jsp   file:   /upload.jsp
Syntax   error   on   token   "} ",   {   expected   after   this   token
31:   if(sTemp.equals( " "))
32:   {
33:   System.exit(0);
34:   }
35:   sTemp   =   sTemp.replaceAll( "& ",   "& ");
36:   sTemp   =   sTemp.replaceAll( " < ",   "&lt; ");
37:   sTemp   =   sTemp.replaceAll( "> ",   "&gt; ");


An   error   occurred   at   line:   111   in   the   jsp   file:   /upload.jsp
Syntax   error   on   token(s),   misplaced   construct(s)
108:   }
109:  
110:   //设置类型
111:   sType=request.getParameter( "type ");
112:   if(sType==null)
113:   {
114:   sType= "image ";


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


请问是哪里的问题啊

------解决方案--------------------
第一个问题:如果System.exit(0);后面的是不是就是多余的代码了呢?
第二个问题:没找到,是不是sType定义的有问题啊?
------解决方案--------------------
我用的没出现你的那种情况~
------解决方案--------------------
我也是这种错误,如何解决
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.aiyiweb.com/j2ee/2308.html