JSP Controls Tag Library Examples

Login Component with dependent user status component, dual Ajax and non-Ajax

Composite page aggregates two components: Login component and User Status component. User input is sent directly to the address of Login component. If XMLHTTPRequest object is available, Ajax mode is used to display updated fragment in-place, otherwise Redirect-After-Post pattern is used to reload the parent composite page, which pull up updated components.

Try to enable and to disable Javascript in your browser and see how the compoment behaves. You might want to use some kind of HTTP traffic sniffer like LiveHTTPHeaders to see the difference.

User Status component is declared as dependant of Login component, therefore each time Login receives a message, the User Status component redraws itself as well.

Pure JSP Login Component

Aggregated Struts/JSP Component, dual Ajax and non-Ajax

This version of Login component uses Struts as controller portion of applicatin to process input data and events. The appearance is the same as in previous example, but the code is different.

Struts/JSP Login Component

Tab Component, dual Ajax and non-Ajax

The tab component shows how to create tabbed notebook on a page, even several notebooks with different style, totally independent one from another. JSP Controls Tag Library has helper tags to build tabbed notebook components.

Notebook supports standard J2EE roles. Depending on user role, it shows or completely hides a tab panel and corresponding tab handle.

Tabbed Notebook Component