日期:2014-05-20  浏览次数:20719 次

50分请高手指教!我用struts+hibernate做一个系统,为什么会出现如下问题
显示的页面,在html中能显示表单,但是在tomcat下运行jsp,却无法显示表,之显示最上面的按钮.
我下午在学校机房测试,当时是能显示的,但是晚上在我自己的电脑上就不能了.页面代码如下.
<%@ page language="java" pageEncoding="GB18030"%>
<%@taglib uri="/WEB-INF/struts-html.tld"prefix="html" %>
<%@taglib uri="/WEB-INF/struts-logic.tld"prefix="logic" %>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>

<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">  
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<metahttp-equiv="Content-Type"content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body>
<h1 align="center">欢迎你! <%=request.getSession().getAttribute("username") %> </h1>
<html:form method="post" action="/checkaddmessage.do">  
<html:submit value="发布新消息"></html:submit>  
</html:form>
<br>
<br>
<br>
现有的消息
<br>
<TABLE id="id1" style="BORDER-RIGHT:darkgreen lpx solid;BORDER-TOP:
darkgreen lpx solid;BORDER-LEFT:darkgreen lpx solid;WIDTH:100%;
BORDER-BOTTM:darkgreen lpx solid;BORDER-COLLAPSE:collapse"
borderCorlor="darkgreen"cellspacing="0"border="1">
<logic:notEmpty name="messageList" >
<tr>
<TD noWrap><b> 消息</b></TD><br>
<TD noWrap><b> 内容</b></TD><br>
<TD noWrap><b> 作者</b></TD><br>

<TD ><b> 动作</b></TD><br>
<TD ><b> 时间</b></TD><br> 
</tr>
<logic:iterate indexId="index" id="item" name="messageList" >
<tr>
<td class="allcapsCcenter">
<bean:write name="item" property="id"/>
</td>
<td class="allcapsCenter">
<bean:write name="item" property="content"/></td>
<td><bean:write name="item" property="author"/></td>
<td nowrap class="center">
<html:form method="post" action="/checkeditmessage.do">  
<html:submit value="修改"></html:submit>  
<inpute type="hidden" id="id"name="id"/>
<inpute type="hidden" id="author"name="author"/>
</html:form>
</td>
<td class="allcapsCenter">
<bean:write name="item" property="date"/></td>
</tr>
</logic:iterate>
</logic:notEmpty>
</TABLE>
<html:form action="/checkeditmessage.do" method="post">
<inpute type="hidden" id="hid"name="hid"/>
</html:form>
</body>
<script language="Javascript">
<!--
function submitSid(form,.hid){
form.hid.value=hid;
form.submit();
}
//-->
</script>
</html>

上面是jsp页面显示的代码,下面是struts的action,action没有问题,问题出在jsp页面上
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl