I'm trying to solve a JSF navigation problem in as clean a manner as possible and I just thought I'd post and see if anybody else has developed or integrated with an existing application that has the same requirement.
Basically there's a JSP page that can be reached in a number of ways from different pages. All it is responsible for doing is retrieving data that is required by the calling page. When that page is left it should return to the calling page. A navigation rule can't be used because, as I said, any one of a number of pages might have called the page. It has been suggested that one approach might be to pass the calling page url on the Request and retrieve that when need to navigate back. But, we reckoned that we can't be the first people to encounter this problem so I was just wondering what other possible solutions might be viable (or if it is possible using JSF config other than via a navigation rule).
posted 8 years ago
Instead of a JSP to fetch data, can you use a servlet filter so you won't have to deal with navigation problems. You always request the JSF page you want and data is fetched in the filter.