You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jonathan <ja...@i-2000.com> on 2001/07/10 16:01:27 UTC
can Struts tags create a bean using constructor instead of setter
Are struts tags currently designed to handle this for me?:
====================================================
package com.vnu.models;
public class JumpUrlsBean extends java.lang.Object{
private String targetUrl = null;
private String successUrl = null;
private String failureUrl = null;
public JumpUrlsBean(String targetUrl, String successUrl, String failureUrl){
this.targetUrl = targetUrl;
this.successUrl = successUrl;
this.failureUrl = failureUrl;
}
public String getTargetUrl(){
return this.targetUrl;
}
public String getSuccessUrl(){
return this.successUrl;
}
public String getFailureUrl(){
return this.failureUrl;
}
}
====================================================
There is purposely no setter method because it shouldnt be modifyable. However, I want Struts to populate it for me