<?xml version="1.0" encoding="iso-8859-1"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at
   
         http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<!DOCTYPE struts-config PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
        "http://struts.apache.org/dtds/struts-config_1_3.dtd">
<struts-config>
 	<global-exceptions>
 		<exception path="/extensions/exception.jsp"
 			key="common.msg.invalidtoken.error"
 			type="anyframe.web.struts.util.InvalidTokenException"
 			handler="org.apache.struts.action.ExceptionHandler" />
 		<exception path="/extensions/exception.jsp" 
 			key="common.mgs.error"
 			type="java.lang.Exception"
 			handler="org.apache.struts.action.ExceptionHandler" />
 	</global-exceptions>

 	<global-forwards/>
     <action-mappings>
     	<action path="/main"
        	forward="/extensions/main.jsp" />
     </action-mappings>
	<!-- ============================================= Controller Configuration -->
	<controller
        contentType="text/html;charset=utf-8"
        locale="true"
        processorClass="anyframe.web.struts.action.DefaultRequestProcessor" />
		
	<message-resources parameter="anyframe.sample.struts.web.common.SampleResources"/>
	
	<!-- =============================================== Plug Ins Configuration -->
  <!-- ======================================================= Tiles plugin -->
  <!--
     This plugin initialize Tiles definition factory. This later can takes some
	 parameters explained here after. The plugin first read parameters from
	 web.xml, thenoverload them with parameters defined here. All parameters
	 are optional.
     The plugin should be declared in each struts-config file.
       - definitions-config: (optional)
            Specify configuration file names. There can be several comma
		    separated file names (default: ?? )
       - moduleAware: (optional - struts1.1)
            Specify if the Tiles definition factory is module aware. If true
            (default), there will be one factory for each Struts module.
			If false, there will be one common factory for all module. In this
            later case, it is still needed to declare one plugin per module.
            The factory will be initialized with parameters found in the first
            initialized plugin (generally the one associated with the default
            module).
			  true : One factory per module. (default)
			  false : one single shared factory for all modules
	   - definitions-parser-validate: (optional)
	        Specify if xml parser should validate the Tiles configuration file.
			  true : validate. DTD should be specified in file header (default)
			  false : no validation

	  Paths found in Tiles definitions are relative to the main context.

      To use this plugin, download and add the Tiles jar to your WEB-INF/lib
      directory then uncomment the plugin definition below.
 -->
    <plug-in className="org.apache.struts.tiles.TilesPlugin" >
      <set-property property="definitions-config"
                       value="/WEB-INF/tiles-defs.xml" />
      <set-property property="moduleAware" value="true" />
    </plug-in>
    
	<!-- =================================================== Validator plugin -->
     <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
 	<set-property property="pathnames"
 		value="/org/apache/struts/validator/validator-rules-compressed.xml,
                                              /WEB-INF/validator/validation-sample.xml" />
 </plug-in>
</struts-config>

