Hi,

I have a web application employing a servlet that processes database requests from user input params and forwards the total count of the resultset to my display jsp using request.setAttribute(...).

I retrieve the value of total count in my display jsp using request.getAttribut(...) and the value returns correctly. However, when I click on the next page in my display jsp, the value of total count is null!

Now if I go back all over again, the second and subsequent pages display correctly. But the first time I click on next page, things go haywire.

Can anyone please post a solution. Is it a session problem?

Try using session.setAttribute() / session.getAttribute() instead of request.

hi Stephen,
Thanks for your post. It did solve my problem.

Regards,
Jim

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.