You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rodney Smith <ro...@gmx.net> on 2001/08/03 14:52:23 UTC
RE: Re: Struts ActionServlet
Hi Ted,
Thanks for the fast and perfect answers to my questions that does seem to
fill a few of the caps in my understanding of Struts. I need to just confirm
with you just one thing. Could you define the container for me please, is that
e.g.DB2 MDB EJB??? and that passes onto the Actionservlet
controller.ActionServlet Controller then delegates to the specific source that is specified in
the strutsconfig.xml --- e.g. Global Forwarding and or Action Mapping?
I thought that all request from the user had to go through the ActionSevlet
and that delegates the request to a JavaBean. The Java Bean collects teh
needed data to satisfy the request, by making calls to container 'EJB'or
'Database'and that returns back to the ActionServlet and the ActionServlet forwards
that onto the JSP, which construts the HTML response.....
I am unsure about this, could you clarify that please..
Thanks for your time Ted and have a great day.
Kind Regards
Rodney Smith
Struts uses a single ActionServlet. In the web.xml you can configure
your application to send request for various file patterns to the Struts
ActionSevlet. Usually these are either requests for URI's mathching *.do
or /do/*
The build.xml is used by Ant to compile an application. The web.xml is
read at start-up, along with the struts-config.xml. The
struts-config.xml is reloadable. I believe some containers may allow you
to also reload an application.
The container receives all requests first, and then decides what to do
with them. When a request matches the file pattern registered to the
ActionServlet, the container forwards it on. The ActionSerlvet then
consults the Struts ActionMappings, and calls the appropriate Action.
Rodney Smith wrote:
>
> Hallo,
>
> I have another question, I am using tomcat 3.2 in windows 2000 and I have
> tested an example of struts on my computer and it works fine, but now I am
> breaking down to understand the infrustracture.
> When the user clicks in the index.jsp page does that go straight to the
> Action Servlet, but is there a specific path that the Action Servlet uses
for the
> request. The example I have has logonform, registrationform, caterlogform
> etc,
> So my question is when a request goes straight to the Action Servlet?
> Or does the request goes through other specific paths and then to Action
> servlet what is the sequence of events does it do, so is that sequence
throught
> the strutsconfig.xml, starting with form beans then action mapping then
> global forwarding, is that correct. Is the web.xml or build.xml used after
the
> webapplication is loaded? That is if a request goes through is the web.xml
or
> build.xml used again for anything?
>
> Thanks again for everyones help have a great day.
>
> Kind Regards
> Rodney Smith
>
> --
> Sent through GMX FreeMail - http://www.gmx.net
--
Sent through GMX FreeMail - http://www.gmx.net
Re: Struts ActionServlet
Posted by Ted Husted <hu...@apache.org>.
No. But jBoss can.
< www.jboss.org >
Luis Olivares wrote:
>
> Excuse me but... can EJB (entity) be managed by Tomcat?
Re: Struts ActionServlet
Posted by Luis Olivares <ol...@infosphere.com>.
Excuse me but... can EJB (entity) be managed by Tomcat?
Regards
----- Original Message -----
From: "Ted Husted" <hu...@apache.org>
To: <st...@jakarta.apache.org>
Sent: Friday, August 03, 2001 8:31 AM
Subject: Re: Struts ActionServlet
> The container is a Web or Application server, like Tomcat, Resin,
> Websphere, jBoss, et cetera.
>
> For EJBs, you would be using an Application server, like jBoss. Other
> people can by with a Web server, like Tomcat.
>
> Sometimes the container is a module to a conventional server, like
> Apache.
>
> All requests go to the Web server first. Sometimes the container is the
> server (standalone), sometimes not (Apache module). A servlet registers
> with the container to receive requests for a URI that matches a given
> pattern. What the servlet does with the request afterwards is its own
> business.
>
> The Struts ActionServlet (one instance per application) delegates the
> request to an Action, which returns an ActionForward or null. What the
> Action does in between is its own business, but this is where many
> people start to use JavaBeans and the rest of it.
>
> Requests for Java ServerPages would never go to the Struts
> ActionServlet. These are handled by the JSP service for the container
> (e.g, "jasper" for Tomcat or Websphere). The Struts custom tags share
> resources with the ActionServlet (like the ActionMappings), but are the
> JSPs are not handled by the controller directly.
>
> -Ted.
>
> Rodney Smith wrote:
> >
> > Hi Ted,
> >
> > Thanks for the fast and perfect answers to my questions that does seem
to
> > fill a few of the caps in my understanding of Struts. I need to just
confirm
> > with you just one thing. Could you define the container for me please,
is that
> > e.g.DB2 MDB EJB??? and that passes onto the Actionservlet
> > controller.ActionServlet Controller then delegates to the specific
source that is specified in
> > the strutsconfig.xml --- e.g. Global Forwarding and or Action Mapping?
> >
> > I thought that all request from the user had to go through the
ActionSevlet
> > and that delegates the request to a JavaBean. The Java Bean collects teh
> > needed data to satisfy the request, by making calls to container 'EJB'or
> > 'Database'and that returns back to the ActionServlet and the
ActionServlet forwards
> > that onto the JSP, which construts the HTML response.....
> >
> > I am unsure about this, could you clarify that please..
> > Thanks for your time Ted and have a great day.
> >
> > Kind Regards
> > Rodney Smith
> >
> > Struts uses a single ActionServlet. In the web.xml you can configure
> > your application to send request for various file patterns to the Struts
> > ActionSevlet. Usually these are either requests for URI's mathching *.do
> > or /do/*
> >
> > The build.xml is used by Ant to compile an application. The web.xml is
> > read at start-up, along with the struts-config.xml. The
> > struts-config.xml is reloadable. I believe some containers may allow you
> > to also reload an application.
> >
> > The container receives all requests first, and then decides what to do
> > with them. When a request matches the file pattern registered to the
> > ActionServlet, the container forwards it on. The ActionSerlvet then
> > consults the Struts ActionMappings, and calls the appropriate Action.
> >
> > Rodney Smith wrote:
> > >
> > > Hallo,
> > >
> > > I have another question, I am using tomcat 3.2 in windows 2000 and I
have
> > > tested an example of struts on my computer and it works fine, but now
I am
> > > breaking down to understand the infrustracture.
> > > When the user clicks in the index.jsp page does that go straight to
the
> > > Action Servlet, but is there a specific path that the Action Servlet
uses
> > for the
> > > request. The example I have has logonform, registrationform,
caterlogform
> > > etc,
> > > So my question is when a request goes straight to the Action Servlet?
> > > Or does the request goes through other specific paths and then to
Action
> > > servlet what is the sequence of events does it do, so is that sequence
> > throught
> > > the strutsconfig.xml, starting with form beans then action mapping
then
> > > global forwarding, is that correct. Is the web.xml or build.xml used
after
> > the
> > > webapplication is loaded? That is if a request goes through is the
web.xml
> > or
> > > build.xml used again for anything?
> > >
> > > Thanks again for everyones help have a great day.
> > >
> > > Kind Regards
> > > Rodney Smith
> > >
> > > --
> > > Sent through GMX FreeMail - http://www.gmx.net
> >
> > --
> > Sent through GMX FreeMail - http://www.gmx.net
Re: Struts ActionServlet
Posted by Ted Husted <hu...@apache.org>.
The container is a Web or Application server, like Tomcat, Resin,
Websphere, jBoss, et cetera.
For EJBs, you would be using an Application server, like jBoss. Other
people can by with a Web server, like Tomcat.
Sometimes the container is a module to a conventional server, like
Apache.
All requests go to the Web server first. Sometimes the container is the
server (standalone), sometimes not (Apache module). A servlet registers
with the container to receive requests for a URI that matches a given
pattern. What the servlet does with the request afterwards is its own
business.
The Struts ActionServlet (one instance per application) delegates the
request to an Action, which returns an ActionForward or null. What the
Action does in between is its own business, but this is where many
people start to use JavaBeans and the rest of it.
Requests for Java ServerPages would never go to the Struts
ActionServlet. These are handled by the JSP service for the container
(e.g, "jasper" for Tomcat or Websphere). The Struts custom tags share
resources with the ActionServlet (like the ActionMappings), but are the
JSPs are not handled by the controller directly.
-Ted.
Rodney Smith wrote:
>
> Hi Ted,
>
> Thanks for the fast and perfect answers to my questions that does seem to
> fill a few of the caps in my understanding of Struts. I need to just confirm
> with you just one thing. Could you define the container for me please, is that
> e.g.DB2 MDB EJB??? and that passes onto the Actionservlet
> controller.ActionServlet Controller then delegates to the specific source that is specified in
> the strutsconfig.xml --- e.g. Global Forwarding and or Action Mapping?
>
> I thought that all request from the user had to go through the ActionSevlet
> and that delegates the request to a JavaBean. The Java Bean collects teh
> needed data to satisfy the request, by making calls to container 'EJB'or
> 'Database'and that returns back to the ActionServlet and the ActionServlet forwards
> that onto the JSP, which construts the HTML response.....
>
> I am unsure about this, could you clarify that please..
> Thanks for your time Ted and have a great day.
>
> Kind Regards
> Rodney Smith
>
> Struts uses a single ActionServlet. In the web.xml you can configure
> your application to send request for various file patterns to the Struts
> ActionSevlet. Usually these are either requests for URI's mathching *.do
> or /do/*
>
> The build.xml is used by Ant to compile an application. The web.xml is
> read at start-up, along with the struts-config.xml. The
> struts-config.xml is reloadable. I believe some containers may allow you
> to also reload an application.
>
> The container receives all requests first, and then decides what to do
> with them. When a request matches the file pattern registered to the
> ActionServlet, the container forwards it on. The ActionSerlvet then
> consults the Struts ActionMappings, and calls the appropriate Action.
>
> Rodney Smith wrote:
> >
> > Hallo,
> >
> > I have another question, I am using tomcat 3.2 in windows 2000 and I have
> > tested an example of struts on my computer and it works fine, but now I am
> > breaking down to understand the infrustracture.
> > When the user clicks in the index.jsp page does that go straight to the
> > Action Servlet, but is there a specific path that the Action Servlet uses
> for the
> > request. The example I have has logonform, registrationform, caterlogform
> > etc,
> > So my question is when a request goes straight to the Action Servlet?
> > Or does the request goes through other specific paths and then to Action
> > servlet what is the sequence of events does it do, so is that sequence
> throught
> > the strutsconfig.xml, starting with form beans then action mapping then
> > global forwarding, is that correct. Is the web.xml or build.xml used after
> the
> > webapplication is loaded? That is if a request goes through is the web.xml
> or
> > build.xml used again for anything?
> >
> > Thanks again for everyones help have a great day.
> >
> > Kind Regards
> > Rodney Smith
> >
> > --
> > Sent through GMX FreeMail - http://www.gmx.net
>
> --
> Sent through GMX FreeMail - http://www.gmx.net