jsp页面:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %><html:html>
<head>
<title>
addemplist
</title>
</head>
<jsp:useBean id="bean0" scope="session" class="test.EmpList" />
<jsp:setProperty name="bean0" property="*" />
<body bgcolor="#ffffff">
<h1>
JBuilder Generated JSP
</h1>
<html:form action="/addEmpListAction.do"  method="post">
<br><br>
<html:submit value="Submit" property="Submit"/>
<html:reset value="Reset"/>
<hr>bean0<br>
Enter new value for bean0.departid :  <html:text property="departid"/><br>
Value of bean0.departid is : <jsp:getProperty name="bean0" property="departid" /><br>
Enter new value for bean0.empname :  <html:text property="empname"/><br>
Value of bean0.empname is : <jsp:getProperty name="bean0" property="empname" /><br>
Enter new value for bean0.empno :  <html:text property="empno"/><br>
Value of bean0.empno is : <jsp:getProperty name="bean0" property="empno" /><br>
<hr><br>
</html:form>
</body>
</html:html>代码应该没有问题

解决方案 »

  1.   

    java.lang.ClassCastException
    Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance. For example, the following code generates a ClassCastException:      Object x = new Integer(0);
         System.out.println((String)x);
    看看addemplist.java的180行吧
      

  2.   

    主页面和frame的叶面是不是在同一个域的?
      

  3.   

    try use iframe?
    我以前放过
    没出过问题啊
      

  4.   

    ipv(宁静致远) :
    try use iframe?怎么放,能不能写个简单的示例?
      

  5.   

    不清除struts关于frame是不是要有特殊的配置现在新的发现:
    我先用frame访问,出错,
    然后另外打开一个浏览器,请求addemplist.jsp,没问题,
    然后再回到frame,重新刷新,又可以看到了
    奇怪???