property属性有问题
好好看看
要不把整体的说说
好好看看
要不把整体的说说
解决方案 »
- hibernate往表里插数据的时候出错
- GenericDao的构造函数这样写什么意思?
- 基础问题
- HTTP Status 500 这是怎么了?
- !!!struts的一个异常: Exception creating bean of class brand.formbeans.ProjectDetailForm: {1}
- JTable中某个单元格进入编辑状态应该响应什么事件?
- 请问sharetop(燕赤霞)一个wsdk的问题
- 关于spring的官方reference
- 求教java实现sql模糊搜索
- 求教,java调用.net dll的方法
- JSP+JavaBean中ACCESS数据库连接问题
- 请问一下Struts令牌机制中是否一定要前后两个action进行配合?
这个值有错!
import java.io.Serializable;
import org.apache.commons.lang.builder.ToStringBuilder;/**
* The persistent class for the classinfo database table.
*
* @author BEA Workshop Studio
*/
public class Classinfo implements Serializable {
//default serial version id, required for serializable classes.
private static final long serialVersionUID = 1L;
private Integer classId;
private String classUrl;
private String classname;
private String isDelete;
private String isNavi;
private Integer rotId;
private Integer pid;
private java.util.Set<Roleinfo> roleInfo;
private java.util.Set<Newsinfo> newsInfo;
//private java.util.Set<Roleinfo> roleinfos; public java.util.Set<Newsinfo> getNewsInfo() {
return newsInfo;
} public void setNewsInfo(java.util.Set<Newsinfo> newsInfo) {
this.newsInfo = newsInfo;
} public Classinfo() {
} public Integer getClassId() {
return this.classId;
}
public void setClassId(Integer classId) {
this.classId = classId;
} public String getClassUrl() {
return this.classUrl;
}
public void setClassUrl(String classUrl) {
this.classUrl = classUrl;
} public String getClassname() {
return this.classname;
}
public void setClassname(String classname) {
this.classname = classname;
} public String getIsDelete() {
return this.isDelete;
}
public void setIsDelete(String isDelete) {
this.isDelete = isDelete;
} public String getIsNavi() {
return this.isNavi;
}
public void setIsNavi(String isNavi) {
this.isNavi = isNavi;
} public Integer getRotId() {
return this.rotId;
}
public void setRotId(Integer rotId) {
this.rotId = rotId;
} public Integer getPid() {
return this.pid;
}
public void setPid(Integer pid) {
this.pid = pid;
} //bi-directional many-to-one association to Roleinfo
/*public java.util.Set<Roleinfo> getRoleinfos() {
return this.roleinfos;
}
public void setRoleinfos(java.util.Set<Roleinfo> roleinfos) {
this.roleinfos = roleinfos;
}*/ public String toString() {
return new ToStringBuilder(this)
.append("classId", getClassId())
.toString();
} public java.util.Set<Roleinfo> getRoleInfo() {
return roleInfo;
} public void setRoleInfo(java.util.Set<Roleinfo> roleInfo) {
this.roleInfo = roleInfo;
}
}package pojo;
import java.io.Serializable;
import java.util.Set;import org.apache.commons.lang.builder.ToStringBuilder;/**
* The persistent class for the newsinfo database table.
*
* @author BEA Workshop Studio
*/
public class Newsinfo implements Serializable {
//default serial version id, required for serializable classes.
private static final long serialVersionUID = 1L;
private Integer id;
private Integer userId;
private String author;
private String content;
private java.util.Date createtime;
private String title;
private Integer hits;
private Classinfo classInfo; public Classinfo getClassInfo() {
return classInfo;
} public void setClassInfo(Classinfo classInfo) {
this.classInfo = classInfo;
} public Integer getHits() {
return hits;
} public void setHits(Integer hits) {
this.hits = hits;
} public Newsinfo() {
} public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
} public Integer getUserId() {
return this.userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
} public String getAuthor() {
return this.author;
}
public void setAuthor(String author) {
this.author = author;
} public String getContent() {
return this.content;
}
public void setContent(String content) {
this.content = content;
} public java.util.Date getCreatetime() {
return createtime;
} public void setCreatetime(java.util.Date createtime) {
this.createtime = createtime;
} public String getTitle() {
return this.title;
}
public void setTitle(String title) {
this.title = title;
} public String toString() {
return new ToStringBuilder(this)
.append("id", getId())
.toString();
}
}
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib prefix="logic" uri="/WEB-INF/struts-logic.tld" %>
<%@taglib prefix="bean" uri="/WEB-INF/struts-bean.tld" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<form action="deleteNews.do" name="delNewsForm" method="post">
<table width="100%" align="center" border="0">
<tr>
<td><input type="checkbox" name="all" value="all"></td>
<td>标题</td>
<td>作者</td>
<td>所属栏目</td>
<td>访问次数</td>
<td>发布时间</td>
</tr>
<logic:present name="newsList">
<logic:iterate id="nL" name="newsList">
<tr>
<td><input type="checkbox" name="ids" value="<bean:write name="nL" property="id"/>"></td>
<td>
<bean:write name="nL" property="title"/>
</td>
<td>
<bean:write name="nL" property="author"/>
</td>
<td>
<bean:write name="nL" property="classInfo"/>
</td>
<td>
<bean:write name="nL" property="hits"/>
</td>
<td>
<bean:write name="nL" property="createtime"/>
</td>
</tr>
</logic:iterate>
</logic:present>
<tr><td colspan="6"><input type="submit" value="删除"></td></tr>
</table>
</form>
</body>
</html>