webwork/src/docs/manual dispatchers.html,1.1,1.2
[email protected] Sun, 16 Nov 2003 08:54:05 -0800
| Newsgroups | gmane.comp.java.open-symphony.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/opensymphony/webwork/src/docs/manual In directory sc8-pr-cvs1:/tmp/cvs-serv21305/src/docs/manual Modified Files: dispatchers.html Log Message: Added links to the api Index: dispatchers.html =================================================================== RCS file: /cvsroot/opensymphony/webwork/src/docs/manual/dispatchers.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- dispatchers.html 16 Nov 2003 04:14:19 -0000 1.1 +++ dispatchers.html 16 Nov 2003 16:54:02 -0000 1.2 @@ -24,8 +24,9 @@ other dispatchers available. A brief description of the available dispatchers is below. <a name="servlet"><h2>Servlet Dispatcher</h2></a> -The ServletDispatcher is the default dispatcher for handling all web HTTP requests. It is -implemented as a servlet, and all calls to webwork actions must pass through this dispatcher. +The <a href="api/webwork/dispatcher/ServletDispatcher.html">ServletDispatcher</a> is the +default dispatcher for handling all web HTTP requests. It is implemented as a servlet, +and all calls to webwork actions must pass through this dispatcher. This is done by specifying the ServletDispatcher servlet in the web application's web.xml descriptor, and all webwork actions (default of *.action) mapped to this dispatcher servlet. <p> @@ -34,45 +35,52 @@ have to handle parsing of multipart requests or have convoluted logic to pull request parameters based on the type of request. Once that is done, the dispatcher determines the name of the action requested based on the URL. Internally, the ServletDispatcher is a wrapper around -GenericDispatcher, and simply adds extra handling for web invocation semantics. +<a href="api/webwork/dispatcher/GenericDispatcher.html">GenericDispatcher</a>, + and simply adds extra handling for web invocation semantics. <p> Thus, once the action name has been determined via a web-specific method (URL), a GenericDispatcher -is created for that action, and a generic ActionContext created from that dispatcher. -Since this is a web specific dispatcher, the ServletActionContext is initialized and connected -to the generic ActionContext. +is created for that action, and a generic <a href="api/webwork/action/ActionContext.html">ActionContext</a> + created from that dispatcher. Since this is a web specific dispatcher, the ServletActionContext + is initialized and connected to the generic ActionContext. <p> Finally, the dispatcher initializes the value stack and executes the action to determine the view which is then displayed. <a name="generic"><h2>Generic Dispatcher</h2></a> -The generic dispatcher is a dispatcher that is invocation agonistic. it is agonostic in the sense that -it makes no assumptions in that it does handle any pecularities of the invoker, or perform any -mappings from the invoker's environment to webwork's environment. It is invoked simply through a Java -method call. +The <a href="api/webwork/dispatcher/GenericDispatcher.html">GenericDispatcher</a> is a dispatcher that is +invocation agonistic. it is agonostic in the sense that it makes no assumptions in that it does handle +any pecularities of the invoker, or perform any mappings from the invoker's environment to webwork's +environment. It is invoked simply through a Java method call. <p> -Once invoked, the dispatcher performs generic webwork setup. This includes creating an ActionContext, -determining the action being invoked based on the action parameter specified by the invoker, and finally -invoking the requested action. Since this dispatcher is view and invoker agnostic, it has no way of -determining what a view means. So the result of the action invocation is a wrapper object (ActionResult) -which contains a view name (for example, SUCCESS), as well as a List of the actions invoked and any -exception that might have been thrown. +Once invoked, the dispatcher performs generic webwork setup. This includes creating an +<a href="api/webwork/action/ActionContext.html">ActionContext</a>, determining the action being +invoked based on the action parameter specified by the invoker, and finally invoking the requested action. +Since this dispatcher is view and invoker agnostic, it has no way of determining what a view means. +So the result of the action invocation is a wrapper object +(<a href="api/webwork/dispatcher/ActionResult.html">ActionResult</a>) that contains a view name +(for example, SUCCESS), as well as a List of the actions invoked and any exception that might +have been thrown. <p> The generic dispatcher is useful in cases where it needs to be called outside of a web environment. For example, a java bean that runs within your web container but has no web semantics determining its behaviour might wish to use the generic dispatcher to invoke a webwork action. <a name="client"><h2>Client Dispatcher</h2></a> -The client dispatcher is, as the name implies, a dispatcher for remote clients. It works in unison with -a ClientServletDispatcher, and handles all the plumbing required for remote calls. +The <a href="api/webwork/action/client/ClientDispatcher.html">ClientDispatcher</a> is, +as the name implies, a dispatcher for remote clients. It works in unison with +a <a href="api/webwork/dispatcher/ClientServletDispatcher.html">ClientServletDispatcher</a>, +and handles all the plumbing required for remote calls. <p> In terms of implementation, the client dispatcher opens up an HTTP connection to the remote ClientServletDispatcher, and serializes the action to be invoked to the server. The server receives the requested action and deserializes it, prepares the context and does all the setup required then invokes the action. The action result is serialized back to the client dispatcher, that in turn returns it to the caller. <p> -All this happens serially, the client (for example, an applet or a swing application) creates the Action to be -invoked, and invokes it on the ClientDispatcher that will return the result of the remote action invocation. +All this happens serially, the client (for example, an applet or a swing application) creates the +<a href="api/webwork/action/Action.html">Action</a> to be invoked, and invokes it on the ClientDispatcher +that will return the result of the remote action invocation. <a name="test"><h2>Test Dispatcher</h2></a> -The test dispatcher is useful when constructing test cases. It does very little up front setup and allows -the caller to specify input parameters alongside the action name, which most other dispatchers do not -allow (with the obvious exception of the ServletDispatcher). +The <a href="api/webwork/dispatcher/TestDispatcher.html">TestDispatcher</a> is useful when constructing +test cases. It does very little up front setup and allows the caller to specify input parameters +alongside the action name, which most other dispatchers do not allow (with the obvious exception of the +ServletDispatcher). </body> </html> ------------------------------------------------------- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl