ho fatto una modifica
cerca.jspadesso ho un errorecodice:<% Utente u = new Utente(); String op = request.getParameter("op"); String ruolo = (String) session.getAttribute("ruolo"); String prenota = ""; System.out.println("op sono qui: "+op); //System.exit(0); int c=u.getNum(); Libro lib[] = new Libro[c]; if(op.equals("ricerca")){ lib = (Libro[]) request.getAttribute("libro"); } if (op.equals("prenota")) { prenota = (String) request.getAttribute("prenotazione"); } %>codice:java.lang.ArrayIndexOutOfBoundsException: 0 at org.apache.jsp.cerca_jsp._jspService(cerca_jsp.java from :118) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534) at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:787) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:649) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:534) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1015) at org.apache.jsp.cerca_005flibri_jsp._jspService(cerca_005flibri_jsp.java from :161) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534) at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:787) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:649) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:483) at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:454) at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:350) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:300) at Java.Controller.processRequest(Controller.java:156) at Java.Controller.doGet(Controller.java:208)

Rispondi quotando