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

Struts example source code file (SpringResult.java)

This example Struts source code file (SpringResult.java) 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

exception, exception, result, result, springresult, springresult, string, string

The Struts SpringResult.java source code

package com.opensymphony.xwork2.spring;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.Result;

public class SpringResult implements Result {

	private static final long serialVersionUID = -2877126768401198951L;

	private boolean initialize = false;

	//  this String should be populated by spring
	private String stringParameter;

	public void initialize() {
		// this method should be called by spring
		this.initialize = true;
	}

	public void execute(ActionInvocation invocation) throws Exception {
		// intetionally empty
	}

	public void setStringParameter(String stringParameter) {
		this.stringParameter = stringParameter;
	}

	public String getStringParameter() {
		return this.stringParameter;
	}

	public boolean isInitialize() {
		return this.initialize;
	}
}

Other Struts examples (source code examples)

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