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

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

This example Struts source code file (struts-token.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, doctype, doctype, foundation//dtd, foundation//dtd, public, software, software, struts

The Struts struts-token.xml source code

<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
    <package name="token" extends="struts-default" namespace="/token">

        <action name="tokenPrepare!*" class="org.apache.struts2.showcase.token.TokenAction" method="{1}">
            <interceptor-ref name="defaultStack"/>
            <result name="input">example1.jsp
        </action>

        <action name="transfer" class="org.apache.struts2.showcase.token.TokenAction">
            <interceptor-ref name="defaultStack"/>
            <interceptor-ref name="token"/>
            <result name="invalid.token">doublePost.jsp
            <result name="success">transferDone.jsp
        </action>



        <action name="tokenPrepare2!*" class="org.apache.struts2.showcase.token.TokenAction" method="{1}">
            <interceptor-ref name="defaultStack"/>
            <result name="input">example2.jsp
        </action>

        <action name="transfer2" class="org.apache.struts2.showcase.token.TokenAction">
            <interceptor-ref name="defaultStack"/>
            <interceptor-ref name="token"/>
            <result name="invalid.token">doublePost.jsp
            <result name="success" type="redirect">transferDone.jsp
        </action>



        <action name="tokenPrepare3!*" class="org.apache.struts2.showcase.token.TokenAction" method="{1}">
            <interceptor-ref name="defaultStack"/>
            <result name="input">example3.jsp
        </action>

        <action name="transfer3" class="org.apache.struts2.showcase.token.TokenAction">
            <interceptor-ref name="defaultStack"/>
            <interceptor-ref name="tokenSession"/>
            <result name="invalid.token">doublePost.jsp
            <result name="success" type="redirect">transferDone.jsp
        </action>


        <action name="tokenPrepare4!*" class="org.apache.struts2.showcase.token.TokenAction" method="{1}">
            <interceptor-ref name="defaultStack"/>
            <interceptor-ref name="createSession"/> 
            <result name="input" type="freemarker">example4.ftl
        </action>

        <action name="transfer4" class="org.apache.struts2.showcase.token.TokenAction">
            <interceptor-ref name="defaultStack"/>
            <interceptor-ref name="token"/>
            <result name="invalid.token">doublePost.jsp
            <result name="success">transferDone.jsp
        </action>

    </package>

</struts>

Other Struts examples (source code examples)

Here is a short list of links related to this Struts struts-token.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.