In the custom tab in designer there are navigation buttons that allow you to go next, previous, etc. You'll want to put them on your form and make sure the script on them is running on the server.
If your rendering your form as HTML then you are probably using LiveCycle Forms. To navigate between pages you will have to create a IOutputContext object and assign it the value returned by the call to the EJBClient.processFormSubmission(...)in your servlet. You will then need to call the IOutputContext.getFSAction() method to determine what action was performed on the form. If the value returned by getFSAction() is 3 then the output of the processFormsubmission method is the Next page in the form. If the value is 4 then the output is the previous page in the form. If getFSAction returns either 3 or 4 then you can write just the data returned by the call to IOutputContext.getOutputContent() back to the web browser.