Name |
Struts 2.0.x to 2.1.x Converter Plugin |
---|---|
Publisher |
|
License |
Open Source (ASL2) |
Version |
1.0 |
Compatibility |
Struts 2.0.2+ |
Homepage |
|
Download |
http://code.google.com/p/struts2-0-x-to-2-1-x-converter/downloads/list |
Overview
This tool follows the directives in Troubleshooting guide migrating from Struts 2.0.x to 2.1.x and updates the content of the JSP, XML and Java files creating a backup file for each updated one.
For example, one of the updates performed is to change
<s:url id="urlA" action="doThat" namespace="/myNameSpace"/> <s:div theme="ajax" href="%{urlA}" notifyTopics="/myTopic"/>
to
<s:url var="urlA" action="doThat" namespace="/myNameSpace"/> <sx:div href="%{#urlA}" afterNotifyTopics="/myTopic"/>
Usage
Download and run the yoshi_struts20x_to_21x_converter.jar using the common command for execute jar files:
> java -jar yoshi_struts20x_to_21x_converter.jar
Follow the instructions for the five steps:
Step 1: Set the Project Folder
Paste the full path of the folder where are the files (.JSP, .XML and .Java). The converter will search in all subfolders for candidates to update. This folder can be your java IDE project folder, for example.
If an empty text is setted, the program will abort.
Step 2: Comma-separated file extentions to update
List of comma-separated file extentions for content update.
I.e. jsp,xml. In this case only .JSP and .XML files found in the folder setted in Step 1 will be updated.
The default value of this information is jsp,xml,java (used if an empty text is setted).
Step 3: Charset of JSP files content
Charset of JSP files content.
The default value of this information is ISO-8859-1 (used if an empty text is setted).
Step 4: Struts 2.0.x tags prefix used in your project
The Struts 2.0.x tags prefix used in your project. Some developers like to use "custom" prefixs, like "struts" or "st" instead "s".
The default value of this information is s (used if an empty text is setted).
Step 5: Struts 2.1.x tags prefix to be used in your project
The Struts 2.1.x tags prefix to be used in your project. You will can use "custom" prefixs, like "strutsajax" or "sxt" instead "s".
The default value of this information is sx (used if an empty text is setted).
After this five steps, the program will request your final confirmation.
Important: Backup files will be created for updated files.
What Happens?
Also el expressions are replaced from all Struts 2 tags. Ognl expression are used instead.
I.e.
<s:div id="${myVar}"/>
changes to
<s:div id="%{#myVar}"/>
Version History
Version |
Date |
Author |
Notes |
---|---|---|---|
1.0 |
Jan 26, 2009 |
Initial release |