File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Call spring controller from faces-config.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Call spring controller from faces-config.xml" Watch "Call spring controller from faces-config.xml" New topic
Author

Call spring controller from faces-config.xml

ashish kulkarni
Ranch Hand

Joined: Aug 15, 2002
Posts: 130
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



I have a Spring controller defined as @RequestMapping(value = "/details") and in my web.xml i have added


When i directly 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


A$HI$H
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16065
    
  21

You cannot navigate to a non-JSF View using JSF navigation (faces-config). JSF navigation only navigates to JSF Views.

However, you can define forms or links with non-JSF URLs in them on JSF pages that request non-JSF services for things like the Spring web controller, Struts actions, raw JSPs and servlets, and so forth.


Customer surveys are for companies who didn't pay proper attention to begin with.
ashish kulkarni
Ranch Hand

Joined: Aug 15, 2002
Posts: 130
What i have done in my backingbean i have added redirect like below and looks like it is working

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Call spring controller from faces-config.xml