File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

Issue of Struts 2 URI Actions

Khosrow Moossavi
Greenhorn

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!

    Regards,
    Khosrow
    Ankit Garg
    Sheriff

    Joined: Aug 03, 2008
    Posts: 9291
        
      17

    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
    Greenhorn

    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!!
     
    It is sorta covered in the JavaRanch Style Guide.
     
    subject: Issue of Struts 2 URI Actions
     
    Similar Threads
    Request not able to reach Action class in Struts2
    WARNING: Could not find action or result
    Newbie HelloWorld Struts.xml problem
    Beginner Spring with Hibernate integrated. Is this code correct?
    Issue configuring global results