当我第一次提交按钮时,它会点击动作。它不是woking但是当我将url复制到另一个标签时,它可以工作或点击它工作的地址栏
struts.xml中
<action name="ViewAllEmployeesPrinting" method="employeeSelectPrintingtMethod"
class="volo.tms.printing.ViewAllEmployeesPrinting">
<interceptor-ref name="loginStack"/>
<result name="success">/printingjob/ViewAllEmployeesPrinting.jsp</result>
</action>
<action name="viewPrintingReportflag" class="volo.tms.printing.ViewAllEmployeesPrinting" method="viewPrintingReportf">
<interceptor-ref name="loginStack"/>
<result name="input">/printingjob/ViewAllEmployeesPrinting.jsp</result>
<result name="success" type="chain">fetchJobList</result>
</action>
jsp文件
<s:form action="viewPrintingReportflag" method="post">
<table>
<tr> <td><label for="addnewc">Client Name:</label></td>
<td>
<s:select label="Client Name" headerKey="-1" headerValue="Select Client"
list="clientNameList" name="clientNames" theme="simple"/>
</td>
</tr>
<tr> <td> From Date*: </td><td><input type="text" id="datefrom" name="datefrom" readonly></td>
</tr>
<tr> <td>To Date*: </td><td><input type="text" id="dateTo" name="dateTo" readonly></td>
</tr>
<tr> <td> </td><td></td>
</tr>
</table>
<s:form>
和 java文件
public class ViewAllEmployeesPrinting extends ActionSupport implements Preparable {
private List<String> clientNameList;
private String clientNames;
private Date datefrom;
private Date dateTo;
public List<String> getClientNameList() {
return clientNameList;
}
public void setClientNameList(List<String> clientNameList) {
this.clientNameList = clientNameList;
}
public String getClientNames() {
return clientNames;
}
public void setClientNames(String clientNames) {
this.clientNames = clientNames;
}
public Date getDatefrom() {
return datefrom;
}
public void setDatefrom(Date datefrom) {
this.datefrom = datefrom;
}
public Date getDateTo() {
return dateTo;
}
public void setDateTo(Date dateTo) {
this.dateTo = dateTo;
}
public String employeeSelectPrintingtMethod() {
return "success";
}
public void prepare() throws Exception {
clientNameList = new ArrayList<String>();
clientNameList = ViewClientNameDao.viewClientNameList();
}
public String viewPrintingReportf(){
System.out.println("success");
return "success";
}
}
我提交按钮后找不到理由动作