The problem is in line 183 of your jsp, as well in line 360 where you declare again the variable i "for (int i = 0; i < collections.length; i++)". Just name it j or something else because you have already declared the variable i in this scope "int i;"
Kostas -----Original Message----- From: ggxky [mailto:iori1...@msn.com] Sent: Tuesday, July 30, 2013 4:10 AM To: dspace-tech@lists.sourceforge.net Subject: Re: [Dspace-tech] problem of sorting order of sub-community... Hi helix84...this is my log of dspace and the error will occur after i add this code <% boolean rvrs = false; int i; if ( community.getHandle().equals("XYZ/XYXY1") || community.getHandle().equals("XYZ/XYXY2") )rvrs=true; for(int j=0;j <collections.length;j++) { if (rvrs) { i=collections.length-j-1; } else { i=j;} %> from other topic for reverse sorting order of sub-community.if i delete the code away..everything is working fine.is there an other way for reverse sorting order of sub-community.jspui and xmlui??thanks javax.servlet.ServletException: org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 183 in the jsp file: /community-home.jsp Duplicate local variable i 180: if (rvrs) { i=collections.length-j-1; } else { i=j;} 181: %> 182: <% 183: for (int i = 0; i < collections.length; i++) 184: { 185: %> 186: <li> An error occurred at line: 360 in the jsp file: /community-home.jsp Duplicate local variable i 357: if (rs != null) 358: { 359: Item[] items = rs.getRecentSubmissions(); 360: for (int i = 0; i < items.length; i++) 361: { 362: DCValue[] dcv = items[i].getMetadata("dc", "title", null, Item.ANY); 363: String displayTitle = "Untitled"; An error occurred at line: [1,058] in the generated java file: [C:\tomcat\work\Catalina\localhost\jspui\org\apache\jsp\community_002dhome_j sp.java] Syntax error, insert "while ( Expression ) ;" to complete BlockStatements An error occurred at line: [1,066] in the generated java file: [C:\tomcat\work\Catalina\localhost\jspui\org\apache\jsp\community_002dhome_j sp.java] Syntax error, insert "else Statement" to complete IfStatement An error occurred at line: [1,066] in the generated java file: [C:\tomcat\work\Catalina\localhost\jspui\org\apache\jsp\community_002dhome_j sp.java] Syntax error, insert "}" to complete Block Stacktrace: at org.dspace.utils.servlet.DSpaceWebappServletFilter.doFilter(DSpaceWebappServ letFilter.java:85) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher. java:749) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDis patcher.java:487) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch er.java:412) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher .java:339) at org.dspace.app.webui.util.JSPManager.showJSP(JSPManager.java:60) at org.dspace.app.webui.servlet.HandleServlet.communityHome(HandleServlet.java: 509) at org.dspace.app.webui.servlet.HandleServlet.doDSGet(HandleServlet.java:254) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java :119) at org.dspace.app.webui.servlet.DSpaceServlet.doGet(DSpaceServlet.java:67) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:210) at org.dspace.utils.servlet.DSpaceWebappServletFilter.doFilter(DSpaceWebappServ letFilter.java:78) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171 ) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Proce ssor.java:1009) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Abstrac tProtocol.java:589) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java: 1852) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11 45) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6 15) at java.lang.Thread.run(Thread.java:722) -- View this message in context: http://dspace.2283337.n4.nabble.com/problem-of-sorting-order-of-sub-communit y-tp4665993p4666049.html Sent from the DSpace - Tech mailing list archive at Nabble.com. ---------------------------------------------------------------------------- -- Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk _______________________________________________ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette ------------------------------------------------------------------------------ Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk _______________________________________________ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette