项目所有jsp都报错 Unable to compile class for JSP,

exception

org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:677)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
com.tangren.mserver.web.filter.PermissionValidFilter.doFilter(PermissionValidFilter.java:50)
com.tangren.mserver.web.filter.SessionValidFilter.doFilter(SessionValidFilter.java:73)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
root cause

java.lang.ArrayIndexOutOfBoundsException
org.gjt.xpp.impl.tokenizer.Tokenizer.next(Tokenizer.java:1274)
org.gjt.xpp.impl.pullparser.PullParser.next(PullParser.java:392)
org.gjt.xpp.sax2.Driver.parseSubTree(Driver.java:415)
org.gjt.xpp.sax2.Driver.parse(Driver.java:310)
javax.xml.parsers.SAXParser.parse(SAXParser.java:392)
javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:165)
org.apache.taglibs.standard.tlv.JstlFmtTLV.validate(JstlFmtTLV.java:105)
org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:771)
org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1882)
org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1851)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:218)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:374)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:662)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
com.tangren.mserver.web.filter.PermissionValidFilter.doFilter(PermissionValidFilter.java:50)
com.tangren.mserver.web.filter.SessionValidFilter.doFilter(SessionValidFilter.java:73)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.62 logs.

求解答 急急急 在线等

3个回答

自定义标签:编写tld文件,java tag处理类,页面引用标签,一切程序完备之后报错(Unable to compile class for JSP)不能编译,并有空指针异常抛出。
原因可能是多种的,这里我是由于tld文件各属性没资料了解造成的,即没指定类型。
其类型详情可参考:http://my.oschina.net/u/185335/blog/99076......
答案就在这里:自定义标签报错Unable to compile class for JSP
----------------------Hi,地球人,我是问答机器人小S,上面的内容就是我狂拽酷炫叼炸天的答案,除了赞同,你还有别的选择吗?

遇到异常,不要急于看到前面的信息就认为找到了症结,你应该继续往下看,找到:root cause
下面才是症结:
java.lang.ArrayIndexOutOfBoundsException
继续往下,找到你自己定义的类
com.tangren.mserver.web.filter.PermissionValidFilter.doFilter(PermissionValidFilter.java:50)

看看50行发生了什么?数组越界

找到原因了 是包的冲突问题 3q

wm5920
球球之家/carver 啥包的问题?
大约 4 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问