File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No extension STRUTS Controller Mapping

 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, does anyone else hate the .do extension as much as I do? Personally, I would prefer to not have an extension at all. When not using STRUTS this is easily achieved for each servlet mapping by something like:

So when I go in my browser to http://localhost:8080/webap/login I am forwarded to the appropriate JSP and that is all I see in the browser.
Well, with the way the Controller works, I haven't been able to find a work around for this in struts and would love to do away with the extension all together. Anyone have any ideas?
 
Rick Hightower
Author
Ranch Hand
Posts: 350
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Set the action mapping to /action/* anything under action would go to your action.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rick Hightower:
Set the action mapping to /action/* anything under action would go to your action.

That won't work. I have a Filter that I am using to check authentication. I have to map it to secure pages via /user/*, /action/* or whatever. With that being the case, something like LoginAction that doesn't require authentication would hit the Filter and be denied.
I guess I should have stated that in the first post. I want to keep my filter in place. I don't want to create a subclass that does this and extend that in all my Action classes.
So are there any other options?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic