InfoCenter Home >
4: Developing applications >
4.2: Building Web applications >
4.2.1: Developing servlets >
4.2.1.2: Servlet support and environment in WebSphere >
4.2.1.2.3: Using the WebSphere servlets for a head start
4.2.1.2.3: Using the WebSphere servlets for a head start
IBM Application Server provides internal (built-in) WebSphere servlets
that you can add to your Web applications to enable optional functions.
The tables below describe each WebSphere servlet and how to use the Java console
to add it to a Web application.
To determine
whether a WebSphere servlet currently belongs to a Web application, check the
Web application configuration for the presence of the servlet by its administrative
name.
Invoke servlets by class name
Objective |
Invoke servlets by class or code names (such as MyServletClass) |
Servlet administrative name |
invoker |
Servlet code |
com.ibm.servlet.engine.webapp.Invoker |
How to add to Web application |
When using the Console -> Task ->
Configure a Web application wizard, specify to serve servlets by classname.
For an existing Web application, use the Console -> Tasks -> Add a servlet
wizard. |
More information |
Using the Invoker servlet
is considered a security exposure that can be avoided by performing
certain administrative tasks. See the Related information for details.
The default invoker's URL in Servlet 2.2 compliance mode
is /servlet/* , not /servlet/.
See file, New Servlet Engine option
for migrating applications to Servlet 2.2, for information on the two modes: compliance
versus compatibility.
|
Serve files without specifically configuring them
Objective |
Serve HTML, servlets, or other files in the Web application
document root without extra configuration steps.
For HTML files, you will not need to add a pass rule to
the Web server. For servlets, you will not need to explicitly
ocnfigure the servlets in the WebSphere administrative domain.
|
Servlet administrative name |
file |
Servlet code |
com.ibm.servlet.engine.webapp.SimpleFileServlet |
How to add to Web application |
When using the Console -> Task ->
Configure a Web application wizard, specify
to enable the file servlet.
For an existing Web application, use the Console -> Tasks -> Add a servlet
wizard. |
More information |
This servlet handles files in the application document root whose
URLs are not covered by the configured servlet URLs |
Enable Web applications to serve JSP files
Objective |
Enable the JSP page compiler to
allow Web application to handle JSP files |
Servlet administrative name |
See section 4.2.1.2 |
Servlet code |
See section 4.2.1.2 |
How to add to Web application |
When using the Console -> Task ->
Configure a Web application wizard, specify a
JSP level for the Web application.
For an existing Web application, use the Console -> Tasks
-> Add a JSP enabler wizard. |
More information |
Adding a JSP processor to an application is required
if the Web application contains JSP files.
|
Enable an error page without having to write one
Enable servlet chaining
Objective |
Enable a servlet chain, in which servlets forward
output and responses to other servlets for processing |
Servlet administrative name |
Chainer |
Servlet code |
com.ibm.websphere.servlet.filter.ChainerServlet |
How to add to Web application |
Configure the Web application, then add the Chainer servlet by
using the Console -> Tasks -> Add
a servlet wizard. |
More information |
|
|
|