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

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

This example Struts source code file (struts-conversion.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

action, action, apache, apache, configuration, doctype, enum, example, example, list, list, public, tiger, utf-8

The Struts struts-conversion.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="conversion" namespace="/conversion" extends="struts-default">
	
		<!-- Example populating a List inside an Action -->
		<action name="enterPersonsInfo" method="input"
				class="org.apache.struts2.showcase.conversion.PersonAction">
			<result>enterPersonInfo.jsp
		</action>
		<action name="submitPersonInfo" method="submit"
				class="org.apache.struts2.showcase.conversion.PersonAction">
			<result>showPersonInfo.jsp	
			<result name="input">enterPersonInfo.jsp
		</action>
		<action name="showPersonJspCode">
			<result type="plainText">/conversion/enterPersonInfo.jsp
		</action>
		<action name="showPersonActionJavaCode">
			<result type="plainText">/conversion/PersonAction.java.txt
		</action>
		<action name="showPersonJavaCode">
			<result type="plainText">/conversion/Person.java.txt
		</action>
		
		
		<!-- Example populating a Set inside an Action -->
		<action name="enterAddressesInfo" class="org.apache.struts2.showcase.conversion.AddressAction" method="input">
			<result>enterAddressInfo.jsp
		</action>
		<action name="submitAddressesInfo" class="org.apache.struts2.showcase.conversion.AddressAction" method="submit">
			<result>showAddressInfo.jsp
			<result name="input">enterAddressInfo.jsp
		</action>
		<action name="showAddressJspCode">
			<result type="plainText">/conversion/enterAddressInfo.jsp
		</action>
		<action name="showAddressActionJavaCode">
			<result type="plainText">/conversion/AddressAction.java.txt
		</action>
		<action name="showAddressJavaCode">
			<result type="plainText">/conversion/Address.java.txt
		</action>
		
		
		<!-- Example populating a List with Tiger 5 Enum  -->		
		<action name="enterOperationEnumInfo" class="org.apache.struts2.showcase.conversion.OperationsEnumAction" method="input">
			<result>enterOperations.jsp
		</action>
		<action name="submitOperationEnumInfo" class="org.apache.struts2.showcase.conversion.OperationsEnumAction" method="submit">
			<result>showOperations.jsp
			<result name="input">enterOperations.jsp
		</action>
		<action name="showEnumJspCode">
			<result type="plainText">/conversion/enterOperations.jsp
		</action>
		<action name="showOperationsEnumJavaCode">
			<result type="plainText">/conversion/OperationsEnum.java.txt
		</action>
		<action name="showOperationEnumActionJavaCode">
			<result type="plainText">/conversion/OperationsEnumAction.java.txt
		</action>
		<action name="showEnumTypeConverterJavaCode">
			<result type="plainText">/conversion/EnumTypeConverter.java.txt
		</action>
		<action name="showOperationsEnumActionConversionProperties">
			<result type="plainText">/conversion/OperationsEnumActionConversion.txt
		</action>
		
	</package>
</struts>	

Other Struts examples (source code examples)

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