+

Search Tips   |   Advanced Search

Default Application

WebSphere Application Server provides a default configuration that administrators can use to easily verify that the Application Server is running. When the product is installed, it includes an application server called server1 and an enterprise application called Default Application.

Default Application contains a web module called DefaultWebApplication and an enterprise bean JAR file called Increment. The Default Application provides a number of servlets, described. These servlets are available in the product.


Snoop servlet

Use the Snoop servlet to retrieve information about a servlet request. This servlet returns the following information:

The Snoop servlet includes security configuration so that when WebSphere Security is enabled, clients must supply a user ID and password to initiate the servlet.

(iseries) The URL for the Snoop servlet is: http://your.server.name:9080/HitCount.jsp.

(dist)(zos) The URL for the Snoop servlet is: http://localhost:9080/snoop/.


HelloHTML servlet

Use the HelloHTML pervasive servlet to exercise the PageList support provided by the WebSphere web container. This servlet extends the PageListServlet, which provides APIs that allow servlets to call other web resources by name or, when using the Client Type detection support, by type.

(iseries) We can invoke the Hello servlet from an HTML browser, speech client, or most Wireless Application Protocol (WAP) enabled browsers using the URL: http://your.server.name:9080/HitCount.jsp.

(dist)(zos) We can invoke the Hello servlet from an HTML browser, speech client, or most Wireless Application Protocol (WAP) enabled browsers using the URL: http://localhost:9080/HelloHTML.jsp.

transition: The PageList Servlet custom extension is deprecated in WebSphere Application Server v8.5 and will be removed in a future release. Re-architect the legacy applications to use javax.servlet.filter classes instead of com.ibm.servlet classes. Starting from the Servlet 2.3 specification, javax.servlet.filter classes we can intercept requests and examine responses. We can also use javax.servlet.filter classes to achieve chaining functionality, as well as embellishing or truncating responses.


HitCount application

Use the HitCount demonstration application to demonstrate how to increment a counter using a variety of methods, including:

We can instruct the servlet to execute any of these methods within a transaction that you can commit or roll back. If the transaction is committed, the counter is incremented. If the transaction is rolled back, the counter is not incremented.

The enterprise bean method uses a container-managed persistence enterprise bean that persists the counter value to an Apache Derby database. This enterprise bean is configured to use the Default Datasource, which is set to the DefaultDB database.

When using the enterprise bean method, we can instruct the servlet to look up the enterprise bean, either in the WebSphere global namespace, or in the namespace local to the application.

(iseries) The URL for the HitCount application is: http://your.server.name:9080/HitCount.jsp.

(dist)(zos) The URL for the HitCount application is: http://localhost:9080/HitCount.jsp.


Related concepts

  • Web applications
  • Web modules
  • Class loaders
  • Access the samples


    Related tasks

  • Task overview: Deploy web applications

  • Web applications: Resources for learning


    Related information:

  • Servlets