<s:action name="getsoftware_id" id="getsoftware_id" executeResult="true"/>
<tr>
<td><div align="center">软件编号:</div></td>
<td><div align="left"><s:textfield name="softwareid" value="software_id" readonly="true"/></div></td>
</tr> 这是我调用的action。 public String getsoftwareid()
{
softwareDAO sd = new softwareDAO();
software_id=sd.getsoftwareid();
System.out.println("software_id is:"+software_id);
if(software_id.length()>0)
{
return ActionSupport.SUCCESS;
}
else
{
return ActionSupport.INPUT;
}
}
这是我action类里面getsoftwareid的方法.这里有set和get方法把software_id返回了。 <action name="getsoftware_id" class="com.gdqy.ITAM.Action.softwareAction" method="getsoftwareid">
<result name="success">/jsp/ITAM_newsoftware.jsp</result>
<result name="input">/jsp/error.jsp</result>
</action>
这是struts.xml文件的信息. 我为什么拿不到software_id。在拿到software_id的页面总是包含了input转向的页面.这是什么原因啊。我该怎样该。请高手回答
<tr>
<td><div align="center">软件编号:</div></td>
<td><div align="left"><s:textfield name="softwareid" value="software_id" readonly="true"/></div></td>
</tr> 这是我调用的action。 public String getsoftwareid()
{
softwareDAO sd = new softwareDAO();
software_id=sd.getsoftwareid();
System.out.println("software_id is:"+software_id);
if(software_id.length()>0)
{
return ActionSupport.SUCCESS;
}
else
{
return ActionSupport.INPUT;
}
}
这是我action类里面getsoftwareid的方法.这里有set和get方法把software_id返回了。 <action name="getsoftware_id" class="com.gdqy.ITAM.Action.softwareAction" method="getsoftwareid">
<result name="success">/jsp/ITAM_newsoftware.jsp</result>
<result name="input">/jsp/error.jsp</result>
</action>
这是struts.xml文件的信息. 我为什么拿不到software_id。在拿到software_id的页面总是包含了input转向的页面.这是什么原因啊。我该怎样该。请高手回答
解决方案 »
- 我数据库中有两条符合条件的记录,为什么只能查出来一条呢,代码如下,请朋友们帮忙!!!
- B/S构架, 一般大家都碰到什么棘手,不好解决的问题?
- 怎样实现注册功能?请求帮助!
- java 与支付宝接口
- TOMCAT启动不了是怎么回事?
- 怎么把一个数组里面的数据去除重复值付给另一个数组??
- JSP论坛里最傻的问题,会的来看,很急
- 求JSP上传方法
- 用jsp+java bean实现用户注册、登录,求原代码(高分)
- 想找个JAVA相关的工作,请各位热心的朋友帮下忙,本人自信对JAVA还是挺了解的
- java.sql.SQLException: Out of memory
- 请问hibernate多表联合查询的时候每个表都必须有主键吗?
然后再页面上用
#request.software_id
获取
<tr>
<td> <div align="center">软件编号: </div> </td>
<td> <div align="left"> <s:textfield name="software_id" value="software_id" readonly="true"/> </div> </td>
</tr>
id="getsoftware_id"executeResult="true"/>再action配置的 result去掉
{
return ActionSupport.SUCCESS;
}
else
{
return ActionSupport.INPUT;
}
}
首先确定这里走的是success还是input