呵呵,看看页面里面有没有post啊?
UP
UP
解决方案 »
- SSH异常
- getParameter()与getParameterMap()的使用
- CAS authentication error的问题
- Hibernate 1对多映射的List属性总有null值是什么原因?
- 请教关于自定义标签的奇怪的问题!!!!
- Jsp与SQL SERVER连的时候,出现了一个问题,望高手指教...
- jspsmartmenu问题
- (救急)Weblog6.1如何解决中文问题?
- Ajax从数据库中动态提取出来的数据必须在下一行输出吗?怎么改变位置,让它在同一行输出
- SSI报错求教
- 怎样将actionform中的内容传递到前台
- 关于jni中用到package后 dll该如何放置的问题
<%@ page import="java.util.ArrayList"%>
<%@ page import="java.util.List"%>
<%@ page import="com.easypass.base.bean.BeanCustomQueryOutStorage"%>
<%@ page import="com.easypass.base.PageControl"%>
<html>
<head>
<title>
EPW003020
</title><link href="image/hgcss.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
margin-left: 3px;
}
-->
</style>
</head>
<script type="text/javascript" src="setday.js"></script>
<body bgcolor="#ffffff">
<FORM method="post" action ="EPExportSearchServlet"> <input name="CurrentPageNo" type="hidden" value="0">
<input name="SearchDate" type="hidden" value="">
<% String method=request.getMethod().trim();%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="13"><img src="image/rf.gif" width="13" height="26"></td>
<td width="100%" background="image/fb.gif">
<span class="style2">出口报关清单查询</span></td>
<td width="21"><img src="image/rr.gif" width="21" height="26"></td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="27"><img src="image/tfa.gif" width="27" height="25"></td>
<td width="100%" background="image/tt.gif"> </td>
<td width="42" align="right" background="image/tt.gif"><img src="image/tra.gif" width="27" height="25"></td>
</tr>
<tr>
<td width="27" background="image/tb.gif"> </td>
<td align="center" valign="top" bgcolor="#E1ECFE">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td width="30"></td>
<td>
<span class="style4">报关单号</span>
<input name="DUTYFORM_ID" type="text" class="text" size="17" value="<%=(method.toLowerCase().equals("post"))?(String)request.getAttribute("DUTYFORM_ID"):""%>">
<span class="style4">日期</span>
<input name="SearchDateFirst" type="text" onfocus="setday(this)" class="text" size="17" value="<%=(method.toLowerCase().equals("post"))?(String)request.getAttribute("SearchDateFirst"):""%>">
<input name="SearchDateEnd" type="text" onfocus="setday(this)" class="text" size="17" value="<%=(method.toLowerCase().equals("post"))?(String)request.getAttribute("SearchDateEnd"):""%>">
<input name="PageName" type="hidden" value="EPW003020.jsp">
<input name="Submit" type="submit" value="提交" class="text"></td>
<td> </td>
</tr>
<tr>
<td class="style4"></td>
<td>
</td>
<td> </td>
</tr>
<tr>
<td></td>
<td> </td>
<td> </td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="table1">
<tr align="center" class="style4" bgcolor="lightblue">
<td><span class="style6">报关单号</span></td>
<td><span class="style6">报关日期</span></td>
<td><span class="style6"></span></td>
</tr><jsp:useBean id="query" scope="request" class="com.easypass.base.bean.BeanCustomQueryOutStorage"/>
<jsp:useBean id="PgControl" scope="request" class="com.easypass.base.PageControl"/><%
int CurrentPageNO = 0;
int PrePageNO = 0;
int NextPageNO = 0;
int TotalPages = 0;
int TotalRows = 0;if(method.toLowerCase().equals("post")){
List list =(List)request.getAttribute("list");
PgControl = (PageControl)request.getAttribute("PgControl");
CurrentPageNO = PgControl.getCurrentPageNO();
PrePageNO = PgControl.getPrePageNO();
NextPageNO = PgControl.getNextPageNO();
TotalPages = PgControl.getTotalPages();
TotalRows = PgControl.getTotalRows();
for(int i = PgControl.getStartRowNO() ;i < PgControl.getEndRowNO() ;i++)
{
query=(BeanCustomQueryOutStorage)list.get(i);
out.println("<tr align='center' class='style4'>");
out.println("<td>" + query.getCUSTOM_LIST_NO() + "</td>");
out.println("<td>" + query.getDECLARE_DATE() + "</td>");
%>
<td><INPUT TYPE="submit" name="<%=i%>" value="详细情况" class="text" onclick="DUTYFORM_ID.value='<%=query.getCUSTOM_LIST_NO()%>';SearchDate.value='<%=query.getDECLARE_DATE()%>';PageName.value='EPW003011.jsp'"></td>
<%
out.println("</tr>");
}
}
else{
<tr class="style4" onMouseOver="this.style.backgroundColor='lightblue'" onMouseOut="this.style.backgroundColor='' ">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="style4" onMouseOver="this.style.backgroundColor='lightblue'" onMouseOut="this.style.backgroundColor='' ">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="style4" onMouseOver="this.style.backgroundColor='lightblue'" onMouseOut="this.style.backgroundColor='' ">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="style4" onMouseOver="this.style.backgroundColor='lightblue'" onMouseOut="this.style.backgroundColor='' ">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="style4"onMouseOver="this.style.backgroundColor='lightblue'" onMouseOut="this.style.backgroundColor='' ">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="style4" onMouseOver="this.style.backgroundColor='lightblue'" onMouseOut="this.style.backgroundColor='' ">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="style4" onMouseOver="this.style.backgroundColor='lightblue'" onMouseOut="this.style.backgroundColor='' ">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="style4" onMouseOver="this.style.backgroundColor='lightblue'" onMouseOut="this.style.backgroundColor='' ">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="style4" onMouseOver="this.style.backgroundColor='lightblue'" onMouseOut="this.style.backgroundColor='' ">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="style4" onMouseOver="this.style.backgroundColor='lightblue'" onMouseOut="this.style.backgroundColor='' ">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="style4" onMouseOver="this.style.backgroundColor='lightblue'" onMouseOut="this.style.backgroundColor='' ">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="style4" onMouseOver="this.style.backgroundColor='lightblue'" onMouseOut="this.style.backgroundColor='' ">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="style4" onMouseOver="this.style.backgroundColor='lightblue'" onMouseOut="this.style.backgroundColor='' ">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="style4" onMouseOver="this.style.backgroundColor='lightblue'" onMouseOut="this.style.backgroundColor='' ">
<td> </td>
<td> </td>
<td> </td>
</tr>
<%}%>
</table></td>
<td valign="middle" bgcolor="#E1ECFE"><img src="image/tz.gif" width="42" height="334"></td>
</tr>
<tr>
<td bgcolor="#E1ECFE"></td>
<td align="right" bgcolor="#E1ECFE">
<% out.print("总页数:" + TotalPages + " 当前页:" + CurrentPageNO);%>
<INPUT TYPE="text" NAME="GotoPage" size="2" class="text">页 <INPUT TYPE="submit" value="Go" class="text" onclick="CurrentPageNo.value=GotoPage.value">
<INPUT TYPE="submit" value="第一页" class="text" onclick="CurrentPageNo.value='0'">
<INPUT TYPE="submit" value="上一页" class="text" onclick="CurrentPageNo.value='<%=PrePageNO%>'">
<INPUT TYPE="submit" value="下一页" class="text" onclick="CurrentPageNo.value='<%=NextPageNO%>'">
<INPUT TYPE="submit" value="最后一页" class="text" onclick="CurrentPageNo.value='<%=TotalPages%>'">
</td>
<td bgcolor="#E1ECFE"></td>
</tr>
<tr>
<td><img src="image/tfb.gif" width="27" height="25"></td>
<td bgcolor="#E1ECFE" align="right"> </td>
<td align="right" bgcolor="#E1ECFE"><img src="image/trb.gif" width="27" height="25"></td>
</tr>
</table>
</form>
</body>
</html>
加上:
public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException{
doGet(request,response);
}
搞定。
<FORM method="post" action ="EPExportSearchServlet"> 你是否在web.xml中映射了EPExportSearchServlet这个SERVLET;
如果没有,则一般的SERVLET访问地址:
/servlet/EPExportSearchServlet
其他同学说的也有道理,也有那种情况,但我不是。