You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by John Menke <jo...@eagleinfosystems.com> on 2002/09/18 19:09:42 UTC
Integrating Struts with JSF
Are there any examples or instructions on how to do this? I have been going
over the JSF tutorial and the web.xml (see below) looks like it's configured
to forward all requests through the Faces Servlet. How can I get the Struts
ActionServelet to interoperate with this model?
Is it just that .jsp pages get forwarded to the Faces Servlet and .do
requests get forwarded to the ActionServlet?
-john
web-app>
...
<listener>
<listener-class>
cardemo.CarDemoServletContextListener
</listener-class>
</listener>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>
javax.faces.webapp.FacesServlet
</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
</web-app>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Integrating Struts with JSF
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Wed, 18 Sep 2002, Eddie Bush wrote:
> Date: Wed, 18 Sep 2002 12:51:37 -0500
> From: Eddie Bush <ek...@swbell.net>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: Struts Users Mailing List <st...@jakarta.apache.org>
> Subject: Re: Integrating Struts with JSF
>
> I'm not 100% certain on this, but I think (so far as the controller
> servlet goes) it would be an "either/or" type thing. Seems to me it
> will be difficult to integrate Struts/JSF until one or the other of them
> moves to using a Filter instead of a servlet. Hopefully Craig will
> chip-in on this. I think he's probably the only one of us uniquely
> positioned to answer this 100% accurately.
>
See my longer reply in the [Forward Looking] email. But, basically, the
integration will essentially have two controllers:
/faces/* Maps to the Faces controller for handling
low level request events etc. Think of this
as the logic that would happen inside the
client on a "rich client" implementation (such
as expanding a node in a tree control) that
the application logic doesn't need to care
about.
*.do (or whatever) Maps to the Struts controller and handles
form submits in the usual way.
Once the integration library is available, you'll see how this is all fits
together pretty seamlessly. In the mean time, it's not very convenient to
try to use JSF and Struts together.
Craig
> John Menke wrote:
>
> >Are there any examples or instructions on how to do this? I have been going
> >over the JSF tutorial and the web.xml (see below) looks like it's configured
> >to forward all requests through the Faces Servlet. How can I get the Struts
> >ActionServelet to interoperate with this model?
> >
> >Is it just that .jsp pages get forwarded to the Faces Servlet and .do
> >requests get forwarded to the ActionServlet?
> >
> >
> >-john
> >
> >
> >web-app>
> >...
> > <listener>
> > <listener-class>
> > cardemo.CarDemoServletContextListener
> > </listener-class>
> > </listener>
> > <!-- Faces Servlet -->
> > <servlet>
> > <servlet-name>Faces Servlet</servlet-name>
> > <servlet-class>
> > javax.faces.webapp.FacesServlet
> > </servlet-class>
> > <load-on-startup> 1 </load-on-startup>
> > </servlet>
> > <!-- Faces Servlet Mapping -->
> > <servlet-mapping>
> > <servlet-name>Faces Servlet</servlet-name>
> > <url-pattern>/faces/*</url-pattern>
> > </servlet-mapping>
> ></web-app>
> >
>
> --
> Eddie Bush
>
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Integrating Struts with JSF
Posted by Eddie Bush <ek...@swbell.net>.
I'm not 100% certain on this, but I think (so far as the controller
servlet goes) it would be an "either/or" type thing. Seems to me it
will be difficult to integrate Struts/JSF until one or the other of them
moves to using a Filter instead of a servlet. Hopefully Craig will
chip-in on this. I think he's probably the only one of us uniquely
positioned to answer this 100% accurately.
John Menke wrote:
>Are there any examples or instructions on how to do this? I have been going
>over the JSF tutorial and the web.xml (see below) looks like it's configured
>to forward all requests through the Faces Servlet. How can I get the Struts
>ActionServelet to interoperate with this model?
>
>Is it just that .jsp pages get forwarded to the Faces Servlet and .do
>requests get forwarded to the ActionServlet?
>
>
>-john
>
>
>web-app>
>...
> <listener>
> <listener-class>
> cardemo.CarDemoServletContextListener
> </listener-class>
> </listener>
> <!-- Faces Servlet -->
> <servlet>
> <servlet-name>Faces Servlet</servlet-name>
> <servlet-class>
> javax.faces.webapp.FacesServlet
> </servlet-class>
> <load-on-startup> 1 </load-on-startup>
> </servlet>
> <!-- Faces Servlet Mapping -->
> <servlet-mapping>
> <servlet-name>Faces Servlet</servlet-name>
> <url-pattern>/faces/*</url-pattern>
> </servlet-mapping>
></web-app>
>
--
Eddie Bush
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>