• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP's or JSP includes or DB

 
Ranch Hand
Posts: 157
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have an application where i have 50 different states. I am using single JSP to serve all the 50 different state pages.
Also i have 250 different games, and using single JSP page to serve 250 different games pages.

As part of SEO, i had to add 500 word articles to each page, i.e. now each game going to have 500 words article.

Can you suggest me the correct approach to achieve it ..

1. I can save the article text in DB against state record and load it and show
2. I can have jsp fragments (ohio.jspf, newyork.jspf etc.,) created for each state and include it conditionally on the STATE.jsp
3. Or I can have different jsps for each state and pick the mapping based on state id in the action .

Let me know if you need additional details..
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bala,
I would choose option #1 - a database or property file with the text that changes. Creating 50 duplicate pages (or fragments) is going to have duplicate code.
 
Bartender
Posts: 1845
10
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also keep in mind what your URL to each state / game will look like.
Crawlers work better with unique URLs rather than having the same URL with different parameters.

 
I'd appreciate it if you pronounced my name correctly. Pinhead, with a silent "H". Petite ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic