Mixing Struts and JSF

M

Mongoose

Hi All,

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.

As always, any help is appreciated . . .

Thanks,

Andy
 
L

Lew

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.
 
M

Mongoose

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.

Hey Lew,

Thanks for responding . . .

I'm still learning all this Java stuff so sorry if some of my
questions don't make sense at this point . . . I'm still feeling my
way a bit . . .

What I am really trying to determine is if I can use Tomahawk in my
Struts application??? I have a Java Server Faces application that
uses Tomahawk to create a menu and I was just wondering if I can
borrow it and place it into my Struts application? Does this make any
sense??? If not, what is the best way to create a menu in my Struts
application?? Perhaps Tiles???

Thanks,

Andy
 
L

Lew

Mongoose said:
I'm still learning all this Java stuff so sorry if some of my
questions don't make sense at this point . . . I'm still feeling my
way a bit . . .

Your questions make perfect sense.
What I am really trying to determine is if I can use Tomahawk in my
Struts application???  I have a Java Server Faces application that

Hey, ease up on the question marks there.
uses Tomahawk to create a menu and I was just wondering if I can
borrow it and place it into my Struts application?  Does this make any

Tomahawk is a JSF component library. Ergo you would need to load both
JSF and Struts together to do that, hence my answer upthread.
 
M

Mongoose

Your questions make perfect sense.


Hey, ease up on the question marks there.


Tomahawk is a JSF component library.  Ergo you would need to load both
JSF and Struts together to do that, hence my answer upthread.

I decided to go with the Struts Menu Tag Library for this
project . . .
 
A

Arne Vajhøj

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.

1) I would switch to JSF.

2) But if you insist then Struts Faces is not that old and it
is included in the latest Struts 1.3.x dists.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top