Win a copy of Head First Android this week in the Android 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

JSP's or JSP includes or DB

 
Ranch Hand
Posts: 150
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: 40797
828
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.

 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic