This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Display tag for pagination in jsp

 
Ranch Hand
Posts: 77
Eclipse IDE Tomcat Server Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I am using display-tag for pagination in jsp. When I click on the next link, URL gets appended with parameters which I dont want.

http://127.0.0.1:8080/Display/display.do?d-49216-s=0&d-49216-o=1&d-49216-p=1

I am getting URL something like above. Can any one please help me.

 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DisplayTag uses that to keep track of which page to display next, and what data to show on that page. Does that present an actual problem?
 
chets patel
Ranch Hand
Posts: 77
Eclipse IDE Tomcat Server Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not creating a problem but unnecessarily appended in the URL. Is there any option to avoid that.
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't call it unnecessary - you need to communicate to the server what to display next in some way. You can cut down on the number of parameters (1 instead of 3) by using sessions; see the "Preserve pagination status" page of the example web app for details on that.
 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also create a custom javascript which can be called on the links.

You will run into problems when your actual form data (which is also appended in the GET url )
starts getting bigger & overflows the normal GET limit.
The links will stop working.

So if you are also annoyed + would like to keep your links keep on working you can use advanced javascript to append
these field value pairs & submit a post request.
 
chets patel
Ranch Hand
Posts: 77
Eclipse IDE Tomcat Server Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to export the table to excel using display tag. But I am not getting the hyper link for export to excel. It is just showing the lable but not the hyperlink for exporting. Can any one please tell me what might be the error.

I am putting something like below in display tag.properties
export.banner=<div class="Excel">Excel</div>
 
We don't have time to be charming! Quick, read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!