关于TOMCAT一个很奇怪的问题! 我以前碰到过这种情况是因为使用了<html:form>,在显示到一半的时候,会白页改为普通的<form>,问题解决 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 执行到一句HTML语句就停止了,即便HTML语句有错,代码也会继续往下执行啊,更何况没有错。 对了,我页面里没有使用form标签 你又没说什么Exception,那些Log信息都不给,这样叫别人猜 ,别人怎么可能知道。 没有任何异常啊,代码页面执行正常,就是执行到这句HTML语句,读到第三个字节处不往下读了,我是查看页面源文件发现的 就是你文件的问题,不可能是tomcat的错误,我遇到N次了 那是我文件哪里错了?这是文件源代码:<link rel="stylesheet" href="css/jysw2.css" type="text/css"><%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %><%@ page import="java.sql.*"%><style type=text/css><!--td,body,input,select {font-size: 12px;}.white {font-size: 12px;color: #003366;text-decoration: none;}.blue { text-decoration: underline;color:#000099;line-height: 18px;}.blue1{ text-decoration: underline;color:#003399;line-height: 12px;text-decoration: none;}a:hover {color: #FF3300;text-decoration: underline;}a:active {color:#800080}a.nav1 {font-size: 12px;color: #000000;text-decoration: none;}a.nav1:hover {color: #FFEFA5;text-decoration: underline;}a.nav1:active {color:#0099FF}.finput {BORDER-RIGHT: 0px ridge;BORDER-TOP: 1px ridge #727272; BORDER-LEFT: 1px ridge #727272; BORDER-BOTTOM: 0px ridge;font-size: 12px;}.foxinput {BORDER-RIGHT: 1px ridge; BORDER-TOP: #ffffff 1px ridge; BORDER-LEFT: #ffffff 1px ridge; BORDER-BOTTOM: 1px ridge; BACKGROUND-COLOR: #cccccc}.black {color: #000000; text-decoration: none;line-height: 18px;}.red {color: #FF0000; text-decoration: none;line-height: 18px;}.blue2 {line-height: 18px;color: #0033FF;text-decoration: underline;}.blue3 {line-height: 18px;color: #0031FF;text-decoration: none;}.blue4 {font-size: 12px;color: #0031FF;text-decoration: underline;}.blue5 {text-decoration: underline;color:#000099;line-height: 19px;}.blue6 {text-decoration: none;color:#000099;line-height: 19px;}.blue7 {color: #0031FF;text-decoration: none;}.blue8 {line-height: 18px;color: #000099;text-decoration: none;}.nc {font-size: 12px;line-height: 18px;letter-spacing: 2px;}//--></style><body bottomMargin=0 leftMargin=0 topMargin=0 rightMargin=0><TABLE width=800 border=0 align="center" cellPadding=0 cellSpacing=0> <TR> <TD width="3%" height="100%" rowSpan=10 valign="top" background=jysw_image/bg1222.jpg style="BACKGROUND-POSITION: right top; BACKGROUND-REPEAT: repeat-y"><a href="http://jingmen.18600.com"></a></TD> <TD width=1 bgColor=#000000 rowSpan=10></TD> <TD width=755 colSpan=2 background="jysw_image/jmcsby.jpg"> <object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0 height=123 width=755> <param name="movie" value="jysw_image/banner3.swf"> <param name="quality" value="high"> <param name="wmode" value="transparent"> <embed src="jysw_image/banner3.swf" quality=high type="application/x-shockwave-flash" width="755" height="123" wmode="transparent"> </embed> </object></TD> <TD width=1 bgColor=#000000 rowSpan=10></TD> <TD style="BACKGROUND-POSITION: left top; BACKGROUND-REPEAT: repeat-y" width="3%" background=jysw_image/bg1223.jpg height="100%" rowSpan=10></TD> </TR> <TR> <td width=755 align="center"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td bgcolor="#FFFFFF" > <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bgcolor="#666666"> <tr> <td height="1"></td> </tr> </table> <%@include file="sqlhead.jsp"%> <%@include file="more_head.jsp"%> </tr> </table></td> </tr> <tr> <td><div align="center"> <%String strtitle =""; //标题int coln=0; //行号int currid=0;String saddress =""; //作者int pageCount; //总页数int currpage; //当前页数int intPageSize=20; //一页显示的记录数int colnt=0; //每页实际显示行号String fbdate=""; //发表日期//取得待显示页码String strPage = request.getParameter("page");String strTitle = new String(request.getParameter("type").getBytes("ISO8859_1"),"GB2312"); if(strTitle == null) return;if(strPage==null){//表明在QueryString中没有page这一个参数,此时显示第一页数据 currpage = 1;}else{//将字符串转换成整型 currpage = java.lang.Integer.parseInt(strPage); if(currpage<1) currpage = 1;}String SQLT="select * from information where kind='"+strTitle+"' order by id desc";rs = stmt.executeQuery(SQLT);%> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="10" height="8"><img src="jysw_image/spacer.gif" width="10" height="25"></td> <td height="8" class="indicator"><a href="default.jsp" class="blue1">首页</a> 当前信息主题类别》 <font color="#6666FF"><%=strTitle%></font></td> <td height="8" width="10"><img src="jysw_image/spacer.gif" width="10" height="25"></td> </tr> <tr> <td width="10" valign="top"><img src="jysw_image/spacer.gif" width="10" height="8"></td> <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="3"> <tr align="center"> <td align="left" width="43" nowrap bgcolor="#528AC6">编号</td>//执行到此句时停止在“<”处,然后就不往下执行了 <td align="left" class="headerRow" width="130" bgcolor="#528AC6"><img src="jysw_image/arrow_sortby.gif" width="11" height="8" alt="Sort By:">发布日期</td> <td align="left" class="headerRow" bgcolor="#528AC6">信息主题描述</td> <td align="center" class="headerRow" width="170" nowrap bgcolor="#528AC6">所在地区</td> </tr> <!-- 从这里开始 --> <% //获取记录总数rs.last();int intRowCount = rs.getRow(); //记算总页数pageCount = (intRowCount+intPageSize-1) / intPageSize;//调整待显示的页码if(currpage>pageCount) { currpage = pageCount;}if(pageCount>0){//将记录指针定位到待显示页的第一条记录上rs.absolute((currpage-1) * intPageSize + 1);//显示数据coln=rs.getRow();int i = 0;String pdzh="T";while(i<intPageSize && !rs.isAfterLast()){strtitle=rs.getString("title");currid=rs.getInt("id");saddress=rs.getString("address");fbdate=rs.getString("p_time");coln=coln+1;colnt=colnt+1;rs.next();if (pdzh=="T") {%> <tr> <td align="center" class="contentBlack" width="43" nowrap><%=coln-1%></td> <td class="contentBlack" width="130"><font color="#000066"><%=fbdate%></font></td> <td class="contentBlack"><a href="jysw_showcurrentinfo.jsp?xx=<%=currid%>" target="_blank" class=blue1> <%out.println(strtitle);%> </a></td> <td class="contentBlack" width="170" nowrap align="center"><font color="#000066"><%=saddress%></font></td> </tr> <% pdzh="F"; } else {%> <tr> <td align="center" class="contentBlack" width="43" nowrap bgcolor="#E7E7E7"><%=coln-1%></td> <td class="contentBlack" bgcolor="#E7E7E7" width="130"><font color="#000066"><%=fbdate%></font><br> </td> <td class="contentBlack" bgcolor="#E7E7E7"> <a href="jysw_showcurrentinfo.jsp?xx=<%=currid%>" target="_blank" class=blue1> <%out.println(strtitle);%> </a><br> </td> <td class="contentBlack" width="170" nowrap align="center" bgcolor="#E7E7E7"><font color="#000066"><%=saddress%></font></td> </tr> <% pdzh="T"; }%> <%i++;}}%> <%rs.close();out.println("vvv"); for (int ii=colnt;ii<=16;ii++){out.print("<tr><td width='24' align='center'>"+"</td><td width='140'></td><td ></td><td width='160' align='left'></td></tr>");}%> <tr> <td align="center" class="contentBlack" width="43" nowrap><img src="jysw_image/spacer.gif" width="10" height="5"></td> <td class="contentBlack" width="130"><img src="jysw_image/spacer.gif" width="10" height="5"></td> <td class="contentBlack"><img src="jysw_image/spacer.gif" width="10" height="5"></td> <td class="contentBlack" width="170" nowrap align="right"><img src="jysw_image/spacer.gif" width="10" height="5"></td> </tr> <tr> <td align="left" class="contentBlack" width="43" nowrap bgcolor="#528AC6"><img src="jysw_image/spacer.gif" width="10" height="1"></td> <td align="left" class="contentBlack" bgcolor="#528AC6" width="130"><img src="jysw_image/spacer.gif" width="10" height="8"></td> <td align="left" class="contentBlack" bgcolor="#528AC6"><img src="jysw_image/spacer.gif" width="10" height="8"></td> <td align="left" class="contentBlack" width="170" nowrap bgcolor="#528AC6"><img src="jysw_image/spacer.gif" width="10" height="1"></td> </tr> </table> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr valign="top"> <td class="indicator"> </td> <td align="right" class="indicator"><img src="jysw_image/spacer.gif" width="10" ></td> <td align="right" class="indicator"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="indicator" width="100" height="22"> <%if(currpage>1){%> <a href="jysw_showinfomore.jsp?page=<%=currpage-1%>&mytype=<%=strTitle%>" class=red>上页</a> <%}else {%> 上页 <%}%> </td> <td class="indicator" width="100"> <%if(currpage<pageCount){%> <a href="jysw_showinfomore.jsp?page=<%=currpage+1%>&mytype=<%=strTitle%>" class=red>下页</a> <%}else {%> 下页 <%}%> </td> <td class="indicator"><img src="jysw_image/spacer.gif" width="20" height="22"></td> <td width="80" align="center" class="indicator">页<%=currpage%> of <%=pageCount%> </td> </tr> </table></td> </tr> </table> <!--content end here --> </td> <td width="10" valign="top"><img src="jysw_image/spacer.gif" width="10" height="8"></td> </tr> </table> </div></td> </TR></TABLE><table width="780" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="1" bgcolor="#333333"></td> </tr></table><table width="780" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><div align="center">(C)CopyRight 2004 6 荆门城市百业 技术支持 <font color="#3366CC">QQ:7209607</font></div></td> </tr></table><p> </p></body> 修改缓存大小在struts-config.xml中配置:元素<control> 球推荐Java实现的开源流媒体服务器(支持RTSP协议) struts2跳转到另外一个工程里的页面 如何实现根据值自动单选 求完整的java打砖块游戏代码 各位前辈,小弟求教J2EE环境配置(忙了一个星期都没搞好) html:submit标签如何向ActionForm传递参数? 这个问题你值得看看,网上搜集答案删除Jar包不能解决 xml存入数据库问题,请指教 大家帮忙看看调用存储过程的问题 J2EE AP/P是什么意思? 求Linux下java读写word的解决方法 100分求 hibernate+spring 多对多关系的例子!
<link rel="stylesheet" href="css/jysw2.css" type="text/css">
<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %>
<%@ page import="java.sql.*"%>
<style type=text/css>
<!--
td,body,input,select {font-size: 12px;}
.white {font-size: 12px;color: #003366;text-decoration: none;}
.blue { text-decoration: underline;color:#000099;line-height: 18px;}
.blue1{ text-decoration: underline;color:#003399;line-height: 12px;text-decoration: none;}
a:hover {color: #FF3300;text-decoration: underline;}
a:active {color:#800080}
a.nav1 {font-size: 12px;color: #000000;text-decoration: none;}
a.nav1:hover {color: #FFEFA5;text-decoration: underline;}
a.nav1:active {color:#0099FF}
.finput {BORDER-RIGHT: 0px ridge;BORDER-TOP: 1px ridge #727272; BORDER-LEFT: 1px ridge #727272; BORDER-BOTTOM: 0px ridge;font-size: 12px;}
.foxinput {BORDER-RIGHT: 1px ridge; BORDER-TOP: #ffffff 1px ridge; BORDER-LEFT: #ffffff 1px ridge; BORDER-BOTTOM: 1px ridge; BACKGROUND-COLOR: #cccccc}
.black {color: #000000; text-decoration: none;line-height: 18px;}
.red {color: #FF0000; text-decoration: none;line-height: 18px;}
.blue2 {line-height: 18px;color: #0033FF;text-decoration: underline;}
.blue3 {line-height: 18px;color: #0031FF;text-decoration: none;}
.blue4 {font-size: 12px;color: #0031FF;text-decoration: underline;}
.blue5 {text-decoration: underline;color:#000099;line-height: 19px;}
.blue6 {text-decoration: none;color:#000099;line-height: 19px;}
.blue7 {color: #0031FF;text-decoration: none;}
.blue8 {line-height: 18px;color: #000099;text-decoration: none;}
.nc {font-size: 12px;line-height: 18px;letter-spacing: 2px;}
//-->
</style><body bottomMargin=0 leftMargin=0 topMargin=0 rightMargin=0>
<TABLE width=800 border=0 align="center" cellPadding=0 cellSpacing=0>
<TR>
<TD
width="3%" height="100%" rowSpan=10 valign="top" background=jysw_image/bg1222.jpg style="BACKGROUND-POSITION: right top; BACKGROUND-REPEAT: repeat-y"><a href="http://jingmen.18600.com"></a></TD>
<TD width=1 bgColor=#000000 rowSpan=10></TD>
<TD width=755 colSpan=2 background="jysw_image/jmcsby.jpg"> <object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0 height=123 width=755>
<param name="movie" value="jysw_image/banner3.swf">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<embed src="jysw_image/banner3.swf" quality=high type="application/x-shockwave-flash" width="755" height="123" wmode="transparent">
</embed> </object></TD>
<TD width=1 bgColor=#000000 rowSpan=10></TD>
<TD style="BACKGROUND-POSITION: left top; BACKGROUND-REPEAT: repeat-y"
width="3%" background=jysw_image/bg1223.jpg height="100%"
rowSpan=10></TD>
</TR>
<TR>
<td width=755 align="center"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#FFFFFF" > <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bgcolor="#666666">
<tr>
<td height="1"></td>
</tr>
</table>
<%@include file="sqlhead.jsp"%>
<%@include file="more_head.jsp"%>
</tr>
</table></td>
</tr>
<tr>
<td><div align="center">
<%
String strtitle =""; //标题
int coln=0; //行号
int currid=0;
String saddress =""; //作者
int pageCount; //总页数
int currpage; //当前页数
int intPageSize=20; //一页显示的记录数
int colnt=0; //每页实际显示行号
String fbdate=""; //发表日期//取得待显示页码
String strPage = request.getParameter("page");
String strTitle = new String(request.getParameter("type").getBytes("ISO8859_1"),"GB2312");
if(strTitle == null)
return;
if(strPage==null){//表明在QueryString中没有page这一个参数,此时显示第一页数据
currpage = 1;
}
else{//将字符串转换成整型
currpage = java.lang.Integer.parseInt(strPage);
if(currpage<1) currpage = 1;
}String SQLT="select * from information where kind='"+strTitle+"' order by id desc";
rs = stmt.executeQuery(SQLT);
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10" height="8"><img src="jysw_image/spacer.gif" width="10" height="25"></td>
<td height="8" class="indicator"><a href="default.jsp" class="blue1">首页</a> 当前信息主题类别》
<font color="#6666FF"><%=strTitle%></font></td>
<td height="8" width="10"><img src="jysw_image/spacer.gif" width="10" height="25"></td>
</tr>
<tr>
<td width="10" valign="top"><img src="jysw_image/spacer.gif" width="10" height="8"></td>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr align="center">
<td align="left" width="43" nowrap bgcolor="#528AC6">编号</td>//执行到此句时停止在“<”处,然后就不往下执行了
<td align="left" class="headerRow" width="130" bgcolor="#528AC6"><img src="jysw_image/arrow_sortby.gif" width="11" height="8" alt="Sort By:">发布日期</td>
<td align="left" class="headerRow" bgcolor="#528AC6">信息主题描述</td>
<td align="center" class="headerRow" width="170" nowrap bgcolor="#528AC6">所在地区</td>
</tr>
<!-- 从这里开始 -->
<% //获取记录总数
rs.last();
int intRowCount = rs.getRow();
pageCount = (intRowCount+intPageSize-1) / intPageSize;
//调整待显示的页码
if(currpage>pageCount) {
currpage = pageCount;
}
if(pageCount>0){
//将记录指针定位到待显示页的第一条记录上
rs.absolute((currpage-1) * intPageSize + 1);//显示数据
coln=rs.getRow();
int i = 0;
String pdzh="T";
while(i<intPageSize && !rs.isAfterLast()){
strtitle=rs.getString("title");
currid=rs.getInt("id");
saddress=rs.getString("address");
fbdate=rs.getString("p_time");
coln=coln+1;
colnt=colnt+1;
rs.next();
if (pdzh=="T") {
%>
<tr>
<td align="center" class="contentBlack" width="43" nowrap><%=coln-1%></td>
<td class="contentBlack" width="130"><font color="#000066"><%=fbdate%></font></td>
<td class="contentBlack"><a href="jysw_showcurrentinfo.jsp?xx=<%=currid%>" target="_blank" class=blue1>
<%out.println(strtitle);%>
</a></td>
<td class="contentBlack" width="170" nowrap align="center"><font color="#000066"><%=saddress%></font></td>
</tr>
<%
pdzh="F";
}
else {%>
<tr>
<td align="center" class="contentBlack" width="43" nowrap bgcolor="#E7E7E7"><%=coln-1%></td>
<td class="contentBlack" bgcolor="#E7E7E7" width="130"><font color="#000066"><%=fbdate%></font><br>
</td>
<td class="contentBlack" bgcolor="#E7E7E7"> <a href="jysw_showcurrentinfo.jsp?xx=<%=currid%>" target="_blank" class=blue1>
<%out.println(strtitle);%>
</a><br> </td>
<td class="contentBlack" width="170" nowrap align="center" bgcolor="#E7E7E7"><font color="#000066"><%=saddress%></font></td>
</tr>
<%
pdzh="T";
}%>
<%
i++;
}}
%>
<%rs.close();
out.println("vvv");
for (int ii=colnt;ii<=16;ii++){
out.print("<tr><td width='24' align='center'>"+"</td><td width='140'></td><td ></td><td width='160' align='left'></td></tr>");
}
%>
<tr>
<td align="center" class="contentBlack" width="43" nowrap><img src="jysw_image/spacer.gif" width="10" height="5"></td>
<td class="contentBlack" width="130"><img src="jysw_image/spacer.gif" width="10" height="5"></td>
<td class="contentBlack"><img src="jysw_image/spacer.gif" width="10" height="5"></td>
<td class="contentBlack" width="170" nowrap align="right"><img src="jysw_image/spacer.gif" width="10" height="5"></td>
</tr>
<tr>
<td align="left" class="contentBlack" width="43" nowrap bgcolor="#528AC6"><img src="jysw_image/spacer.gif" width="10" height="1"></td>
<td align="left" class="contentBlack" bgcolor="#528AC6" width="130"><img src="jysw_image/spacer.gif" width="10" height="8"></td>
<td align="left" class="contentBlack" bgcolor="#528AC6"><img src="jysw_image/spacer.gif" width="10" height="8"></td>
<td align="left" class="contentBlack" width="170" nowrap bgcolor="#528AC6"><img src="jysw_image/spacer.gif" width="10" height="1"></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td class="indicator"> </td>
<td align="right" class="indicator"><img src="jysw_image/spacer.gif" width="10" ></td>
<td align="right" class="indicator"> <table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indicator" width="100" height="22">
<%if(currpage>1){%>
<a href="jysw_showinfomore.jsp?page=<%=currpage-1%>&mytype=<%=strTitle%>" class=red>上页</a>
<%}else {%>
上页
<%}%>
</td>
<td class="indicator" width="100">
<%if(currpage<pageCount){%>
<a href="jysw_showinfomore.jsp?page=<%=currpage+1%>&mytype=<%=strTitle%>" class=red>下页</a>
<%}else {%>
下页
<%}%>
</td>
<td class="indicator"><img src="jysw_image/spacer.gif" width="20" height="22"></td>
<td width="80" align="center" class="indicator">页<%=currpage%>
of <%=pageCount%> </td>
</tr>
</table></td>
</tr>
</table>
<!--content end here -->
</td>
<td width="10" valign="top"><img src="jysw_image/spacer.gif" width="10" height="8"></td>
</tr>
</table>
</div></td>
</TR>
</TABLE>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="1" bgcolor="#333333"></td>
</tr>
</table>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">(C)CopyRight 2004 6 荆门城市百业 技术支持 <font color="#3366CC">QQ:7209607</font></div></td>
</tr>
</table>
<p> </p>
</body>
元素<control>