Home > Articles > Programming > Java

  • Print
  • + Share This
From the author of

Creating the Web.xml Configuration File

The final step is to declare and configure the ActionServlet to use the internalized resources, ApplicationResources.properties, in the servlet tag, as shown in Listing 3. In the servlet-mapping tag, we specify that ActionServlet is mapped to all URIs with a .do extension. You must also declare the Struts tag library.

Listing 3 Web.xml—The Configuration File for the Web Application

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"

  <!-- Action Servlet Configuration -->

  <!-- Action Servlet Mapping -->

  <!-- The Welcome File List -->

  <!-- Struts Tag Library Descriptor -->
  • + Share This
  • 🔖 Save To Your Account