This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes S2 URL formatting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "S2 URL formatting" Watch "S2 URL formatting" New topic

S2 URL formatting

Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
Is it possible to S2 to map a custom URL to an action class? Ex. --> home.action ??

I'm not a huge fan of having to end all my URLs with .action.

David Newton

Joined: Sep 29, 2008
Posts: 12617

S2.1 sets the action suffix to ",.action" allowing blank ends. You can do the same thing yourself, although IIRC that has caused some issues with JS/CSS mapping. Or use the Convention and/or RESTful plugin.
Don't get me started about those stupid light bulbs.
subject: S2 URL formatting
Similar Threads
how to set the VO Object in response.
Struts2 Issue with localization: Messages not picked up from properties file for forward actions.
what do I need to change in web.xml to omit the .action extension?
session problem
Struts passing info from the stack to actions as pass by value? causing severe issues.