Eric Chentao Hu schrieb: > It’s OK and thanks for the responses. I guess I’m looking for another > level of abstraction / indirection. In Struts you can specify a > so-called action path which is really a URL mapping to forward the > request to an action which is really a Java method. In JSF, can > something similar to this be done easily? Basically if you request a > page some-page.jsf, a backing bean method will get called, and then a > particular view will be forwarded to depending on the result returned > from that backing bean method. > This can be achieved with a custom view and/or navigation handler both are relatively simple and straighforward to implement, they follow a decorator pattern. I once used it to achieve exactly this result for displaying an error page. (view handler it was in my case afair)
But have in mind, you do not need this kind of behavior very often, in struts you have the missing component model and hence you sometimes (not very often either) you need this upfront behavior to render into different representations of your data. That sums it up pretty much. This different reprentations also can be achieved via a custom view handler in jsf, but most of the times you dont go even that far because you can work on the page directly by component mapping and due to the fact that you have a real component model with event handling things are way easier in many aspects. I only can give you the advice, try to stop to think the struts way, thing more along the lines of classical rich client user interface programming.

