jQuery in Action, 3rd edition
The moose likes Struts and the fly likes Issue of Struts 2 URI Actions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Issue of Struts 2 URI Actions" Watch "Issue of Struts 2 URI Actions" New topic

Issue of Struts 2 URI Actions

Khosrow Moossavi

Joined: Aug 08, 2005
Posts: 26
Hello Ranchers,

I've just faced something weird and couldn't find anything useful regarding to it after some googling.
I'm using Struts 2.1.6, Spring 2.5, Hibernate 3.0.

The struts.xml

Every URI works perfectly ok such as
  • http://www.mydomian.com/
  • http://www.mydomian.com/about
  • http://www.mydomian.com/advertise

  • as well as these URIs(!):
  • http://www.mydomian.com/foo/about
  • http://www.mydomian.com/bar/advertise
  • http://www.mydomian.com/foo/bar/advertise/about
  • http://www.mydomian.com/every/signle/thing/you/could/imagine/about
  • ...

  • They are all working as long as the last one is correct and being in the struts.xml file.
    My question is, Am I missing something, somewhere in my code? Or is this just a known bug of struts 2?

    I'm apologizing beforehand if the question is basic or something!

    Ankit Garg

    Joined: Aug 03, 2008
    Posts: 9462

    There was a similar question some time ago here. Try to do what David said (and ignore what I said as its wrong )...

    SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
    Khosrow Moossavi

    Joined: Aug 08, 2005
    Posts: 26
    Thanks for your response Ankit. I've managed it someway, with my piece of code, but I should look up Convention Plugin as well.
    By the way, It's great, specially the words in the brackets!!
    I agree. Here's the link: http://aspose.com/file-tools
    subject: Issue of Struts 2 URI Actions
    It's not a secret anymore!