我在 Struts2 中有此方法的操作方法和验证方法。我想将此验证方法用于另一种操作方法。我不知道该怎么做。请帮忙。场景描述如下:
public class ApplicantRegistrationDetails extends ActionSupport {
public String personOfCollectiveTrademark() {
// some code..
}
public String insertAndValidateIECcode(){
// I have to use same validation method
// for this method as above.
}
//validation
public void validatePersonOfCollectiveTrademark() {
// validations for first method
}
}