Note that there are notes on how to set up the J2EE Application Server in the J2EE Tutorial Chapter 3 (local same page)
For presentation-oriented, it points the reader to the servlet chapter of the tutorial.
For service-oriented, it then points the reader to Building Web Services with JAX-RPC
and SOAP with Attachments API for Java
This is a nice chapter - it ties a lot of things together. The Web App Life Cycle section shows code for how one servlet can tell the next one information about the context through a RequestDispatcher . Here is another link about sharing information and an example of its use invoking other web resources and transferring control (forward and include)
"A web component indirectly invokes another web resource when it embeds a URL that points to another web component in content returned to a client." ShowCartServlet.java (gets a session too).
Another alternative, if you are moving to a page that does not need the current servlet anymore, is to invoke sendRedirect on the response object and pass it the next servlets URL.
(Core Servlets (page 125) and page 9 (of 30). For example, after someone fails to log in, you might want to direct them to an application form:response.sendRedirect("http://localhost:8080/myWarDir/ApplicationForm");
( which? )
Also assistance is in the J2EE Application Server Download QuickStart file
The J2EE API (1.4 local)