BBJSP Page (Deprecated)

The BBJSP system is deprecated. For new development, use BBxServlet.


In BBj 16.0 and higher, the Page is one of the core elements of the BBJSP framework.

The Page format is an extension to HTML format where you can enrich the output by embedding BBj code within a Scriptlet; use the pre-defined library of Core Tag Library or create your own BBJSP Tag Libraries.

Business logic can be developed using the Command Engine and the Pipeline Engine.


A declaration declares one or more variables or methods that you can use in your BBJ code later in the page. By convention it is recommended to place all declarations at the top of the BBJSP file. You can consider declared items as class variables or class methods.

Following is the syntax of a Declaration:

<%! declaration %>


An expression element contains a scripting language expression that is evaluated, converted to a String, and inserted where the expression appears in the final page. Because the value of an expression is converted to a String, you can use an expression within text, whether or not it is tagged with HTML. The expression element can contain any expression that is valid according to the BBJ Language Specification.

Following is the syntax of an Expression:

<%= expression %>


Comments do not appear in the generated HTML markup sent to the browser. A comment is useful when you want to hide or "comment out" part of your page. Comments cannot be nested; that is to say, you cannot have one comment within another.

Following is the syntax of a Comment:

<%-- This is your comment --%>

If you want a comment to appear n the generated HTML then use a standard html comment syntax.

Following is the syntax of a HTML comment:

<!-- A comment -->


A directive affects the overall structure of the servlet class. It usually has the following form:

Following is the syntax of JSP Expression:

<%@ directive attribute="value" %>

There are three directive as follows:



<%@ page ... %>

Defines page-dependent attributes, such as content-type, encoding and super-class that the page extends.

The following attributes are supported



describes the context type such as test/html;charset=UTF-8



specified the base class that the page will extend



specified the source file containing the base class

<%@ include ... %>

Includes a file during the translation phase.

The following attributes are supported:



The name of the file to include

<%@ use ... %>

tells the code generator to generate a USE statement

The following attributes are supported



specified the base class that the page will extend



specified the source file containing the base class


BBJSP actions use constructs in XML syntax to control the behavior of the servlet engine. You can dynamically insert a file, reuse BBj components, forward the user to another page, or generate HTML for the BBj plugin.

Following is the syntax of BBJSP Actions:

<bbj:action_name attribute='value' /> 

Action elements are predefined functions as follows:




Includes a file at the time the page is requested


Forwards the requester to a new page


Redirects the requester to a new page

Implicit Objects

BBJSP has several predefined objects. These are:




This is the BBjspWebRequest object associated with the request.


This is the BBjspWebResponse object associated with the response to the client.


This is the BBjspWebSession object associated with the request.


This is the BBjspPageContext that encapsulates use of server-specific features.


This is the BBjspSessionData associated with the request.

These implicit objects can be accessed within a Scriptlet to assist in page generation.

Using Widgets

Embedding Widgets provides another way to use data-centric objects in your page. Each named widget in a page can be accessed through the BBJSP Expression Language to present and use data. For more information about using Widgets, see the BBJSP Widget Overview page.

See Also




Core Tag Library

BBJSP Widget Overview

BBJSP Expression Language