|
Struts example source code file (struts.xml)
The Struts struts.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"> <!-- START SNIPPET: xworkSample --> <struts> <!-- Some or all of these can be flipped to true for debugging --> <constant name="struts.i18n.reload" value="false" /> <constant name="struts.devMode" value="true" /> <constant name="struts.configuration.xml.reload" value="false" /> <constant name="struts.custom.i18n.resources" value="globalMessages" /> <constant name="struts.action.extension" value="action,," /> <constant name="struts.codebehind.defaultPackage" value="person" /> <constant name="struts.freemarker.manager.classname" value="customFreemarkerManager" /> <constant name="struts.serve.static" value="true" /> <constant name="struts.serve.static.browserCache" value="false" /> <constant name="actionPackages" value="org.apache.struts2.showcase.person"/> <include file="struts-chat.xml" /> <include file="struts-interactive.xml" /> <include file="struts-hangman.xml" /> <include file="struts-tags.xml"/> <include file="struts-validation.xml" /> <include file="struts-actionchaining.xml" /> <include file="struts-ajax.xml" /> <include file="struts-fileupload.xml" /> <include file="struts-person.xml" /> <include file="struts-wait.xml" /> <include file="struts-jsf.xml" /> <include file="struts-token.xml" /> <include file="struts-model-driven.xml" /> <include file="struts-integration.xml" /> <include file="struts-filedownload.xml" /> <include file="struts-conversion.xml" /> <include file="struts-freemarker.xml" /> <include file="struts-tiles.xml" /> <include file="struts-xslt.xml" /> <package name="default" extends="struts-default"> <interceptors> <interceptor-stack name="crudStack"> <interceptor-ref name="checkbox" /> <interceptor-ref name="params" /> <interceptor-ref name="staticParams" /> <interceptor-ref name="defaultStack" /> </interceptor-stack> </interceptors> <default-action-ref name="showcase" /> <action name="showcase"> <result>showcase.jsp </action> <action name="viewSource" class="org.apache.struts2.showcase.source.ViewSourceAction"> <result>viewSource.jsp </action> <action name="date" class="org.apache.struts2.showcase.DateAction" method="browse"> <result name="success">/date.jsp </action> </package> <package name="skill" extends="default" namespace="/skill"> <default-interceptor-ref name="crudStack"/> <action name="list" class="org.apache.struts2.showcase.action.SkillAction" method="list"> <result>/empmanager/listSkills.jsp <interceptor-ref name="basicStack"/> </action> <action name="edit" class="org.apache.struts2.showcase.action.SkillAction"> <result>/empmanager/editSkill.jsp <interceptor-ref name="params" /> <interceptor-ref name="basicStack"/> </action> <action name="save" class="org.apache.struts2.showcase.action.SkillAction" method="save"> <result name="input">/empmanager/editSkill.jsp <result type="redirect">edit.action?skillName=${currentSkill.name} </action> <action name="delete" class="org.apache.struts2.showcase.action.SkillAction" method="delete"> <result name="error">/empmanager/editSkill.jsp <result type="redirect">edit.action?skillName=${currentSkill.name} </action> </package> <package name="employee" extends="default" namespace="/employee"> <default-interceptor-ref name="crudStack"/> <action name="list" class="org.apache.struts2.showcase.action.EmployeeAction" method="list"> <result>/empmanager/listEmployees.jsp <interceptor-ref name="basicStack"/> </action> <action name="edit-*" class="org.apache.struts2.showcase.action.EmployeeAction"> <param name="empId">{1} <result>/empmanager/editEmployee.jsp <interceptor-ref name="crudStack">execute </action> <action name="save" class="org.apache.struts2.showcase.action.EmployeeAction" method="save"> <result name="input">/empmanager/editEmployee.jsp <result type="redirect">edit-${currentEmployee.empId}.action </action> <action name="delete" class="org.apache.struts2.showcase.action.EmployeeAction" method="delete"> <result name="error">/empmanager/editEmployee.jsp <result type="redirect">edit-${currentEmployee.empId}.action </action> </package> </struts> <!-- END SNIPPET: xworkSample --> Other Struts examples (source code examples)Here is a short list of links related to this Struts struts.xml source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
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.