myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cédric Durmont <cdurm...@gmail.com>
Subject Re: Call spring controller from faces-config.xml
Date Wed, 16 Nov 2011 07:43:51 GMT
JSF navigation model is meant only for JSF pages. <to-view-id> has to
point to a valid facelets / jsp page.
Not sure of what you're trying to do, anyway. When a jsf outcome is
set, you already have made it past the jsf controller (e.g. the bean +
faces-config.xml itself). Trying to reroute to another controller
sound strange to me.

Don't you just want to call your Spring controller ? Maybe you simply
need h:outputLink / tr:goLink ...

Regards,
Cedric Durmont

2011/11/14 Ashish Kulkarni <ashish.kulkarni13@gmail.com>:
> Hi
> I am trying to integrate Spring 3.0 with current JSF 1.1 project, so i got
> spring added and it works well, now i want to send request from jsf backing
> bean to spring controller, so in my faces-config.xml i changed as below
>
> <navigation-rule>
>    <from-view-id>/jsf/mysearch/search.jsp</from-view-id>
>    <navigation-case>
>        <from-outcome>go</from-outcome>
>        <!-- <to-view-id>/jsf/mysearch/details.jsp</to-view-id> -->
>         <to-view-id>/spring/details</to-view-id>
>
>        <redirect/>
>    </navigation-case>
>  </navigation-rule>
>
> I have a Spring controller defined as  @RequestMapping(value = "/details")
> and in my web.xml i have added
> <servlet-mapping>
> <servlet-name>appServlet</servlet-name>
> <url-pattern>/spring/*</url-pattern>
> </servlet-mapping>
>
> When i direct call URL http://localhost:8080/myapp/spring/details it works
> fine, but when jsf is forwarding this request it adds .faces so the URL
> looks like below
>
> http://localhost:8080/myapp/spring/details.faces
>
> So how can i get it working any ideas
> --
> Ashish
> www.ayurwellness.com
> www.mysoftwareneeds.com
>

Mime
View raw message