File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes using query string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of RabbitMQ in Depth this week in the Open Source forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "using query string" Watch "using query string" New topic

using query string

Astha Sharma
Ranch Hand

Joined: Oct 15, 2011
Posts: 249

I am making a JSP with a counter using query string, so that on clicking button next, the counter increases and on clicking button previous, the counter decreases. This is my JSP page-

The counter value shown is 0 every time on whatever button I click. Even the counter parameter doesn't get added in the URL.
Please check the code and tell me what I am doing wrong?

Astha - OCPJP 6 (90%)
Swastik Dey

Joined: Jan 08, 2009
Posts: 1483

Probably you should not write java codes in jsp, its a very old practice. However the following changes should resolve your issue.

I agree. Here's the link:
subject: using query string