JavaServer Faces (JSF) implementations must provide request processing life cycle services using a servlet as defined by the Sun JavaServer Faces Specification. The Web application deployment descriptor must specify the request path mappings for the application's servlets and JSPs. You can map full paths, partial paths, or file extensions to servlets. Path mappings are specified relative to the application's root request path.
To add a servlet:
Select web.xml in the WorkSpace Navigator of the Web Application Development perspective.
The web.xml editor opens.
Select the Servlet tab of the editor.
The Servlet page appears displaying defined servlets and general information, servlet mappings, initialization parameters, security role references, run as, and icons for the selected servlet.
Click Add.
A new servlet is added to the Servlet Elements list with the default name New Servletx.
(Optional) Change the default Servlet name to a unique, descriptive name in the Servlet name field of the General Information section..
Do one of the following:
To select a servlet class:
Click Browse adjacent to the Servlet class field.
The Select Type dialog box appears.
Select a type and click OK.
To select a JSP file:
Click Browse adjacent to the JSP file field.
The Select File dialog box appears.
Select a .jsp file and click OK.
In the Servlet Mappings section, click Add.
The URL Mapping dialog box appears.
Type the URL that you want to use and click OK.
In the Initialization Parameters section, click Add.
The Initialization Parameter dialog box appears..
Type a name and value for the parameter and click OK.
In the Security Role References section, click Add.
The Security Role Reference dialog box appears.
Type reference name in the Role reference name field.
Click the arrow in the Role link field to open the drop-down list and select a role link.
(Optional) Type a description for the role line in the Description field.
In the Run as section, click Select.
The Security Role Selection dialog box appears.
Select the security role that you want to use and click OK.
(Optional) Click Browse in the Icons section.
You can browse for and select either a small or large icon.
Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com