Announcement Announcement Module
No announcement yet.
java server faces menu with mix of jsf and spring pages Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • java server faces menu with mix of jsf and spring pages

    I'm having a problem putting together a navigation menu for an application mixing both jsf and spring MVC controlled jsp pages. I'm writing the menu in jsf (using a myfaces navigationmenu component) - here's a snippet:
    <x&#58;commandNavigation id="nav_2" value="#&#123;messages&#91;'rates'&#93;&#125;" >
            <x&#58;commandNavigation id="nav_2_1" value="#&#123;messages&#91;'rates_report'&#93;&#125;" action="go_rates_report" />
    This 'go_rates_report' action is defined in faces-config like this:
    Now, I'm mapping all .htm pages to the spring resolver itself - like this:
    However the faces menu seems not to attempt any further resolution of variables once the menu item is clicked, and I get a 'page not found' error in the jsp. I assume this is because the faces menu automatically resolves to the faces servlet, and the spring servlet is bypassed.
    My questions are:
    a) Does this approach to writing a menu for an app using both faces and spring pages make sense, and
    b) if it does, what am I doing wrong?
    and alternatively,
    c) if it doesn't, does any one else have any suggestions/sample code for easily putting together an application menu that will talk to both spring and jsf pages, and integrate with each of these pages as a template?


  • #2
    FYI, I've solved this problem by using sitemesh - due to the fact that it sits in front of all controllers it plays well with both spring and jsf.