|
Struts example source code file (struts-view.xml)
The Struts struts-view.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="view" extends="struts-portlet-default" namespace="/view"> <action name="index" class="com.opensymphony.xwork2.ActionSupport"> <result name="success">/WEB-INF/view/index.jsp </action> <action name="formExample" class="org.apache.struts2.portlet.example.FormExample" method="input"> <result name="input"> /WEB-INF/view/formExampleInput.jsp </result> </action> <action name="processFormExample" class="org.apache.struts2.portlet.example.FormExample"> <result name="input"> /WEB-INF/view/formExampleInput.jsp </result> <result name="success"> /WEB-INF/view/formExample.jsp </result> </action> <action name="formExamplePrg" class="org.apache.struts2.portlet.example.FormExample"> <result name="input"> /WEB-INF/view/formExampleInputPrg.jsp </result> <result name="success" type="redirectAction"> <param name="actionName">formExamplePrg <param name="method">displayResult <param name="firstName">${firstName} <param name="lastName">${lastName} </result> <result name="displayResult"> /WEB-INF/view/formExample.jsp </result> </action> <action name="formExampleModelDriven" class="org.apache.struts2.portlet.example.FormExampleModelDriven"> <result name="input"> /WEB-INF/view/formExampleInputModelDriven.jsp </result> <result name="success"> /WEB-INF/view/formExample.jsp </result> </action> <action name="validationExample" class="org.apache.struts2.portlet.example.FormExample" method="input"> <result name="input"> /WEB-INF/view/formExampleInputValidation.jsp </result> </action> <action name="processValidationExample" class="org.apache.struts2.portlet.example.FormExample"> <result name="success"> /WEB-INF/view/formExample.jsp </result> <result name="input"> /WEB-INF/view/formExampleInputValidation.jsp </result> </action> <action name="fileUpload" class="org.apache.struts2.portlet.example.fileupload.FileUploadAction"> <result name="input"> /WEB-INF/view/fileUpload.jsp </result> <result name="success"> /WEB-INF/view/fileUploadSuccess.jsp </result> </action> <action name="tokenExample" class="com.opensymphony.xwork2.ActionSupport" method="input"> <result name="input"> /WEB-INF/view/tokenExampleInput.jsp </result> </action> <action name="processTokenExample" class="com.opensymphony.xwork2.ActionSupport"> <result name="input"> /WEB-INF/view/tokenExampleInput.jsp </result> <result name="invalid.token"> /WEB-INF/view/tokenExampleInput.jsp </result> <result name="success"> /WEB-INF/view/tokenExample.jsp </result> <interceptor-ref name="portletDefaultStackWithToken" /> </action> <action name="springExample" class="springAction"> <result name="success"> /WEB-INF/view/springExample.jsp </result> </action> <action name="freeMarkerExample" class="com.opensymphony.xwork2.ActionSupport" method="input"> <result type="freemarker" name="input"> /WEB-INF/view/freeMarkerExampleInput.ftl </result> </action> <action name="processFreeMarkerExample" class="org.apache.struts2.portlet.example.FormExample"> <result name="success">/view/processFreeMarkerView.action?firstName=${firstName}&lastName=${lastName} </action> <action name="processFreeMarkerView" class="org.apache.struts2.portlet.example.FormExample"> <result type="freemarker" name="success">/WEB-INF/view/freeMarkerExample.ftl </action> <action name="velocityHelloWorld" class="com.opensymphony.xwork2.ActionSupport"> <result type="velocity" name="success">/WEB-INF/view/helloWorld.vm </action> </package> </struts> Other Struts examples (source code examples)Here is a short list of links related to this Struts struts-view.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.