1 / 17

E217 EP Portlets and Servlets: Step by Step and Side by Side

E217 EP Portlets and Servlets: Step by Step and Side by Side. Tommy Phillips Principal Systems Consultant E-Business West tommy@sybase.com. Introduction. Why Use Servlets in a Portal? How Do You Use Servlets in a Portal? Code Samples. Portal Display.

beth
Télécharger la présentation

E217 EP Portlets and Servlets: Step by Step and Side by Side

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. E217EP Portlets and Servlets: Step by Step and Side by Side • Tommy Phillips • Principal Systems Consultant • E-Business West • tommy@sybase.com

  2. Introduction • Why Use Servlets in a Portal? • How Do You Use Servlets in a Portal? • Code Samples

  3. Portal Display • Live Demo: Sybase Enterprise Portal Page

  4. Why Use Servlets? • Existing Code Re-use • Servlet Include • Back End to Applet – Or Portlet • Controversial, but Sometimes Useful • Developer Experience • Fast Ramp-up

  5. Why in a Portal? • Portlets Provide "GUI Integration" • Not EAI – Improving Daily Tasks • Leverage Existing Work • Incremental Implementation of Global Vision

  6. Session Dynamic Page Portlet Portlet Portlet External Systems External Systems External Systems External Systems Background: How JTF Portlets Work Browser Servlet: portal PI DB

  7. And What Is In Those "Portlets"? • Pre-Built Portlets: • Search, News, ERP access, etc. • Custom Portlets: • HTML-Based Presentation • Java-Coded Business Logic • OnePage • Mostly Used For Aggregation • Heterogenous Data Sources • Homogeneous Presentation

  8. Portlet Structure: Presentation • Presentation Layer: .inc File • Mapped to Distinct Client Platforms (HTML, WAP, etc.) • HTML: <BODY> Contents • Static Presentation • Form Elements (Buttons, Text Areas, etc.) • JTF Tags • Much like JSP Custom Tags • Allow JavaBean Data Access • Includes (Static or Servlet)

  9. A Closer Look At A JTF Portlet • Live Demo • Code • Include File • Java code

  10. How To: Existing Servlet Re-use • Servlet Include • JTF Tag: • "<jtf:include servlet="servletURL" value1="" operator="equals" value2=""/>" • Parameter Use • Caution: Watch Out for HTML

  11. Existing Servlet Re-Use: Code Sample • Servlet • Base Function: Display Page • JTF Include Servlet • Simple Inclusion • HTML Header Tricks • Cleaning Up Gracefully

  12. An Included Servlet • Live Demo • Raw Servlet • Included Servlet • Code • Servlet Code • Portlet Include

  13. How To: Back End for Portlet • Step 0: Applet Back End • Simple Text Content • Servlet Explicit Formatting • JTF Explicit Formatting • Format With JTF List

  14. Live Demo Code Applet Servlet Back End for Applet

  15. Primary Use of Servlets is to Generate HTML Whole Page or Partial Servlets Can Generate Any Text An Applet Can Display Servlet Output Simple Parsing Into Rich User Interface Breaking the Bonds of HTML Presentation Sidebar: Servlets as Applet Back Ends

  16. Live Demo Code Portlet Include Java Code Servlet Code Transforming to Back End for Portlet

  17. Sybase EP Portlets Provide Rich GUI Functionality Servlets Can Supplement New Portlet Development Portlets Can Include Existing Servlets Into the Portal Summary

More Related