Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes servlet mapping naming Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet mapping naming" Watch "servlet mapping naming" New topic
Author

servlet mapping naming

John Schretz
Ranch Hand

Joined: Sep 10, 2008
Posts: 188
I would like my url pattern to show up in the address bar as a .jsp extension. Is it bad to define the url patten as i have below ConfirmOrder.jsp
Everything works fine, i just wasnt sure if there are any adverse effects. Or is there a better way to accomplish what i am trying to do?

Thanks
John

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Why?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
John Schretz
Ranch Hand

Joined: Sep 10, 2008
Posts: 188
lol

why not?

it just seems that most of the jsp sites i go to have extensions on all of their url's
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

That's because they are using an old-fashioned Model 1 app structure as opposed to a best-practice Model 2/MVC architecture. It's not something to be proud of.
John Schretz
Ranch Hand

Joined: Sep 10, 2008
Posts: 188
got it.

btw i read your Scriptless JSP Pages article. Probably one of the most informative things i read on the internet. It cleard up alot of things in my learning of jsp/servlets, and definatly made my application better.

Thanks,
John
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Very cool. Thanks for the feedback!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: servlet mapping naming
 
Similar Threads
after migrate from 4.0.1 to 4.2.0, cannot load web.xml in .war/WEB-INF
is not available
Multiple url-pattern in servlet
How to create a servlet that answers for an image?
How To Customize Servlet URL To Point A Servlet Class