I currently create a web application that connects to a database via a
servlet, the servlets stores the database records in a vector and then forwards onto a
jsp. This all works OK and I can display all database record using a bean.
Now I need to work out how to display next record in arrayList using an increment of some sort.
But currently my code is roughly as follows:
<FORM method="POST" action="/ProcessClients.jsp">
<jsp:useBean id="client" scope="request" class="RemoteWorkerSimple.bean.Client" />
<%-- <jsp:getProperty name="beanInstanceName" property="propertyName" /> --%>
<%
int increment = 0;
ArrayList Client = (ArrayList)request.getAttribute("Clients");
client = (RemoteWorkerSimple.bean.Client)Client.get(increment);
%>
Now I want to add a button to allow user to go to next entry stored in array this should then re-call the same jsp.
But I get the following error:
java.lang.NullPointerException
at org.apache.jsp.ProcessClients$jsp._jspService ProcessClients$jsp.java:109)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
This may be a stupid question but I have no idea why I get this error.
Cheers Joe.