jQuery in Action, 2nd edition*
The moose likes Other Application Frameworks and the fly likes Is it possible not to use extension mapping ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Is it possible not to use extension mapping ?" Watch "Is it possible not to use extension mapping ?" New topic
Author

Is it possible not to use extension mapping ?

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

Hi.
Usually, when using Struts or WebWork, we use extension mapping to map out actions like *.do or *.action.
Is it possible to use mapping like : /command/ ?
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

Well, sure , I can have URLs such as :
/command/bookDetails (== /bookDetails.jspa)
/command/order (== /order.jspa)
But what if the path info considered a "request parameter" ?
I mean for example:
/command/aop , /command/ajax or /command/spring
aop and ajax are used to look up for articles files and please note the /command/aop , /command/ajax cant't be hard-coded in the configuration file because their values are dynamic.
Is it ok to use /command/* URL mapping in the config file ?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

It depends on the framework. Which one are you asking about?


GenRocket - Experts at Building Test Data
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

WebWork.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Apparently, you've got your answer here.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Stripes has support for this with a 3rd party add-on but it will be part of the core when Stripes 1.5 comes out.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

By the way, the term usually used to describe this is called Clean URLs.
 
 
subject: Is it possible not to use extension mapping ?
 
Similar Threads
Mistakenly changed web.xml
Faces Servlet
Issue with MIME settings in WebSphere
Java to Display Data from Database
[web.xml] url-pattern with "*"