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

Struts example source code file (struts-integration.xml)

This example Struts source code file (struts-integration.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 - Struts tags/keywords

apache, apache, configuration, display, display, doctype, foundation//dtd, model-driven, model-driven, public, software, struts, utf-8, utf-8

The Struts struts-integration.xml source code

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

<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
  <package name="integration" extends="struts1-default" namespace="/integration">

    <interceptors>
      <interceptor name="gangsterForm" class="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor">
        <param name="className">org.apache.struts2.showcase.integration.GangsterForm
        <param name="name">gangsterForm
      </interceptor>
      <interceptor name="gangsterValidation" class="org.apache.struts2.s1.ActionFormValidationInterceptor">
        <param name="pathnames">/org/apache/struts/validator/validator-rules.xml,/WEB-INF/validation.xml
      </interceptor>

      <interceptor-stack name="integration">
        <interceptor-ref name="staticParams"/>
        <interceptor-ref name="gangsterForm"/>
        <interceptor-ref name="modelDriven"/>
        <interceptor-ref name="actionForm-reset"/>
        <interceptor-ref name="basicStack"/>
        <interceptor-ref name="gangsterValidation"/>
        <interceptor-ref name="workflow"/>
      </interceptor-stack>
    </interceptors>

    <default-interceptor-ref name="integration"/>
    <default-action-ref name="editGangster"/>

    <!-- Display entry page that uses Model-Driven technique -->
    <action name="editGangster" class="org.apache.struts2.s1.Struts1Action">
      <param name="className">org.apache.struts2.showcase.integration.EditGangsterAction
      <result>modelDriven.jsp
    </action>

    <!-- Display the result page whose content is populated using the Model-Driven technique -->
    <action name="saveGangster" class="org.apache.struts2.s1.Struts1Action">
      <param name="className">org.apache.struts2.showcase.integration.SaveGangsterAction
      <param name="validate">true
      <result name="input">modelDriven.jsp
      <result>modelDrivenResult.jsp
    </action>

  </package>
</struts>

Other Struts examples (source code examples)

Here is a short list of links related to this Struts struts-integration.xml source code file:

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

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 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.