[ Team LiB ] Previous Section Next Section

Summary

Partitioning can help you build Web applications that are easier to work with. By factoring out common functionality and putting it in JSPs or JSP segments, you can often simplify the code and create reusable elements. The JSP standard action <jsp:include> allows you to include other resources into JSPs. Standard actions can also be used to forward to other JSPs by using <jsp:forward>. You can pass parameters to pages you are including or forwarding to by using the <jsp:param> standard action. Servlets use a RequestDispatcher to include or forward to resources.

If the information you want to pass between pages is complex, you can create an object to hold the information. Objects can be passed between JSPs or servlets using the request object to store them.

There are also standard actions for using applets in a JSP. These actions isolate you from the browser-specific details of how to embed an applet in HTML.

    [ Team LiB ] Previous Section Next Section