• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

struts 2: specifying pages with no name extension?

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have seen some sites that use struts and have it so that the pages don't use a file extension, so:

http://myhost/path/abc

instead of

http://myhost/path/abc.action

how would I go about achieving this with struts 2?
 
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

hi,

just see Struts2+ annotation base development.

 
André-John Mas
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any chance you could point me to an actual document. Based on the information you gave me I couldn't find anything of help.
 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's what I did for Struts 2.0.x + the SmartURLs plugin. I'm planning to migrate to Struts 2.1.x + Convention plugin plugin later today. (SmartURLs was a third party plugin, that became the base for the Convention plugin, so I expect them to be similar, but not exactly the same.)

in struts.xml


IIRC, the struts.action.extension can not be set to the empty string in 2.0.x without the SmartURLs filter replacement shown below in the web.xml. The action.packages just tells SmartURLs where to look for actions that aren't configured in struts.xml and the default.parent.package parameter assigns all discovered, non-overridden actions an xwork-package (ie not a java package).

in web.xml


I haven't been able to look for the updated documentation yet, but I would assume poking around looking for information on the Convention plugin would be the right starting point.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic