javax.servlet.ServletException: BeanUtils.populate

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javax.servlet.ServletException: BeanUtils.populate相关的知识,希望对你有一定的参考价值。

avax.servlet.ServletException: BeanUtils.populate
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:816)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203)
com.stony.core.struts.EncodingRequestProcessor.process(EncodingRequestProcessor.java:79)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206)
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:180)
com.stony.core.permission.filter.PermissionFilter.doFilter(PermissionFilter.java:239)
org.jasig.cas.client.util.AssertionThreadLocalFilter.doFilter(AssertionThreadLocalFilter.java:54)
org.jasig.cas.client.util.HttpServletRequestWrapperFilter.doFilter(HttpServletRequestWrapperFilter.java:75)
org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:201)
com.stony.core.permission.filter.EAAuthenticationFilter.doFilter(EAAuthenticationFilter.java:88)
org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:76)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

root cause

java.lang.NullPointerException
org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty(PropertyUtilsBean.java:427)
org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty(PropertyUtilsBean.java:340)
org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:684)
org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)
org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:884)
org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:493)

参考技术A NPE问题,检查下对象为空的问题

关于js的地址跳转

一、基本的地址跳转

解说:

window.open 弹出新窗口的命令;     page.html‘ 弹出窗口的文件名;    ‘newwindow‘ 弹出窗口的名字(不是文件名),非必须,可用空‘代替; height=100 窗口高度;  width=500 窗口宽度;  top=0 窗口距离屏幕上方的象素值;  left=0 窗口距离屏幕左侧的象素值。

window.location.href = "页面地址"; //当前页跳转  相当于 <a href="baidu.com" target="_self">go baidu</a>  
window.open(‘页面地址‘); //打开新页面   相当于<a href="baidu.com" target="_blank">go baidu</a>
window.open(‘page.html‘, ‘newwindow‘, ‘height=100, width=400, top=0,left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no‘)

 

二、返回上一页,当页刷新

window.history.back(-1); //返回上一页
window.history.back(); //返回上一页
document.referrer;  //返回上一页,也用于获取上一页的链接,假如没有上一页则返回"",多用于移动端

location.reload(); //当页刷新
window.location.go(-1); //返回上一页并刷新

 

三、其他的页面跳转

解说:

 self 指代当前窗口对象,属于window 最上层的对象。

location.href 指的是某window对象的url的地址

 self.location.href 指当前窗口的url地址,去掉self默认为当前窗口的url地址,一般用于防止外部的引用

top.location.href:为引用test.html页面url的父窗口对象的url

top指代的是主体窗口

self.location.href = "baidu.com" 
top.location.href = ‘页面地址‘;

//假如要页面a跳出iframe框架
if(top.location.href != self.location.href) {
	location.href = "页面a";
}

  

 

以上是关于javax.servlet.ServletException: BeanUtils.populate的主要内容,如果未能解决你的问题,请参考以下文章