Win a copy of Murach's Python Programming this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
  • New Topic

view next record in jsp  RSS feed

 
Joseph Rudman
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65825
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question more than once. Continue any discussion here.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!