My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information

Maven Repo - Example App - API - Trouble Shooting

Struts2 Conversation Plugin

Handling data across multi-page flows and multiple browser tabs is achieved with annotations and a Struts2-extending tag library.

As well, data that might normally be stored in the session can instead be managed in a conversation and released or timed-out by the framework to conserve system resources.

This plugin simplifies JEE application development, reducing boiler-plate code and configurations while delivering powerful conversation and flow management.

This plugin has not been tested for use in large-scale applications (with tens of thousands of concurrent requests), therefore its scalability has not been verified for such a scenario. It is strongly advised to perform load-testing on any mission-critical apps with a non-trivial number of users, whether using this library or not. That said, the testing that has been performed indicates that the conversation-processing overhead is minimal. Any feedback regarding performance is welcomed.


Quick Intro

  1. java
  2. tag lib
  3. struts.xml
  4. maven
  5. additional topics


public class RegistrationController extends ActionSupport implements ModelDriven<RegistrationModel> {

     //this field now a member of the "registration" conversation
     private RegistrationModel registrationModel; 

     //because method name starts with "begin", this action initiates the conversation
     public String beginRegistration() {
          return SUCCESS;

     //this action is an intermediate member of the conversation since the
     //method name does not start with "begin" or "end"
     public String continueRegistration() {
          return SUCCESS;

     //because method name starts with "end", the conversation is ended following
     //execution of this action
     public String endRegistration() {
          return SUCCESS;

     public RegistrationModel getModel() {
          return registrationModel;

tag lib

The sc:form and sc:url tags should be used to pass the conversation ids on the request:

<%@ taglib uri="/struts-tags" prefix="s"%> 
<%@ taglib uri="/struts-conversation-tags" prefix="sc"%>    
     <!-- a Struts2 form tag that will persist the conversation IDs -->  
     <sc:form action="continue-registration">

     <!-- a Struts2 url tag that will persist the conversation IDs --> 
     <sc:url action="continue-registration"/>

     <!-- a custom tag that will include the conversation IDs as hidden fields -->
     <!-- could be used, for instance, inside a Struts2 jQuery Plugin form tag -->


using a default stack:

	<package name="default" extends="struts-conversation-default"/>


using a custom stack:

	<package name="default" extends="struts-conversation-default">

			<interceptor-stack name="customStack">
				<interceptor-ref name="conversation" />
				<interceptor-ref name="defaultStack" />


		<default-interceptor-ref name="customStack" />


Note: As the interceptors inject the conversation fields, it is important to locate them higher in the stack than any interceptors that will depend on the fields having already been injected.


latest version dependency:


optional extension for use with the struts2-config-browser-plugin:


other than the standard Struts2 dependencies, this plugin also requires an slf4j implementation such as the log4j one that can be included with this dependency:


If you are using a Struts version earlier than 2.3.3, then you must also include the Commons Lang 3 library:

Powered by Google Project Hosting