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

当JSP页面放入struts标签无法显示
我在Jsp页面放入Struts标签后就显示一片空白,比如我放入<html:form></html:form>没问题,可是当我放入<html:radio></html:radio>或者是<html:text></html:text>后页面就什么都不显示了!例如这个页面就不显示!

<%@ page language="java" pageEncoding="GBK"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
  <head>
  <title>student_file.jsp</title>
<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">
-->

  <style type="text/css">
<!--
.table1 {
font-family: "宋体";
font-size: 9pt;
line-height: 150%;
}
-->
  </style>
  </head> 
  <body>
  <html:form action="/overAnswer.do?mother=answe&id=${onequestion.id}" method="post"> 
<html:radio property="www" value="qeqwe" name="wwwww"/>
  </html:form>
  </body>
</html:html>

查看浏览器源代码就这些东西:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312"></HEAD>
<BODY></BODY></HTML>


------解决方案--------------------
<html:radio property="www" value="qeqwe" name="wwwww"/>
</html:form> 

中www要在你的formbean中定义