Hi, Im trying to take control of the navigation. Im using MyFaces.
let me explain: I wish to have my own piece of code to parse the request URI and control the navigation to the next JSF page. This functionality is desired for accomplishing a permalinks scheme of some sort. For example
The link root/yuval/yuvals_stuff should cause the following to happen:
- I parse the request with a servlet filter and know that we need to load some data for yuval. - I use a ViewHandler to load the data (it delegates the call to some service that gets the data from the database) - I now forward the user to a known jsf page that is bounded with the viehandler and presents yuval's stuff .
Actually, the first time i try to use the code, the navigation goes well. But right after refresh or calling the same url again I get an exception. The code and the exception are provided here:
Here is what i do inside a servlet filter (I also tried to put this code inside the faces servlet, just for testing):
<code> FacesContext fc = FacesUtils.getFacesContext(req, res);