com.opensymphony.xwork2.ognl.OgnlValueStack] - target is null for setProperty(null, "emailTypeNo", [Ljava.lang.String;@6f205e]

情况1,查询结果未转换为与前台交互的实体类DTO

实体类:EmailTypeDto

package com.manage.email.dto;

public class EmailTypeDto {
private Integer emailTypeId;//邮件类型Id
private String emailTypeNo;//邮件类型编号
private String emailTypeEnName;//邮件类型英文名称
private String emailTypeChName;//邮件类型中文名称
private String remark;//邮件类型备注
private Integer isDel;//是否删除,0表示未删除,1表示已删除
private String preserve01;//预留字段01
private String preserve02;//预留字段01
private String preserve03;//预留字段01
private String preserve04;//预留字段01
private String preserve05;//预留字段01
private Integer currentPage;//分页
private String message;//如果success为FALSE失败信息
private Boolean success;//成功
//无参构造方法
public EmailTypeDto() {
super();
}
//构造方法
public EmailTypeDto(Integer emailTypeId, String emailTypeNo,
String emailTypeEnName, String emailTypeChName, String remark,
Integer isDel, String preserve01, String preserve02, String preserve03,
String preserve04, String preserve05, Integer currentPage,
String message, Boolean success) {
super();
this.emailTypeId = emailTypeId;
this.emailTypeNo = emailTypeNo;
this.emailTypeEnName = emailTypeEnName;
this.emailTypeChName = emailTypeChName;
this.remark = remark;
this.isDel = isDel;
this.preserve01 = preserve01;
this.preserve02 = preserve02;
this.preserve03 = preserve03;
this.preserve04 = preserve04;
this.preserve05 = preserve05;
this.currentPage = currentPage;
this.message = message;
this.success = success;
}
public Integer getCurrentPage() {
return currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public Boolean getSuccess() {
return success;
}
public void setSuccess(Boolean success) {
this.success = success;
}
public Integer getEmailTypeId() {
return emailTypeId;
}
public void setEmailTypeId(Integer emailTypeId) {
this.emailTypeId = emailTypeId;
}
public String getEmailTypeEnName() {
return emailTypeEnName;
}
public void setEmailTypeEnName(String emailTypeEnName) {
this.emailTypeEnName = emailTypeEnName;
}
public String getEmailTypeChName() {
return emailTypeChName;
}
public void setEmailTypeChName(String emailTypeChName) {
this.emailTypeChName = emailTypeChName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getEmailTypeNo() {
return emailTypeNo;
}
public void setEmailTypeNo(String emailTypeNo) {
this.emailTypeNo = emailTypeNo;
}
public Integer getIsDel() {
return isDel;
}
public void setIsDel(Integer isDel) {
this.isDel = isDel;
}
public String getPreserve01() {
return preserve01;
}
public void setPreserve01(String preserve01) {
this.preserve01 = preserve01;
}
public String getPreserve02() {
return preserve02;
}
public void setPreserve02(String preserve02) {
this.preserve02 = preserve02;
}
public String getPreserve03() {
return preserve03;
}
public void setPreserve03(String preserve03) {
this.preserve03 = preserve03;
}
public String getPreserve04() {
return preserve04;
}
public void setPreserve04(String preserve04) {
this.preserve04 = preserve04;
}
public String getPreserve05() {
return preserve05;
}
public void setPreserve05(String preserve05) {
this.preserve05 = preserve05;
}
}

EmailType:

package com.manage.email.bean;

public class EmailType {
private Integer emailTypeId;//邮件类型Id
private String emailTypeNo;//邮件类型编号, 10100
private String emailTypeEnName;//邮件类型英文名称
private String emailTypeChName;//邮件类型中文名称
private String remark;//邮件类型备注
private Integer isDel;//是否删除,0表示未删除,1表示已删除
private String preserve01;//预留字段01
private String preserve02;//预留字段01
private String preserve03;//预留字段01
private String preserve04;//预留字段01
private String preserve05;//预留字段01
public EmailType() {
super();
}
//全部构造方法
public EmailType(Integer emailTypeId, String emailTypeNo,
String emailTypeEnName, String emailTypeChName, String remark,
Integer isDel, String preserve01, String preserve02, String preserve03,
String preserve04, String preserve05) {
super();
this.emailTypeId = emailTypeId;
this.emailTypeNo = emailTypeNo;
this.emailTypeEnName = emailTypeEnName;
this.emailTypeChName = emailTypeChName;
this.remark = remark;
this.isDel = isDel;
this.preserve01 = preserve01;
this.preserve02 = preserve02;
this.preserve03 = preserve03;
this.preserve04 = preserve04;
this.preserve05 = preserve05;
} public Integer getEmailTypeId() {
return emailTypeId;
}
public void setEmailTypeId(Integer emailTypeId) {
this.emailTypeId = emailTypeId;
}
public String getEmailTypeNo() {
return emailTypeNo;
}
public void setEmailTypeNo(String emailTypeNo) {
this.emailTypeNo = emailTypeNo;
}
public String getEmailTypeEnName() {
return emailTypeEnName;
}
public void setEmailTypeEnName(String emailTypeEnName) {
this.emailTypeEnName = emailTypeEnName;
}
public String getEmailTypeChName() {
return emailTypeChName;
}
public void setEmailTypeChName(String emailTypeChName) {
this.emailTypeChName = emailTypeChName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Integer getIsDel() {
return isDel;
}
public void setIsDel(Integer isDel) {
this.isDel = isDel;
}
public String getPreserve01() {
return preserve01;
}
public void setPreserve01(String preserve01) {
this.preserve01 = preserve01;
}
public String getPreserve02() {
return preserve02;
}
public void setPreserve02(String preserve02) {
this.preserve02 = preserve02;
}
public String getPreserve03() {
return preserve03;
}
public void setPreserve03(String preserve03) {
this.preserve03 = preserve03;
}
public String getPreserve04() {
return preserve04;
}
public void setPreserve04(String preserve04) {
this.preserve04 = preserve04;
}
public String getPreserve05() {
return preserve05;
}
public void setPreserve05(String preserve05) {
this.preserve05 = preserve05;
}
}

后台报错信息:

[com.opensymphony.xwork2.ognl.OgnlValueStack] - Error setting expression 'emaiTypeDto.emailTypeNo' with value '[Ljava.lang.String;@ee1aa2'
ognl.OgnlException: target is null for setProperty(null, "emailTypeNo", [Ljava.lang.String;@ee1aa2)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2309)
at ognl.ASTProperty.setValueBody(ASTProperty.java:127)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
at ognl.ASTChain.setValueBody(ASTChain.java:227)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
at ognl.Ognl.setValue(Ognl.java:737)
at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:217)
at com.opensymphony.xwork2.ognl.OgnlValueStack.trySetValue(OgnlValueStack.java:186)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:173)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setParameter(OgnlValueStack.java:151)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:317)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:228)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:236)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.manage.common.interceptor.LoginedCheckInterceptor.intercept(LoginedCheckInterceptor.java:50)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:511)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:269)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1773)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)

原因代码:

/**
* 查询邮件类型编号是否存在已存在不允许添加
*/
@SuppressWarnings("unchecked")
public EmailTypeDto selectValidateEmailTypeNo(EmailTypeDto emailTypeDto) {
EmailTypeDto emailTypeDto1=null;
String emailTypeNo=null;
if(StringUtils.isNotBlank(emailTypeDto.getEmailTypeNo())){
StringBuilder stringBuilder=new StringBuilder("select * from ft_emailType_t where emailTypeNo="+emailTypeNo);
Session session=sessionFactory.getCurrentSession();
SQLQuery sqlQuery=session.createSQLQuery(stringBuilder.toString());
sqlQuery.setResultTransformer(Transformers.aliasToBean(MerchantDto.class));
List<EmailTypeDto> list = sqlQuery.list();
if (list != null && !list.isEmpty()) {
emailTypeDto1=list.get(0);
}
}
return emailTypeDto1;
}

没有转换为EmailTypeDto,出现的错误。

原因二:

还要注意在Action中private属性预定要实例化new 类名(),否则拦截器也拦截,未对EmailTypeDto进行实例化。

package com.manage.email.action;

import com.manage.common.util.ActionBase;
import com.manage.common.util.PagingJson;
import com.manage.email.bean.EmailType;
import com.manage.email.dto.EmailTypeDto;
import com.manage.email.service.EmailTypeService; @SuppressWarnings("serial")
public class EmailTypeAction extends ActionBase{
private PagingJson<EmailType> emailTypePagingJson;
private EmailType emailType;
private EmailTypeDto emailTypeDto;
private EmailTypeService emailTypeService;
public PagingJson<EmailType> getEmailTypePagingJson() {
return emailTypePagingJson;
}
public void setEmailTypePagingJson(PagingJson<EmailType> emailTypePagingJson) {
this.emailTypePagingJson = emailTypePagingJson;
}
public EmailType getEmailType() {
return emailType;
}
public void setEmailType(EmailType emailType) {
this.emailType = emailType;
}
public EmailTypeDto getEmailTypeDto() {
return emailTypeDto;
}
public void setEmailTypeDto(EmailTypeDto emailTypeDto) {
this.emailTypeDto = emailTypeDto;
}
public EmailTypeService getEmailTypeService() {
return emailTypeService;
}
public void setEmailTypeService(EmailTypeService emailTypeService) {
this.emailTypeService = emailTypeService;
}
/**
* 查询
* @return
*/
public String selectEmailType(){
emailTypePagingJson=emailTypeService.selectListEmailType(emailTypeDto);
return "searchEmailTypes";
}
/**
* 查询是否已存在邮件类型编号,已存在前台提示,不存在不用提示
* @return
*/
public String selectValidateEmailTypeNo(){
try{
emailTypeService.selectValidateEmailTypeNo(emailTypeDto);
emailTypeDto.setSuccess(Boolean.TRUE);
}catch(Exception e){
emailTypeDto.setMessage(e.getMessage());
emailTypeDto.setSuccess(Boolean.FALSE);
}
return "selectValidateEmailTypeNo";
}
/**
*邮件类型编号不存在,允许新增
* @return
*/
public String saveEmailType(){
try {
emailTypeService.saveEmailType(emailTypeDto);
emailTypeDto.setSuccess(Boolean.TRUE);
} catch (Exception e) {
emailTypeDto.setSuccess(Boolean.FALSE);
emailTypeDto.setMessage(e.getMessage());
}
return "emailTypeDto";
}
}

前台js

//验证类型编号是否存在,已存在不允许添加并提示
function checkAddEmailTypeNoValue(emailTypeNo){
var bool=new Boolean();
$.ajax({
url:getBasePath()+"/mainInfo/selectValidateEmailTypeNoET.action",
type:'post',
data:{"emaiTypeDto.emailTypeNo":emailTypeNo},
dataType:'json',
async :false,
success:function(data){
if(data.success){
$("#addEmailTypeNoSpan").text(" *");
$("#addEmailTypeNoSpan").attr("check","true");
bool=true;
}else if(!data.success){
var message=data.message;
$("#addEmailTypeNoSpan").text(message);
$("#addEmailTypeNoSpan").focus();
$("#addEmailTypeNoSpan").attr("check","false");
bool=false;
}
},error : function(XMLHttpRequest, textStatus, errorThrown) {
if("parsererror"==textStatus){
if (top.location !== self.location) {
top.location = getBasePath()+ "/login.jsp";//跳出框架,并回到首页
}
}
if("error"==textStatus){
$.confrimInfo("<i style='display:inline-block;vertical-align: middle; font-size:42px;background:none;padding:0px 10px;color:#DC143C' class='glyphicon glyphicon-info-sign'></i>不好意思,出问题了!请及时联系技术!",function(){ });
} }
});
return bool;
}

前台报错:

不好意思,出问题了!请及时联系技术!"

后台报错

[com.opensymphony.xwork2.ognl.OgnlValueStack] - Error setting expression 'emaiTypeDto.emailTypeNo' with value '[Ljava.lang.String;@1f78dde'
ognl.OgnlException: target is null for setProperty(null, "emailTypeNo", [Ljava.lang.String;@1f78dde)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2309)
at ognl.ASTProperty.setValueBody(ASTProperty.java:127)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
at ognl.ASTChain.setValueBody(ASTChain.java:227)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
at ognl.Ognl.setValue(Ognl.java:737)
at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:217)
at com.opensymphony.xwork2.ognl.OgnlValueStack.trySetValue(OgnlValueStack.java:186)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:173)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setParameter(OgnlValueStack.java:151)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:317)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:228)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:236)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.manage.common.interceptor.LoginedCheckInterceptor.intercept(LoginedCheckInterceptor.java:50)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:511)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:269)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1773)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
[com.manage.email.service.impl.EmailTypeServiceImpl] - 查询邮件类型编号是否存在参数为空

JSP

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head> <title>邮件类型新增</title>
<link href="../../css/merchant/bootstrap.min.css" rel="stylesheet" />
<link href="../../css/common/namp.css" rel="stylesheet">
<script src="../../js/common/jquery-1.11.0.min.js"></script>
<script src="../../js/common/bootstrap.min.js"></script>
<script src="../../js/common/common-base.js"></script>
<script src="../../js/email/emailTypeAdd.js"></script>
<script src="../../js/common/page.js"></script>
<style type="text/css">
body {
background-color: rgb(253, 253, 253);
} table {
background-color: #ffffff;
}
@media (min-width: 768px) and (max-width: 991px) {
/*在768和991像素之间的屏幕里,这里的样式才生效*/
label{margin-left:-66px;}
}
@media (min-width: 992px) and (max-width: 1199px) {
/*在992和1199像素之间的屏幕里,这里的样式才生效*/
label{margin-left:-66px;}
}
@media (min-width: 1200px) {
/*在大于1200像素的屏幕里,这里的样式才生效*/
label{margin-left:-66px;}
}
</style>
</head>
<body>
<div style="width: 90%; margin:20px auto" class="row" >
<fieldset class="relative">
<legend align="left">邮件类型新增</legend>
<form role="form" class="form-horizontal" method="post" id="addEmailTypeForm">
<div class="form-group col-sm-12 col-md-12 col-lg-12">
<label class="control-label col-sm-4 col-md-4 col-lg-4 row" for="">类型编号:</label>
<div class="col-sm-5 col-md-5 col-lg-5">
<!--使用DTO必须将name为DTO类中的对象.属性名称 -->
<input type="text" class="form-control" name="emaiTypeDto.emailTypeNo" id="addEmailTypeNo" onbeforepaste="if(this.value.length>5){this.value=this.value.substr(0,5)};clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" onkeyup="if(this.value.length>5){this.value=this.value.substr(0,5)};this.value=this.value.replace(/[^\d]/g,'');"/>
</div>
<span class="help-block col-sm-3 col-md-3 col-lg-3" style="color:red;" check="false" id="addEmailTypeNoSpan">*</span>
</div>
<div class="form-group col-sm-12 col-md-12 col-lg-12">
<label class="control-label col-sm-4 col-md-4 col-lg-4 row" for="">英文名称:</label>
<div class="col-sm-5 col-md-5 col-lg-5">
<textarea type="text" class="form-control" cols="20" rows="5" name="emailTypeDto.emailTypeEnName" id="addEmailTypeEnName" onbeforepaste="if(this.value.length>200){this.value=this.value.substr(0,200)};clipboardData.setData('text',clipboardData.getData('text').replace(/[^a-z\u4e00-\u9fa5]/g,''))" onkeyup="if(this.value.length>200){this.value=this.value.substr(0,200)};value=value.replace(/[^a-z\A-Z\u4e00-\u9fa5]/g,'')"></textarea>
</div>
<span class="help-block col-sm-3 col-md-3 col-lg-3" style="color:red;" check="false" id="addEmailTypeEnNameSpan">*</span>
</div>
<div class="form-group col-sm-12 col-md-12 col-lg-12">
<label class="control-label col-sm-4 col-md-4 col-lg-4 row" for="">中文名称:</label>
<div class="col-sm-5 col-md-5 col-lg-5">
<textarea type="text" class="form-control" cols="20" rows="5" name="emailTypeDto.emailTypeChName" id="addEmailTypeChName" onbeforepaste="if(this.value.length>200){this.value=this.value.substr(0,200)};clipboardData.setData('text',clipboardData.getData('text').replace(/[^a-z\u4e00-\u9fa5]/g,''))" onkeyup="if(this.value.length>200){this.value=this.value.substr(0,200)};value=value.replace(/[^a-z\u4e00-\u9fa5]/g,'')"></textarea>
</div>
<span class="help-block col-sm-3 col-md-3 col-lg-3" style="color:red;" check="false" id="addEmailTypeChNameSpan">*</span>
</div>
<div class="form-group col-sm-12 col-md-12 col-lg-12">
<label class="control-label col-sm-4 col-md-4 col-lg-4 row" for="">备注:</label>
<div class="col-sm-5 col-md-5 col-lg-5">
<textarea class="form-control" name="emailTypeDto.remark" cols="20" rows="5" id="addRemark" onkeyup="if(this.value.length>200){this.value=this.value.substr(0,200)};" onbeforepaste="if(this.value.length>200){this.value=this.value.substr(0,200)};"></textarea>
</div>
</div>
<div class="form-group text-center col-sm-12 col-md-12 col-lg-12">
<button type="button" class="btn btn-default" id="saveEmailType">保存</button>
  <button type="button" class="btn btn-default" id="closeWin">关闭</button>
</div>
</form>
</fieldset>
</div>
</body>
</html>
上一篇:vi和vim区别及命令详解


下一篇:mfc CFileFind查找类