• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Call spring controller from faces-config.xml

 
ashish kulkarni
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
ashish kulkarni
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What i have done in my backingbean i have added redirect like below and looks like it is working

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic