alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Spring Framework example source code file (web.xml)

This example Spring Framework source code file (web.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Spring Framework tags/keywords

basic, basic, servletunit, simply, simply, this, this, used, utf-8, utf-8, webapplicationcontext

The Spring Framework web.xml source code

<?xml version="1.0" encoding="UTF-8"?>


<web-app>
	<display-name>ticket-webapp
	<description>Web interface for ticket application
	
	<distributable/>
	
	<!--
	<listener>
		<listener-class>com.wrox.j2eedd.ticket.web.SessionCleanupListener
	</listener>
-->


	<!-- This servlet must be loaded first to configure the log4j
	 system and create the WebApplicationContext
	 -->
	<servlet>
		<servlet-name>config
		<servlet-class>org.springframework.framework.web.context.ContextLoaderServlet
		<init-param>
			<param-name>contextClass
			<param-value>org.springframework.framework.web.context.XMLWebApplicationContext   		
		</init-param>	
		<init-param>
			<param-name>log4jPropertiesUrl
			<param-value>/WEB-INF/log4j_PRODUCTION.properties   		
		</init-param>	
		<!-- This is essential -->
		<load-on-startup>1
	  </servlet>
  
  
  <servlet>
      	<servlet-name>boxOffice
      	<servlet-class>org.springframework.framework.web.workflow.CommandServlet	
  </servlet>  
  
  
  
  
  <servlet-mapping>
        	<servlet-name>boxOffice
        	<url-pattern>/*.html
  </servlet-mapping>
  
  <servlet-mapping>
          	<servlet-name>config
          	<url-pattern>/context/context.html
  </servlet-mapping>
  

<session-config>
<session-timeout>60
</session-config>

<welcome-file-list>
	<!-- Simply doesn't work to a servlet -->
	<welcome-file>/welcome.jsp
</welcome-file-list>

<error-page>
     <error-code>403
     <location>/jsp/layout/twocolumn/403-Forbidden.jsp
  </error-page>
  
    <error-page>
       <error-code>404
       <location>/jsp/layout/twocolumn/404-NotFound.jsp
  </error-page>
  
  <error-page>
         <exception-type>java.lang.Throwable
         <location>/jsp/layout/twocolumn/uncaughtException.jsp
  </error-page>
  
 <taglib>
 	      	<taglib-uri>/bind
 	      	<taglib-location>/WEB-INF/tlds/b11.tld
   </taglib>
   
   <taglib>
   	      	<taglib-uri>/events
   	      	<taglib-location>/WEB-INF/tlds/event11.tld
  </taglib>
  
  <security-constraint>
  	<web-resource-collection>
  	<web-resource-name>SalesInfo
  	</web-resource-name>
  	<url-pattern>purchase.html
  	<http-method>GET
  	<http-method>POST
  	</web-resource-collection>
  	<auth-constraint>
  	<role-name>registeredUsers
  	</auth-constraint>
  	<user-data-constraint>  		
  	<transport-guarantee>NONE
  	</user-data-constraint>
</security-constraint>

 
 	<login-config>
 		<auth-method>FORM
 		
 		<!-- Used only for BASIC authentication: only included because ServletUnit needs it -->
 		<realm-name>ticket
 		
 		<form-login-config>
 			<form-login-page>login.jsp
 			<form-error-page>loginError.jsp
 		</form-login-config>
 	</login-config>
 	
 	
 	<security-role>
		<role-name>registeredUsers
	</security-role>

	


<ejb-ref>
	<ejb-ref-name>ejb/FixtureManager
	<ejb-ref-type>Session
	<home>com.wrox.j2eedd.ticket.ejb.fixturemanager.FixtureManagerRemoteHome
	<remote>com.wrox.j2eedd.ticket.ejb.fixturemanager.FixtureManagerRemote
	<ejb-link>FixtureManager
</ejb-ref>


<ejb-ref>
	<ejb-ref-name>ejb/BoxOffice
	<ejb-ref-type>Session
	<home>com.wrox.j2eedd.ticket.ejb.booking.BoxOfficeRemoteHome
	<remote>com.wrox.j2eedd.ticket.ejb.booking.BoxOfficeRemote
	<ejb-link>BookingManager
</ejb-ref>

<ejb-ref>
	<ejb-ref-name>ejb/CustomerManager
	<ejb-ref-type>Session
	<home>com.wrox.j2eedd.ticket.ejb.customer.CustomerManagerRemoteHoms
	<remote>com.wrox.j2eedd.ticket.ejb.customer.CustomerManagerRemote
	<ejb-link>CustomerManager
</ejb-ref>
	
</web-app>

Other Spring Framework examples (source code examples)

Here is a short list of links related to this Spring Framework web.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.