This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP's or JSP includes or DB  RSS feed

 
Bala Gangadhar
Ranch Hand
Posts: 119
1
  • Mark post as helpful
  • send pies
  • 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..
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37242
519
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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.
 
Stefan Evans
Bartender
Posts: 1836
10
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!