Java Reference
In-Depth Information
The web.xml Configuration
Finally, as with any standard Java web application, you'll need the WEB-
INF/web.xml file. This is where you configure the web application to use
Stripes. The two elements that handle incoming requests are the Stripes
filter and the dispatcher servlet. Here is how you set them up in web.xml :
Download getting_started/web/WEB-INF/web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>
Ê
<filter>
<filter-name> StripesFilter </filter-name>
<filter-class>
net.sourceforge.stripes.controller.StripesFilter
</filter-class>
<init-param>
Ë
<param-name> ActionResolver.Packages </param-name>
<param-value> stripesbook.action </param-value>
</init-param>
</filter>
Ì
<servlet>
<servlet-name> DispatcherServlet </servlet-name>
<servlet-class>
net.sourceforge.stripes.controller.DispatcherServlet
</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
Í
<filter-mapping>
<filter-name> StripesFilter </filter-name>
<servlet-name> DispatcherServlet </servlet-name>
<dispatcher> REQUEST </dispatcher>
<dispatcher> FORWARD </dispatcher>
</filter-mapping>
Î
<servlet-mapping>
<servlet-name> DispatcherServlet </servlet-name>
<url-pattern> * .action </url-pattern>
</servlet-mapping>
Ï
<welcome-file-list>
<welcome-file> index.jsp </welcome-file>
</welcome-file-list>
</web-app>
 
 
Search WWH ::




Custom Search