struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Husted <>
Subject Re: MVC and Struts
Date Fri, 15 Feb 2002 19:35:04 GMT
Struts has always been open to other presentation systems. It's just
been a matter of someone doing the work to expose the Struts
configuration to those systems. The custom tags and RequestUtils package
did that for JSP. Other servlets like X2 (from the JavaWorld article),
and the Struts/Velocity servlet are making it available to other systems

For JSP, another servlet is not required, since the JSP service is
already provided by the container. For other presentation systems, it is
just a matter of adding a presentation servlet, like the XLST X2
servlket or the one provided by the Velocity team. The internal Struts
packages (except for RequestUtils) are view neutral, and should work
equally well with anything. 

In Struts 1.1, we're working on a "API bean" that will make the
configuration readily available to other systems, including JSTL. 

The framework is biased toward standard Java technologies, like
JavaBeans, but not to a particular presentation system. 

The Action is part of the controller layer. It bundles model data into a
bean for the benefit of the presentation layer, but does not itself
contain any presentation logic (e.g. HTML code). Here, it is following
the layers pattern, 

[view] <-> [controller] <-> [model]

The ActionForm bean is a view object, but the View and Controller can
interact because they are on adjascent layers. 

The base ActionForm bean object is a view-neutral JavaBean. It can be
used by a Velocity template, JSP, or anywhere JavaBeans can be used. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web

"Roman V. Petrov" wrote:
> Struts gurus and users,
> I used Struts in several projects and have a question about Struts design.
> If consider a Struts application with separated business
> layer (like EJB or another way) as MVC example I see:
> ActionServlet - Controller
> Action        - mixed Controller + View
> JSP with tags - View
> FormBean      - Model
> EJB           - Model
> I think Action has View functions because it is responsible
> for getting Model state from EJB and constructing special
> view beans for JSP.
> And why Struts goes JSP-way to the future?
> I consider JSP tags is not better solution to render the View.
> What about integration with XSLT?
> I found two solutions to integrate XSL and Struts
> However both have not clear push-MVC model.
> I think about Struts extension like this:
> Here:
> RequestDispatcher(ActionServlet), FormBean, Action, View - java classes
> XSL stylesheet - precompiled XSL
> I'm interested about any Struts users and developers opinion.
>                      Sincerely yours, Roman Petrov
> </></></></></></></></></></></></></></></></></></></></>
> Software Engineer                    Actimind, Inc.
> Software Development Department
> E-mail:            Saint-Petersburg
> Phone:  +7-(812)-325-87-16(ask 108)  Russia
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message