Amit Ghorpade wrote:Hi and welcome to Coderanch
Two things, firstly you are generating a response for the JSP. Then why set the productList in request object?
Second, the JSP (implicit) objects are scoped. You should be using the right scope (request/response/page,etc).
E Armitage wrote:I would suggest that you create a class that holds all that data you are passing to your page so that you only set one attribute (they are all related if you think about it).
Then as to your problem, does the productlist JSP display some parts except for the data part or is the whole page failing to display? Are you able to access any another attributes you are sending apart from the productList?
Dave Tolls wrote:On a similar note to E Armitage's post, could you post the HTML produced for the product table?
One question (and it could be just me being blind), but the list you get seems to be the records for the current page.
So noOfRows is the number of rows on a single page.
Therefore, what does noOfPages represent, as it is noOfRows / rowsPerPage.
Dave Tolls wrote:So what does getAllPaging return?
Have you debugged the servlet by logging the number of Products returned?
You could also print the values directly to the page to see what's actually being passed into the page.
Dave Tolls wrote:"without using servlet"?
I hope that doesn't mean you stuck Java code in your JSP...
Dave Tolls wrote:However you have now taken a step back.
Your previous structure was correct, with a call to a servlet to get data that forwards to a JSP to display that data.
That is the way a JEE app is supposed to work.
What you have now has never been considered good practice for JSPs.