Mongoose said:
I was wondering if I can mix Struts and Tomahawk (which is a Java
Server Faces Extension)? If so, how exactly do I do this? If not,
what facilities are there in Struts to produce a rich Graphical User
Interface? I did find information about a Struts-Faces Integration
Library but it's very dated.
I don't know that you can mix them, but it could be possible, just really
silly. I don't think the combination makes sense.
Both JSF and Struts enact and impose a model-view-controller architecture on
your web app.
Struts uses a simpler, single-controller concept, where the Struts servlet
dispatches to Form (view support and glue) Action (model) classes.
JSF uses a more fractal controller model - there's a JSF servlet that fronts
the whole assemblage, and each screen has a backing bean that acts as an
individual controller for that screen.
JSF's approach is rather more complex but much more expressive.
I'm having trouble wrapping my mind around how you'd employ Struts at all if
you are working with JSF or one of its spinoffs. JSF already has a navigation
model. It has a component model, something Struts doesn't have, with defined
rules about how it trades information with the display artifacts. Both
frameworks want access to the raw HTTP request and various headers.
At best you'd add a layer of controller to the layers of controller already in
JSF, and some weird layers of information transfer. More likely the whole
thing will get hopelessly tangled trying to figure out who's the boss.
But I don't really know - I haven't tried it. I doubt I ever will.