Quantcast
Channel: 質問!ITmedia 新着質問(Java/253)
Viewing all articles
Browse latest Browse all 2439

JSP コンパイルエラー

$
0
0
こんにちは  JSPのコンパイルエラーで悩まされていて質問させていただきました <% if(request.getAttribute("list")!=null){ List list=(List)request.getAttribute("list"); List list1=(List)request.getAttribute("list1"); List list2=(List)request.getAttribute("list2"); for(int i=0; i
↑これだとコンパイルが成功します <% if(request.getAttribute("list") || request.getAttribute("list1") || request.getAttribute("list2")!=null){ List list=(List)request.getAttribute("list"); List list1=(List)request.getAttribute("list1"); List list2=(List)request.getAttribute("list2"); for(int i=0; i
これだとエラーが発生します・・・ 条件を増やしただけなんですが、何か構文がまちがっているのでしょうか?? アドバイスお願いします SPファイル: /****jsp の中の36行目でエラーが発生しました The operator || is undefined for the argument type(s) java.lang.Object, java.lang.Object 33:
34: 35: <% 36: if(request.getAttribute("list") || request.getAttribute("list1") || request.getAttribute("list2")!=null){ 37: List list=(List)request.getAttribute("list"); 38: List list1=(List)request.getAttribute("list1"); 39: List list2=(List)request.getAttribute("list2"); Stacktrace: at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:93) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:298) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:277) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:265) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Unknown Source)

Viewing all articles
Browse latest Browse all 2439

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>