下面是jsp中radio标签的设置
<td align="center" colspan="2">
  <fieldset style="height:60;width:210">
  <legend>★付费状态</legend>
  <br>
  <s2:radio list="#request.payforState" name="showType.payforType" value="%{showType.payforType}"/>
  </fieldset>
  <fieldset style="height:60;width:210">
  <legend>★审核状态</legend>
  <br>
  <s2:radio list="#request.checkState" name="showType.stateType" value="%{showType.stateType}"/>
  </fieldset>
  </td>这里我设置了value=""值 name="" 值都设置了
当第一次执行action中的获取选项状态的值的方法时,可以获取相应的状态值,
当执行第二次就获取了值了,一直报错 空指针异常,java.lang.reflect.InvocationTargetException
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)java.lang.NullPointerException
com.cityinfo.action.AdminAction.validateListShow(AdminAction.java:307)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
下面是控制台输出的结果
第一次在控制台输出结果,可以获取值
执行了validateListShow()验证方法中showType值#################com.cityinfo.entity.AdminShowType@1665a0d
执行了validateListShow()验证方法 获取infoType#################3
执行了validateListShow()验证方法 获取getPayforType#################all
执行了validateListShow()验证方法 获取getStateType#################all第二次在控制台输出结果,无值,空指针
执行了validateListShow()验证方法中showType值#################null
下面是validateListShow()方法中的获取值得代码
System.out.println("执行了validateListShow()验证方法中else#################");
System.out.println("执行了validateListShow()验证方法中showType值####"+showType);
int getInfoType=showType.getInfoType();
System.out.println("执行了validateListShow()验证方法 获取infoType#######"+getInfoType);
String getPayforType=showType.getPayforType();
System.out.println("执行了validateListShow()验证方法 获取getPayforType#################"+getPayforType);
String getStateType=showType.getStateType();
System.out.println("执行了validateListShow()验证方法 获取getStateType#################"+getStateType);
if(getInfoType<=0){
if(session.get("infoType")!=null){
getInfoType=(Integer)session.get("infoType");
showType.setInfoType(getInfoType);
}

if(getPayforType==null||getPayforType.equals("")){
getPayforType=(String)session.get("payforType");
showType.setPayforType(getPayforType);
}
  if(getStateType==null||getStateType.equals("")){
  getStateType=(String)session.get("stateType");
  showType.setStateType(getStateType);
}
其中showType 这个属性是在action封装了一个类作为属性,用来封装radio的选项状态的值
这个类得代码如下
public class AdminShowType {
private String stateType;
private String payforType;
private int infoType;public String getPayforType() {
return payforType;
}
public void setPayforType(String payforType) {
this.payforType = payforType;
}
public String getStateType() {
return stateType;
}
public void setStateType(String stateType) {
this.stateType = stateType;
}
public int getInfoType() {
return infoType;
}
public void setInfoType(int infoType) {
this.infoType = infoType;
} 谢谢大哥大姐  
这样的问题怎么解决呀 ?