Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

A number of files are changing for with the transition from struts1 -> struts2 and this is a simple list of what files are important in the struts2 configuration and what they are used for.

  • web/WEB-INF/classes/struts.xml
    • This is the new struts2 configuration file and it defines the majority of the functionality of the struts2 framework including all of our interceptors, packages, and actions.
  • web/WEB-INF/classes/struts.properties
    • This is a companion file to the struts.xml file and it provides settings for how struts2 should run, so things like what default theme to use, what extension our actions use, what object factory to use, etc. This file should rarely need to be changed.
  • web/WEB-INF/tiles.xml
    • This is the new tiles2 definition file and defines all of our tiles targets and their components. This works basically the same as the old tiles-config.xml file.

...

  • src/org/apache/roller/ui/admin/struts2/admin-menu.xml
    • Same as above but for the "admin" tabbed menu.
  • web/WEB-INF/jsps/*/struts2/
    • This is a wildcard, but you get the point. All of the new struts2 jsps are under their own "struts2" directory which separates them from the old struts1 jsps while we migrate. This is just a convention to help us stay organized.

...

  • fix up use of "models"
    • models are no longer used with our struts2 actions. in struts2 your action is your model, so anything that was being used through a model class needs to be transferred into your action class. be selective here though, the old struts1 code provided lots of model methods which weren't really necessary.

Migrating JSPs

  • replace include for taglibs.jsp to taglibs-struts2.jsp
  • do a search and replace for "fmt:message key" with "s:text name"
  • replace html:form with s:form and delete the method param
  • change the new s:form action attribute to the correct action name, like myAction!method
  • replace instances of "html:text property" with "s:textfield name"
  • add "bean." in front of all name attributes for form fields if you are using a "bean".

Migration Progress

Core Actions

  • Login - migrated
  • Register - migrated
  • Profile Update - migrated
  • Create Weblog - migrated
  • Main Menu - migrated

Authoring Actions

  • Entry Add - migrated
  • Entry Edit - migrated
  • Entry Remove - migrated
  • Entries - migrated
  • Comments - migrated
  • Categories - migrated
  • Category Add - migrated
  • Category Edit - migrated
  • Category Remove - migrated
  • Bookmarks - migrated
  • Bookmark Add - migrated
  • Bookmark Edit - migrated
  • Folder Add - migrated
  • Folder Edit - migrated
  • Resources - migrated
  • Referrers
  • Weblog Settings - migrated
  • Weblog Remove - migrated
  • Theme Edit - migrated (mostly)
  • Templates List - migrated
  • Template Add - migrated
  • Template Edit - migrated
  • Template Remove - migrated
  • Pings - migrated
  • Custom Ping Targets - migrated
  • Maintenance - migrated

Admin Actions

  • Global Config - migrated
  • User Admin - migrated
  • Global Comment Management - migrated (mostly)
  • Global Ping Targets - migrated
  • Cache Info - migrated

Planet Actions

  • Planet Config
  • Planet Subscription
  • Planet Group