• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

pagination and jsp tags

 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok where to start.

I have completely implemented paging on my site with the pager tag library.
http://jsptags.com/tags/navigation/pager/index.jsp

This worked beautiful until.....

The person who i am doing the site for wanted friendly urls. I have apache running in front of tomcat.

in apache cp_jkmount.conf i added
JkMount /products/* ajp13

I am using a rewrite rule to make my urls more friendly.

RewriteRule ^(.*)products/(.*)/(.*)$ $1/products?BRAND=$2&VENDORCODE=$3 [PT,L]

which changes this:
http://www.mysite.com/products?BRAND=10-deep&VENDORCODE=471
to this:
http://www.mysite.com/products/10-Deep/471

for the original links:
When i go to the page links the pager creates the urls turn this:

http://www.mysite.com/products?BRAND=10-deep&VENDORCODE=471

to this when you click on the page numbers:
http://www.mysite.com/category.jsp?pager.offset=20

However these links are now broken and the paging doesnt work?

I am at a crossroad now to try to fix this or to write the paging from scratch but i dont know how intailed that would be. I read on the FAQ here that you can use the LIMIT in mysql to assist with the paging but would i be in the same boat if i were to do it that way? and how hard would that be to implement.

Just looking for some direction.
 
We're being followed by intergalactic spies! Quick! Take this tiny ad!
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic