Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Servlet/JSP/JSF/JavaFX Script  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
reply to postflat modethreaded modego to previous topicgo to next topicgo to back
话题被移动
该话题已被移动 - floater , 2005-05-12 21:43
如果您尚不清楚该话题被移动的原因,请参考论坛规则以及本版公告或者联系本版版主。
作者 "agentApply.jsp": java.lang.NullPointerException啥错?
rxwgsx





发贴: 3
于 2005-05-12 15:15 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
请教:
错提示:"agentApply.jsp": error:org.apache.jasper.JasperException: Error compiling \subsidy\agentApply.jsp
"agentApply.jsp": java.lang.NullPointerException

代码:
package cc.yinbo.hrms3.subsidy.struts;

import org.apache.struts.action.*;
import javax.servlet.http.*;
import java.util.Date;
import java.util.*;

public class AgentApplyForm extends ActionForm {
private String usename;
private String applydate;
private String department;
private int applytype;

public String getUsename() {
return usename;
}
public void setUsename(String usename) {
this.usename = usename;
}
public String getApplydate() {
return applydate;
}
public void setApplydate(String applydate) {
this.applydate = applydate;
}
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
public int getApplytype() {
return applytype;
}
public void setApplytype(int appiytype) {
this.applytype = applytype;
}
public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
/**@todo: finish this method, this is just the skeleton.*/
return null;
}
public void reset(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
}

}

package cc.yinbo.hrms3.subsidy.struts;

import org.apache.struts.action.*;
import javax.servlet.http.*;
import java.util.Date;
import java.util.*;

public class AgentApplyForm extends ActionForm {
private String usename;
private String applydate;
private String department;
private int applytype;

public String getUsename() {
return usename;
}
public void setUsename(String usename) {
this.usename = usename;
}
public String getApplydate() {
return applydate;
}
public void setApplydate(String applydate) {
this.applydate = applydate;
}
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
public int getApplytype() {
return applytype;
}
public void setApplytype(int appiytype) {
this.applytype = applytype;
}
public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
/**@todo: finish this method, this is just the skeleton.*/
return null;
}
public void reset(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
}

}

package cc.yinbo.hrms3.subsidy.struts;

import org.apache.struts.action.*;
import javax.servlet.http.*;
import cc.yinbo.common.UserInfo;
import cc.yinbo.common.DoError;
import cc.yinbo.common.HandleSession;
import net.sf.hibernate.HibernateException;

public class AgentApplyAction extends Action {
public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm,
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) throws
HibernateException {
AgentApplyForm AgentApplyForm = null;

AgentApplyForm AppForm = (AgentApplyForm) actionForm;
ActionErrors errors = new ActionErrors();
UserInfo userinfo = null; //用户信息
DoError log = null; //日志

//创建session对象
HandleSession CurrSession = new HandleSession(httpServletRequest, false);

//判断是否超时
if (!CurrSession.IfTimeOut()) {
userinfo = (UserInfo) CurrSession.GetFormSession("CurrUser");
log = (DoError) CurrSession.GetFormSession("log");
log.LogInfo("AgentApplyAction",
userinfo.GetUserID() + userinfo.GetUserName() + "住房补贴代理申请");
}
else {
errors.add(ActionErrors.GLOBAL_ERROR,
new ActionError("error.logon.timeout"));
saveErrors(httpServletRequest, errors);
return (actionMapping.findForward("sys_error"));
}

AgentApply AgentApply = new AgentApply();
boolean result = AgentApply.model(AgentApplyForm);
//插入数据库返回结果
if (result) {
return (actionMapping.findForward("success"));
}
else {
return (actionMapping.findForward("failure"));
}

}
}

package cc.yinbo.hrms3.subsidy.hibernate;

import java.io.Serializable;
import java.util.Date;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import java.math.BigDecimal;

/** @author Hibernate CodeGenerator */
public class Hrms3applyinfo implements Serializable {

/** identifier field */
private cc.yinbo.hrms3.subsidy.hibernate.Hrms3applyinfoPK comp_id;

/** nullable persistent field */
private String username;

/** nullable persistent field */
private String department;

/** nullable persistent field */
private String identify;

/** nullable persistent field */
private String houseaccno;

/** nullable persistent field */
private int applytype;

/** nullable persistent field */
private String remark;

/** nullable persistent field */
private String ispass;

/** nullable persistent field */
private String checker;

/** nullable persistent field */
private String opinion;

/** nullable persistent field */
private String prochecker;

/** nullable persistent field */
private String proopinion;

/** nullable persistent field */
private String isdelete;

/** nullable persistent field */
private Date createday;

/** nullable persistent field */
private String state;

/** nullable persistent field */
private BigDecimal drawsum;

/** full constructor */
public Hrms3applyinfo(cc.yinbo.hrms3.subsidy.hibernate.Hrms3applyinfoPK comp_id, String username, String department, String identify, String houseaccno, int applytype, String remark, String ispass, String checker, String opinion, String prochecker, String proopinion, String isdelete, Date createday, String state,BigDecimal drawsum) {
this.comp_id = comp_id;
this.username = username;
this.department = department;
this.identify = identify;
this.houseaccno = houseaccno;
this.applytype = applytype;
this.remark = remark;
this.ispass = ispass;
this.checker = checker;
this.opinion = opinion;
this.prochecker = prochecker;
this.proopinion = proopinion;
this.isdelete = isdelete;
this.createday = createday;
this.state = state;
this.drawsum=drawsum;
}

/** default constructor */
public Hrms3applyinfo() {
}

/** minimal constructor */
public Hrms3applyinfo(cc.yinbo.hrms3.subsidy.hibernate.Hrms3applyinfoPK comp_id) {
this.comp_id = comp_id;
}

public cc.yinbo.hrms3.subsidy.hibernate.Hrms3applyinfoPK getComp_id() {
return this.comp_id;
}

public void setComp_id(cc.yinbo.hrms3.subsidy.hibernate.Hrms3applyinfoPK comp_id) {
this.comp_id = comp_id;
}

public String getUsername() {
return this.username;
}

public void setUsername(String username) {
this.username = username;
}

public String getDepartment() {
return this.department;
}

public void setDepartment(String department) {
this.department = department;
}

public String getIdentify() {
return this.identify;
}

public void setIdentify(String identify) {
this.identify = identify;
}

public String getHouseaccno() {
return this.houseaccno;
}

public void setHouseaccno(String houseaccno) {
this.houseaccno = houseaccno;
}

public int getApplytype() {
return this.applytype;
}

public void setApplytype(int applytype) {
this.applytype = applytype;
}

public String getRemark() {
return this.remark;
}

public void setRemark(String remark) {
this.remark = remark;
}

public String getIspass() {
return this.ispass;
}

public void setIspass(String ispass) {
this.ispass = ispass;
}

public String getChecker() {
return this.checker;
}

public void setChecker(String checker) {
this.checker = checker;
}

public String getOpinion() {
return this.opinion;
}

public void setOpinion(String opinion) {
this.opinion = opinion;
}

public String getProchecker() {
return this.prochecker;
}

public void setProchecker(String prochecker) {
this.prochecker = prochecker;
}

public String getProopinion() {
return this.proopinion;
}

public void setProopinion(String proopinion) {
this.proopinion = proopinion;
}

public String getIsdelete() {
return this.isdelete;
}

public void setIsdelete(String isdelete) {
this.isdelete = isdelete;
}

public Date getCreateday() {
return this.createday;
}

public void setCreateday(Date createday) {
this.createday = createday;
}

public String getState() {
return this.state;
}

public void setState(String state) {
this.state = state;
}
public BigDecimal getDrawsum() {
return this.drawsum;
}

public void setDrawsum(BigDecimal drawsum) {
this.drawsum = drawsum;
}

public String toString() {
return new ToStringBuilder(this)
.append("comp_id", getComp_id())
.toString();
}

public boolean equals(Object other) {
if ( !(other instanceof Hrms3applyinfo) ) return false;
Hrms3applyinfo castOther = (Hrms3applyinfo) other;
return new EqualsBuilder()
.append(this.getComp_id(), castOther.getComp_id())
.isEquals();
}

public int hashCode() {
return new HashCodeBuilder()
.append(getComp_id())
.toHashCode();
}

}

package cc.yinbo.hrms3.subsidy.hibernate;

import java.io.Serializable;
import java.util.Date;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** @author Hibernate CodeGenerator */
public class Hrms3applyinfoPK implements Serializable {

/** identifier field */
private String userid;

/** identifier field */
private Date applydate;

/** full constructor */
public Hrms3applyinfoPK(String userid, Date applydate) {
this.userid = userid;
this.applydate = applydate;
}

/** default constructor */
public Hrms3applyinfoPK() {
}

public String getUserid() {
return this.userid;
}

public void setUserid(String userid) {
this.userid = userid;
}

public Date getApplydate() {
return this.applydate;
}

public void setApplydate(Date applydate) {
this.applydate = applydate;
}

public String toString() {
return new ToStringBuilder(this)
.append("userid", getUserid())
.append("applydate", getApplydate())
.toString();
}

public boolean equals(Object other) {
if ( !(other instanceof Hrms3applyinfoPK) ) return false;
Hrms3applyinfoPK castOther = (Hrms3applyinfoPK) other;
return new EqualsBuilder()
.append(this.getUserid(), castOther.getUserid())
.append(this.getApplydate(), castOther.getApplydate())
.isEquals();
}

public int hashCode() {
return new HashCodeBuilder()
.append(getUserid())
.append(getApplydate())
.toHashCode();
}

}
SmileSmile




话题树型展开
人气 标题 作者 字数 发贴时间
1387 "agentApply.jsp": java.lang.NullPointerException啥错? rxwgsx 12309 2005-05-12 15:15
1196 Re:"agentApply.jsp": java.lang.NullPointerException啥错? rxwgsx 13771 2005-05-12 15:20

reply to postflat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923