• Post Reply Bookmark Topic Watch Topic
  • New Topic

seo friendly url-s, redirect  RSS feed

 
Miran Cvenkel
Ranch Hand
Posts: 202
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So. I read that something like "red_daisy" is seo friendly" and my plan is to have, at the moment, like 50000 pages like:

code for red_daisy.jsp


1. How to make red_daisy.jsp work without having file .jsp extension ?
2. Any other suggestion how to do the 50000 task ?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A number of suggestions:
  • Java code in a JSP is a bad idea that's been discredited for over 9 years now.
  • You should be using response.sendRedirect() to perform redirects.
  • JSPs should never be directly referenced by a URL. Rather, their page controller servlets should be addressed. That solves your .jsp issue.
  •  
    Hussein Baghdadi
    clojure forum advocate
    Bartender
    Posts: 3479
    Clojure Mac Objective C
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Not talking about the original poster but it is really amazing how much people are using ancient JSP practices, and it is even more amazing how many times you advice them
    Maybe it is time for a new book about Servlets 3 and JSP 2.2 to establish the correct practices?
     
    Miran Cvenkel
    Ranch Hand
    Posts: 202
    2
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    The point of my post was on 50000.

    Bear Bibeault wrote:A number of suggestions:
  • Java code in a JSP is a bad idea that's been discredited for over 9 years now.
  • You should be using response.sendRedirect() to perform redirects.
  • JSPs should never be directly referenced by a URL. Rather, their page controller servlets should be addressed. That solves your .jsp issue.


  • 1.currently I have a problem with mysql from which those 50000 comes: bug
    2.so it is inpossible to expect to pull from db where to response.sendredirect
    3.even if mysql team fixs the prob I doubt that querying for each redirect would be a good idea.

    hence jsp thing.
     
    Bear Bibeault
    Author and ninkuma
    Marshal
    Posts: 65833
    134
    IntelliJ IDE Java jQuery Mac Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    What does MySQL have to do with using a servlet over a JSP, or with using response.sendRedirect() correctly?
     
    Stefan Evans
    Bartender
    Posts: 1834
    10
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Having 50,000 individual JSPs in place purely to do a redirect like this sounds like madness to me.

    One servlet should be able to do it.
    You just need something to associate the incoming url with the one you need to redirect to.

    Can it be calculated, or is it just mapped arbitrarily.
    How often will this sort of redirect be called on?

    Is the point of this redirect mapping just for search engine optimisation, so it can see an actual url it can analyze as opposed to just an id?

     
    Hussein Baghdadi
    clojure forum advocate
    Bartender
    Posts: 3479
    Clojure Mac Objective C
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Stefan Evans wrote:Having 50,000 individual JSPs in place purely to do a redirect like this sounds like madness to me.

    50,000 what?!!
    Are you creating a JSP for every entity (or whatever)?
    Single JSP should serves millions.
     
    It is sorta covered in the JavaRanch Style Guide.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!