Hi,
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:
This 'go_rates_report' action is defined in faces-config like this:Code:<x:commandNavigation id="nav_2" value="#{messages['rates']}" > <x:commandNavigation id="nav_2_1" value="#{messages['rates_report']}" action="go_rates_report" />
Now, I'm mapping all .htm pages to the spring resolver itself - like this:Code:<navigation-case> <from-outcome>go_offered_rates</from-outcome> <to-view-id>/myapp/rates/offered_rates_maintenance.htm</to-view-id> </navigation-case>
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.Code:<servlet> <servlet-name>myapp</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>myapp</servlet-name> <url-pattern>*.htm</url-pattern> </servlet-mapping>
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?
Thanks
Denis


Reply With Quote