The problem is if the user types in index.jsp directly, the session variable does not get set first since it is index.html that maps to the servlet.
It seems like I would need an empty html page to correspond with each jsp page. How else could I access a page, have it map to a servlet, and then redirect back to the same page without a loop?
No! That would create all manner of caching problems. You don't need an extension at all. What's all the hangup on extensions? Read the documentation for FrontMan (see sig), my Front Controller implementation.
Originally posted by Jeff Storey:
In terms of best practices though, should I expose the controllers with a .html extension
Those are most likely using the antiquated Model 1 pattern.
I was browsing some major sites that use jsp (such as http://www.mlb.com) and I've found that all of their page extensions end in .jsp
No, they're not. The issue you are up against is pretty much unique to you because you are creating the problem by trying to loop around. Don't.
so I'd assume they're running into the same type of looping issue and I was just trying to guess how they get around it.