在struts2 中如何设置httpsession 超时的时间?

最近刚刚接触struts2,struts2 对session request response application 都做了封装。比如说SessionMap
操作这些对象同操作带来方便。现在的问题是。在struts 2的 API中我只查到了 使session失效的方法。我如何设置session的超时时间呢。是否需要得到httpsession 的底层对象来操作呢。比如说 如果该用户 20分钟不做任何操作 就必须重登陆。

3个回答

另外你的App Server会有一个默认Session超时时间,这个时间根据你使用的App Server而不同,例如Tomcat默认是30分钟后超时,你设置的时间小于默认时间则按你设置的时间过期,超过这个默认时间则按默认时间过期。

在你的web.xml里面加入session超时

20

里面的20是指20分钟,你可以设置你自己需要的超时时间。

这个可以在web。xml里配置的
和struts2没什么关系的
[code="java"]

30

[/code]

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
javaweb项目设置session过期时间为10分钟,超时却不会过期

request.getSession().setMaxInactiveInterval(600); 设置session过期时间为10分钟,超时却不会过期,但是设置5分钟却可以。兄弟们帮我看看。

如何在Struts2 的Action的拦截器中设置Action的参数

[color=red] 问题描述如下:[/color] 1. Action的配置如下: <action name="download" class="download"> <interceptor-ref name="defaultStack" /> [color=blue]<interceptor-ref name="downloadInter" />[/color] [color=blue]<param name="inputPath">/WEB-INF/uploadFiles/article.pdf</param>[/color] <result name="success" type="stream"> <param name="contentType">application/pdf</param> <param name="inputName">targetFile</param> <param name="contentDisposition"> attachment;filename="yourArticle.pdf" </param> <param name="bufferSize">2048</param> </result> </action> 2. Action部分代码如下: public class FileDownloadAction extends ActionSupport { private String inputPath; //inputPath的getter与setter略 3. 我想在[color=blue]downloadInter[/color]拦截器中设置Action的i[color=blue]nputPath[/color]参数,以便将从数据库中读取的 pdf文件,提供给读者下载。 4. downloadInter代码如下: [size=x-large] public class FileDownloadInterceptor extends AbstractInterceptor { private SpringJdbcHelper springJdbcHelper; private LobHandler lobHandler; @Override public String intercept(ActionInvocation invocation) throws Exception { System.out.println("FileDownloadInterceptor---intercept..."); invocation.addPreResultListener(new PreResultListener() { @SuppressWarnings("unchecked") public void beforeResult(ActionInvocation invocation, String resultCode) { System.out.println("FileDownloadInterceptor---beforeResult..."); HttpSession session = ActionHelper.getHttpSession(); final String year = (String) session.getAttribute("year"); final String month = (String) session.getAttribute("month"); final String articleNo = (String) session .getAttribute("articleNo"); @SuppressWarnings("unused") Map<String, ResultConfig> resultMap = invocation.getProxy() .getConfig().getResults(); ActionConfig config = invocation.getProxy().getConfig(); ResultConfig finalResultConfig = resultMap.get(resultCode); final String sqlStr = " SELECT pubchpapername,pubfile FROM periodical_show_article " + " WHERE pubyear = ? AND pubmonth = ? AND pubpaperno = ? "; @SuppressWarnings("unused") ArrayList<ShowArticle> pdfsList = (ArrayList<ShowArticle>) getSpringJdbcHelper() .getJdbcTemplate().query(sqlStr, new Object[] { year, month, articleNo }, new RowMapper() { public Object mapRow(ResultSet rs, int rowNum) throws SQLException { String name = rs.getString(1); byte[] pubpdf = getLobHandler() .getBlobAsBytes(rs, 2); final ShowArticle showArticle = new ShowArticle(); showArticle.setPubChPaperName(name); showArticle.setPubFile(pubpdf); return showArticle; } }); String dir = null; File file = null; String realDir = null; String newFile = year + month + articleNo + "_" + new Date().getTime() + ".pdf"; BufferedOutputStream bos = null; FileOutputStream fos; try { dir = new File(".").getCanonicalPath(); System.out.println("dir = " + dir); file = new File(dir, newFile); realDir = file.getCanonicalPath(); System.out.println("realDir = " + realDir); fos = new FileOutputStream(file); bos = new BufferedOutputStream(fos); bos.write(pdfsList.get(0).getPubFile()); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } [color=blue]// 我想在此设置inputPath参数[/color] [color=blue]config.addParam("inputPath", realDir);[/color] finalResultConfig.addParam("contentType", "application/pdf"); finalResultConfig.addParam("contentDisposition", "attachment"); System.out.println("FileDownloadInterceptor---addParam..."); } }); return invocation.invoke(); } public SpringJdbcHelper getSpringJdbcHelper() { return springJdbcHelper; } public void setSpringJdbcHelper(SpringJdbcHelper springJdbcHelper) { this.springJdbcHelper = springJdbcHelper; } public LobHandler getLobHandler() { return lobHandler; } public void setLobHandler(LobHandler lobHandler) { this.lobHandler = lobHandler; } } [/size] 5. [color=red]如果有更好的方案,希望不吝赐教,谢谢![/color]

struts2 页面间跳转问题

struts2的配置 struts.xml核心配置 ``` package name="app" extends="struts-default" namespace="/"> <!-- app/模块/类名/方法名 --> <action name="app/*/*/*" class="com.demo.app.{1}.action.{2}Action" method="{3}"> <result name="defaultView">app/index/index/{3}.jsp</result> <result name="view">/WEB-INF/jsp/{1}/{2}/${nextPath}.jsp</result> </action> </package> ``` Action调用方法,访问的uri=app/index/index/login ``` /* public String login(ServletRequest request,ServletResponse response){ */ public String login() throws NoSuchAlgorithmException, UnsupportedEncodingException{ HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); logger.info("action_uri=="+request.getRequestURI()); HttpSession session = request.getSession(); User userExsit = (User) session.getAttribute("user"); if (userExsit != null) { return view("recruitDetail"); } else { String loginname = request.getParameter("mobile"); String password = request.getParameter("password"); User us = loginService.findByUserName(loginname); if (us != null && us.getLoginPwd() != null && MD5Util.validPasswd(password, us.getLoginPwd())) { return view("recruitDetail");-----------(成功执行这条语句,且struts.xml中的${nextPath}值为recruitDetail) } else { return view("login"); } } } return 语句用到的view()方法 public String view(String vPath){ nextPath = vPath; logger.debug("动作完成后,转发到:" + nextPath); this.assign("timeStr", "" + System.currentTimeMillis() + System.nanoTime()); this.assign("uuid", UUIDUtil.get32ID());// 为页面传递UUID,用于页面的标识 return "view"; } ``` 结果是,我点击登陆后,在调试页面获得了要跳转页面如图: ![![图片说明](https://img-ask.csdn.net/upload/201703/12/1489293514_462880.jpg)图片说明](https://img-ask.csdn.net/upload/201703/12/1489293502_521445.jpg) 我的问题是要跳转的页面已经可以在页面debug中查到,说明访问路径没问题,怎么就没有将原来的页面覆盖掉呢,请大神们帮忙解答下,小弟谢谢了,纠结半天了

SpringBoot 2设置session过期时间生效后再修改不生效

在IDEA中,如下设置为100分钟,后重启生效,再修改为 PT1M 即1分钟后无效不生效,clean 重新编译 重启后还是100分钟。为何呢? springboot 版本是 2.1.8.RELEASE ```yml server: port: 8080 servlet: session: timeout: PT100M ```

如何通过DWR框架调用struts2中action中的方法

RT ,谢谢各位了! 我用 <create creator="new" javascript="userManager"> <param name="class" value="com.squall.oa.action.UserAction" /> <include method="checkLogin"/> </create> 这样的话不行,报服务器端的错误, 调用service层和dao层的我会使用了,只想看一下一般在项目中如果调用action中的方法的话,应该如何写? [b]问题补充:[/b] 这个是我刚写的一个Class (已经脱离action) public class UserLogin { private String randomCode; private String tag; @Autowired @Qualifier("userService") private IUserService userService; public String checkLogin(User myUser){ if (randomCode.equals(getSession().getAttribute("randomCode").toString())){ if(userService.checkLogin(myUser)){ tag = "success"; } else{ tag = "failed"; } } else{ tag = "noRandNo"; } return tag; } private HttpSession getSession() { return ServletActionContext.getRequest().getSession(); } } 然后我去配置dwr.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN" "http://getahead.org/dwr/dwr20.dtd"> <dwr> <allow> <convert converter="bean" match="com.squall.oa.model.User" javascript="myUser"/> <create creator="new" javascript="userManager"> <param name="class" value="com.squall.oa.dwr.UserLogin"/> <include method="checkLogin"/> </create> </allow> </dwr> 下面是JSP页面的代码: function validateUser(){ var username,password,result; var myUser = {}; username = $("uname").value; password = $("upass").value; myUser.u_name = username; myUser.u_pass = password; userManager.checkLogin(myUser,callBackLogin) if ("success" == result){ alert('用户名密码正确!'); return true; }else if ("failed" == result){ alert('用户名密码错误!'); return false; }else { alert('验证码错误!'); return false; } } function callBackLogin(data){ alert(data); result = data; } 我其实就是为了多传到dwr中 验证码 字符串, 但是这样写 就报告了如下的错误: [b]a server error has Occured . More information may be available in the console[/b] 但是Console里 什么服务端的异常都没有~ [b]问题补充:[/b] 哦您说的对!~~ 那您看这个问题该如何解决为最佳呢? 我应该如何去设计这个验证码的字段? 把它传进service方法里么? [b]问题补充:[/b] 好的, 我刚才测试了一下 /** * @日期: Aug 21, 2009 * * @作者: 翟立虎 */ package com.squall.oa.dwr; import javax.servlet.http.HttpSession; import org.apache.struts2.ServletActionContext; import com.squall.oa.model.User; import com.squall.oa.service.IUserService; public class UserLogin { private String randomCode; private String tag; // @Autowired // @Qualifier("userService") // private IUserService userService; public String checkLogin(User myUser){ if (randomCode.equals(getSession().getAttribute("randomCode").toString())){ if(1==1){ tag = "success"; } else{ tag = "failed"; } } else{ tag = "noRandNo"; } return tag; } private HttpSession getSession() { return ServletActionContext.getRequest().getSession(); } } 我写了个测试类,如果不使用Session 那么就不会报告那个错误, 如果使用了, 还会出现那个错误 哎,我真是头疼,那我通过什么方法,得到Session,拿到验证码, 而且还不会报错呢? 非常感谢您!! 就差这点儿问题了!~~ [b]问题补充:[/b] 这样做的话,那么前台的JS怎么写传值呢? 我对回调也不是理解很深,谢谢了~~ userManager.checkLogin(myUser,<%=session%>,callBackLogin); 我这样写好像不行~ [b]问题补充:[/b] 我测试过了,还是不行,报刚才的错误~~ 哎,谢谢您了,不行的话 我就绕过这个验证码吧,传到service层里判断算了!~ [b]问题补充:[/b] 谢谢楼上两位详解了!

这段struts1的功能,在struts2中如何实现jsp tag?

这是我的struts1中的代码 public class ValidateSessionTag extends BodyTagSupport { /** * */ private static final long serialVersionUID = 1L; public int doEndTag() throws JspException { boolean valid = false; HttpSession session = pageContext.getSession(); if ((session != null) && (session.getAttribute(Constant.SESSION_USER_KEY) != null)) valid = true; if (valid) return (EVAL_PAGE); else { try { ServletRequest request=pageContext.getRequest(); ServletResponse response=pageContext.getResponse(); RequestDispatcher requestDispatcher=request.getRequestDispatcher("/index.jsp"); requestDispatcher.forward(request, response); } catch (Exception e) { throw new JspException(e.toString()); } return (SKIP_PAGE); } } } 在struts2中使的时候报告一个错误load tag handler class "com.hxq.taglibs.ValidateSessionTag" for tag "hxq:validateSession" 我在web-inf下建立了hxq.tld,并且已经引用。 struts2 是不是使用不了 jsp自定义标签啊。 请问哥姐,我该如何在struts2中实现 这个功能啊。 [b]问题补充:[/b] 我这个代码是做session验证的。 做session验证 用拦截器 我倒是会用,也会写。 我还有一代码是做权限验证的。 是在jsp显示的时候 验证一下是否有权限,如果没有权限就不在jsp上显示。 public class ValidatePermissionTag extends BodyTagSupport { private static final long serialVersionUID = 1L; private String permission;//设定的访问权限 private String include="3";//(1)是包含该属性就可以了,(2)是除了最后一项匹配以外都要匹配,(3)必须完全匹配 private String flag="true";//是否匹配显示还是不匹配显示 public void setPermission(String permission){ this.permission=permission; } public void setInclude(String include){ this.include=include; } public void setFlag(String flag){ this.flag=flag; } public int doStartTag() throws JspException { int status=SKIP_BODY; HttpSession session = pageContext.getSession(); if ((session != null) && (session.getAttribute(Constant.SESSION_USER_PERMISSION) != null)){ ArrayList list=(ArrayList)session.getAttribute(Constant.SESSION_USER_PERMISSION); Iterator iterator=list.iterator(); while(iterator.hasNext()){ String ops=iterator.next().toString();//实际拥有的权限 if("true".equals(flag)){ if("1".equals(include)){ if(ops.indexOf(permission)>0){ return EVAL_BODY_INCLUDE; } }else if("2".equals(include)){ if(ops.startsWith(permission)){ return EVAL_BODY_INCLUDE; } }else{ if(ops.equals(permission)){ return EVAL_BODY_INCLUDE; } } }else{ if("1".equals(include)){ if(ops.indexOf(permission)>0){ return SKIP_BODY; } }else if("2".equals(include)){ if(ops.startsWith(permission)){ return SKIP_BODY; } }else{ if(ops.equals(permission)){ return SKIP_BODY; } } status=EVAL_BODY_INCLUDE; } } } return status; } } 我的这两段代码在另外一struts1的工程中 都是好使的。 我现在正在学习struts2,并且 想把原来struts1的工程用struts2重新实现。

Struts2 过滤器和拦截器执行的顺序

在web.xml ,定义首页位置: [code="xml"] <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> [/code] 并配置了一个filter,用于过滤对jsp的直接访问. [code="xml"] <filter> <filter-name>indexfilter</filter-name> <filter-class>com.prodinfo.filter.IndexFilter</filter-class> </filter> <filter-mapping> <filter-name>indexfilter</filter-name> <url-pattern>/index.jsp</url-pattern> </filter-mapping> [/code] [code="java"] ...... public class IndexFilter implements Filter { ...... public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest re = (HttpServletRequest) request; HttpSession session = re.getSession(); //redirect to action request.getRequestDispatcher("loadindex.action?id=xxx").forward( request, response); System.out.println("i am filter"); } ...... } [/code] struts.xml中配置了interceptor,拦截用户的请求,在action执行之前,load页面信息,然后继续. [code="xml"] <interceptors> <interceptor name="LoadHeaderFooter" class="loadHeaderFooter"> </interceptor> <interceptor-stack name="InterceptorStack"> <interceptor-ref name="defaultStack" /> <interceptor-ref name="LoadHeaderFooter" /> </interceptor-stack> </interceptors> <action name="loadindex" class="companyInfoAction" method="loadCompanyInfo"> <result name="success">/index.jsp</result> <interceptor-ref name="LoadHeaderFooter"></interceptor-ref> </action> [/code] [code="java"] ...... public String intercept(ActionInvocation invocation) throws Exception { //System.out.println("Before Action"); //get header & footer infomation List result = ci.getHeaderFooter("xxx"); ...... System.out.println("i am interceptor"); final String res = invocation.invoke(); //System.out.println("After Action"); return res; } ...... [/code] 我理解的执行顺序是(<welcome-file-list>)index.jsp->(filter)"loadindex.action?id=xxx"->(interceptor)"loadHeaderFooter"->(Action)"loadindex"->(jsp)index.jsp 可是现在执行的顺序是先interceptor再filter,程序运行打印结果是: i am interceptor loading company info of null i am filter 请问我该在哪里配置filter 和 interceptor的顺序呢? 谢谢! [b]问题补充:[/b] 谢谢 蔡华江 的回复. 即是说我应该从web.xml里filter的位置来下手找我的问题的原因? [b]问题补充:[/b] 去掉了interceptor,发现还是先执行的action再进的filter. Struts2的执行顺序一定是先action再filter? 已经把FilterDispatcher放到web.xml最上面了.

用Struts2生成验证码,验证码图片显示不出来。

最近在学Struts2,有一个题目是使用Struts2写一个有验证码的登陆界面。但是怎么试验证码都出不来,麻烦各位大神帮我解决下。谢谢。 # 界面 ![图片说明](https://img-ask.csdn.net/upload/201609/11/1473586791_407203.png) # LoginValidateAction.java package cn.edu.xmut.action; import javax.servlet.http.HttpSession; import org.apache.struts2.ServletActionContext; import com.opensymphony.xwork2.ActionSupport; public class LoginValidateAction extends ActionSupport { /** * */ private static final long serialVersionUID = 1L; private String checkCode; public String getCheckCode() { return checkCode; } public void setCheckCode(String checkCode) { this.checkCode = checkCode; } @Override public String execute() throws Exception { return SUCCESS; } @Override public void validate() { HttpSession session = ServletActionContext.getRequest().getSession(); String checkCode2 = (String)session.getAttribute("checkCode"); if(!checkCode.equals(checkCode2)) { this.addActionError("输入的验证码不正确,请重新输入!"); } } } # CreateImageAction.java package cn.edu.xmut.action; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.util.Random; import javax.imageio.ImageIO; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.struts2.ServletActionContext; import com.opensymphony.xwork2.ActionSupport; public class CreateImageAction extends ActionSupport { /** * */ private static final long serialVersionUID = 1L; private ByteArrayInputStream inputStream; private static int WIDTH = 60; private static int HEIGHT = 20; public ByteArrayInputStream getInputStream() { return inputStream; } public void setInputStream(ByteArrayInputStream inputStream) { this.inputStream = inputStream; } private static String createRandom() { String str = "0123456789qwertyuiopasdfghjklzxcvbnm"; char[] rands = new char[4]; Random random = new Random(); for (int i = 0; i < 4; i++) { rands[i] = str.charAt(random.nextInt(36)); } return new String(rands); } private void drawBackground(Graphics g) { // 画背景 g.setColor(new Color(0xDCDCDC)); g.fillRect(0, 0, WIDTH, HEIGHT); // 随机产生 120 个干扰点 for (int i = 0; i < 120; i++) { int x = (int) (Math.random() * WIDTH); int y = (int) (Math.random() * HEIGHT); int red = (int) (Math.random() * 255); int green = (int) (Math.random() * 255); int blue = (int) (Math.random() * 255); g.setColor(new Color(red, green, blue)); g.drawOval(x, y, 1, 0); } } private void drawRands(Graphics g, String rands) { g.setColor(Color.BLACK); g.setFont(new Font(null, Font.ITALIC | Font.BOLD, 18)); // 在不同的高度上输出验证码的每个字符 g.drawString("" + rands.charAt(0), 1, 17); g.drawString("" + rands.charAt(1), 16, 15); g.drawString("" + rands.charAt(2), 31, 18); g.drawString("" + rands.charAt(3), 46, 16); System.out.println(rands); } @Override public String execute() throws Exception { HttpServletResponse response = ServletActionContext.getResponse(); // 设置浏览器不要缓存此图片 response.setHeader("Pragma", "no-cache"); response.setHeader("Cache-Control", "no-cache"); response.setDateHeader("Expires", 0); String rands = createRandom(); BufferedImage image = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB); Graphics g = image.getGraphics(); // 产生图像 drawBackground(g); drawRands(g, rands); // 结束图像 的绘制 过程, 完成图像 g.dispose(); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); ImageIO.write(image, "jpeg", outputStream); ByteArrayInputStream input = new ByteArrayInputStream(outputStream .toByteArray()); this.setInputStream(input); HttpSession session = ServletActionContext.getRequest().getSession(); session.setAttribute("checkCode", rands); input.close(); outputStream.close(); return SUCCESS; } } # struts.xml配置 <action name="cteateImageAction" class="cn.edu.xmut.action.CreateImageAction"> <result name = "success" type="stream"> <param name = "contentType">image/jpeg</param> <param name = "inputName">inputStream</param> </result> </action> <action name="loginValidateAction" class="cn.edu.xmut.action.LoginValidateAction"> <result name="success">/success.jsp</result> <result name="input">/login.jsp</result> </action> # login.jsp <action name="cteateImageAction" class="cn.edu.xmut.action.CreateImageAction"> <result name = "success" type="stream"> <param name = "contentType">image/jpeg</param> <param name = "inputName">inputStream</param> </result> </action> <action name="loginValidateAction" class="cn.edu.xmut.action.LoginValidateAction"> <result name="success">/success.jsp</result> <result name="input">/login.jsp</result> </action>

struts2执行了login方法,但是不执行logout方法

我的一个登陆登出方法,利用struts2的,可以执行login方法,但是执行logout的action时,不执行logout(),直接跳转到了result 对应的页面。。。不知道怎么解决,求高人 这是我的UserAction [code="java"] package com.lfq.action; import javax.servlet.http.Cookie; import javax.servlet.http.HttpSession; import com.lfq.dao.UserDAO; import com.lfq.dao.impl.UserDAOImpl; import com.lfq.entity.User; public class UserAction extends BaseAction { /** * */ private static final long serialVersionUID = 1L; private User user; private String msg; //消息 private String userName; private String password; public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } private boolean rememberMe; public boolean isRememberMe() { return rememberMe; } public void setRememberMe(boolean rememberMe) { this.rememberMe = rememberMe; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public String login() { String userName = getUserName(); String password = getPassword(); if("".equals(userName) || "".equals(password)) { this.msg = "用户名或者密码不允许为空!"; return INPUT; } UserDAO userDao = new UserDAOImpl(); int userId = userDao.valid(userName, password); if(userId > 0) { if(rememberMe){ String t =userId +","+ userName + "," + password; Cookie cookie = new Cookie("COOKIE_KEY_REMEMBER_LOGIN", t); cookie.setMaxAge(86400); super.getResponse().addCookie(cookie); } super.getSession().setAttribute("SESSION_KEY_USERNAME", userName); super.getSession().setAttribute("SESSION_KEY_USERID", userId); return SUCCESS; } else { this.addFieldError("error", "用户名或密码错误"); return INPUT; } } public String logout() { System.out.println("------------------------"); HttpSession session = getSession(); session.removeAttribute("SESSION_KEY_USERID"); session.removeAttribute("SESSION_KEY_USERNAME"); return SUCCESS; } @Override public void validate() { // TODO Auto-generated method stub if(getUserName() == null || getUserName().trim().equals("")) { addFieldError("userName", getText("user.required")); return; } if(getPassword() == null || getPassword().trim().equals("")) { addFieldError("password", getText("pass.required")); return; } } } [/code] 对应struts.xml如下 [code="java"] <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN" "http://struts.apache.org/dtds/struts-2.1.7.dtd"> <struts> <include file="struts-default.xml" /> <package name="admin" extends="struts-default" namespace="/admin"> <action name="login" class="com.lfq.action.UserAction" method="login"> <result name="input">/admin/login.jsp</result> <result name="success">/admin/index.jsp</result> </action> <action name="logout" class="com.lfq.action.UserAction" method="logout"> <result name="*">/index.jsp</result> </action> </package> </struts> [/code]

判断HttpSession是否有效

我现在有一个这个需求,在一个Map中存了很多的HttpSession,现在需要遍历,如果其中有session失效了,则将失效的session从Map中移除,在网上没有找到比较好的回答!请大家帮帮忙,有没有什么比较好的建议!

用Struts2生成验证码,验证码图片显示不出来1。

## 最近在学Struts2,有一个题目是使用Struts2写一个有验证码的登陆界面。但是怎么试验证码都出不来,麻烦各位大神帮我解决下。谢谢。 登陆界面 ![登陆界面](https://img-ask.csdn.net/upload/201609/11/1473587272_792041.png) # LoginValidateAction.java ``` package cn.edu.xmut.action; import javax.servlet.http.HttpSession; import org.apache.struts2.ServletActionContext; import com.opensymphony.xwork2.ActionSupport; public class LoginValidateAction extends ActionSupport { /** * */ private static final long serialVersionUID = 1L; private String checkCode; public String getCheckCode() { return checkCode; } public void setCheckCode(String checkCode) { this.checkCode = checkCode; } @Override public String execute() throws Exception { return SUCCESS; } @Override public void validate() { HttpSession session = ServletActionContext.getRequest().getSession(); String checkCode2 = (String)session.getAttribute("checkCode"); if(!checkCode.equals(checkCode2)) { this.addActionError("输入的验证码不正确,请重新输入!"); } } } ``` # CreateImageAction.java ``` package cn.edu.xmut.action; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.util.Random; import javax.imageio.ImageIO; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.struts2.ServletActionContext; import com.opensymphony.xwork2.ActionSupport; public class CreateImageAction extends ActionSupport { /** * */ private static final long serialVersionUID = 1L; private ByteArrayInputStream inputStream; private static int WIDTH = 60; private static int HEIGHT = 20; public ByteArrayInputStream getInputStream() { return inputStream; } public void setInputStream(ByteArrayInputStream inputStream) { this.inputStream = inputStream; } private static String createRandom() { String str = "0123456789qwertyuiopasdfghjklzxcvbnm"; char[] rands = new char[4]; Random random = new Random(); for (int i = 0; i < 4; i++) { rands[i] = str.charAt(random.nextInt(36)); } return new String(rands); } private void drawBackground(Graphics g) { // 画背景 g.setColor(new Color(0xDCDCDC)); g.fillRect(0, 0, WIDTH, HEIGHT); // 随机产生 120 个干扰点 for (int i = 0; i < 120; i++) { int x = (int) (Math.random() * WIDTH); int y = (int) (Math.random() * HEIGHT); int red = (int) (Math.random() * 255); int green = (int) (Math.random() * 255); int blue = (int) (Math.random() * 255); g.setColor(new Color(red, green, blue)); g.drawOval(x, y, 1, 0); } } private void drawRands(Graphics g, String rands) { g.setColor(Color.BLACK); g.setFont(new Font(null, Font.ITALIC | Font.BOLD, 18)); // 在不同的高度上输出验证码的每个字符 g.drawString("" + rands.charAt(0), 1, 17); g.drawString("" + rands.charAt(1), 16, 15); g.drawString("" + rands.charAt(2), 31, 18); g.drawString("" + rands.charAt(3), 46, 16); System.out.println(rands); } @Override public String execute() throws Exception { HttpServletResponse response = ServletActionContext.getResponse(); // 设置浏览器不要缓存此图片 response.setHeader("Pragma", "no-cache"); response.setHeader("Cache-Control", "no-cache"); response.setDateHeader("Expires", 0); String rands = createRandom(); BufferedImage image = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB); Graphics g = image.getGraphics(); // 产生图像 drawBackground(g); drawRands(g, rands); // 结束图像 的绘制 过程, 完成图像 g.dispose(); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); ImageIO.write(image, "jpeg", outputStream); ByteArrayInputStream input = new ByteArrayInputStream(outputStream .toByteArray()); this.setInputStream(input); HttpSession session = ServletActionContext.getRequest().getSession(); session.setAttribute("checkCode", rands); input.close(); outputStream.close(); return SUCCESS; } } ``` # Struts2配置 ``` <action name="cteateImageAction" class="cn.edu.xmut.action.CreateImageAction"> <result name = "success" type="stream"> <param name = "contentType">image/jpeg</param> <param name = "inputName">inputStream</param> </result> </action> <action name="loginValidateAction" class="cn.edu.xmut.action.LoginValidateAction"> <result name="success">/success.jsp</result> <result name="input">/login.jsp</result> </action> ``` # login.jsp ``` <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <html> <head> <base href="<%=basePath%>"> <title>My JSP 'login.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> <h3><font color="blue">带有验证码的登陆界面</font></h3> <s:form action="loginValidateAction.action" theme="simple"> 用户名:<s:textfield name="username"></s:textfield><br> 密码 :<s:password name="password"></s:password><br> 验证码:<s:textfield name="checkCode"></s:textfield>            <!--若要点击图片刷新,重新得到一个验证码,要在后面加上个随机数,这样保证每次提交过去的都是不一样的path,防止因为缓存而使图片不刷新--> <img src="createImageAction.action" onclick="this.src='createImageAction.action?'+ Math.random()" title="点击图片刷新验证码"/><br> <s:actionerror cssStyle="color:red"/> <s:submit value="提交"></s:submit> </s:form> </body> </html> ```

在struts中关于HttpServletRequestWrapper的问题。。。

我在代码中继承了类HttpServletRequestWrapper,代码如下: [code="java"] public class MyRequestWrapper extends HttpServletRequestWrapper { HttpSession iSession = null; public MyRequestWrapper(HttpServletRequest request) { super(request); } public HttpSession getSession() { if (null != iSession) { return iSession; } return super.getSession(); } public HttpSession getSession(boolean create) { if (null != iSession) { return iSession; } return super.getSession(create); } public void setSession(HttpSession iSession) { this.iSession = iSession; } } [/code] 而我在struts Action接受到页面提交过来的信息时,初始化了该类(MyRequestWrapper),Action代码如下: [code="java"] public ActionForward login(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { ......... MyRequestWrapper wrapperRequest = (MyRequestWrapper) request; ......... } [/code] [b][color=red]可是出错了:[/color][/b] [color=red]java.lang.ClassCastException: org.apache.catalina.connector.RequestFacade[/color] [color=red]at com.redMud.web.action.LoginAction.login(LoginAction.java:68)[/color] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274) at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.shareinfo.common.util.EncodingFilter.doFilter(EncodingFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:833) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285) at java.lang.Thread.run(Thread.java:595) 这个问题有哪位朋友遇到过的吗?帮忙解答一下,谢。。。 PS:能说说HttpServletRequestWrapper 具体的用法吗?

如何处理HttpSession和Session之间的联系

我现在做的项目里,需要在http通信的基础上再进行websocket通信,需要使用Java中HttpSession,但是也需要使用Session,怎么做到对应于同一个客户端的HttpSession实例和Session实例之间信息共享。

怎么通过httpsession 获取request对象?

怎么通过httpsession 获取request对象?我是在监听器里边设置页面跳转

struts2过滤器 没有用

LoginFilter类: public void destroy() { } public void doFilter(ServletRequest sRequest, ServletResponse sResponse, FilterChain filterChain) throws IOException, ServletException{ HttpServletRequest request = (HttpServletRequest) sRequest; HttpServletResponse response = (HttpServletResponse) sResponse; HttpSession session = request.getSession(); String url=request.getServletPath(); String contextPath=request.getContextPath(); if(url.equals("")) url+="/"; if((url.startsWith("/")&&!url.startsWith("/login"))){//若访问后台资源 过滤到login String user=(String)session.getAttribute("username"); if(user==null){//转入管理员登陆页面 response.sendRedirect(contextPath+"/login.jsp"); return; } } filterChain.doFilter(sRequest, sResponse); } public void init(FilterConfig arg0) throws ServletException { } web.xml: <filter> <filter-name>loginFilter</filter-name> <filter-class>com.gx.utils.LoginFilter</filter-class> <init-param> <param-name>targetFilterLifecycle</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>loginFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> 还没有登录判断就跳转到LoginFilter类里面了,

HttpSession中保持的东西多大可能影响性能?

最近在做一个系统的性能调优,说实话我没撒经验,用LoadRunner+JProfiler对执行时间和内存进行分析。 偶尔发现在执行了一段时间后,一个用户HttpSession可以达到3M还可能更高。这当然和系统中把很多东西都丢到session中有关。 因为我没有相关的经验,不知道session中的东西多大会造成系统性能问题。事实上我发现在压力测试的时候,JVM分配1G的内存都不够用,GC很频繁,Application Server的CPU load也几乎100%,所以我怀疑是内存占用有问题,不知道是不是这个session导致的? 1个用户3M,100个用户就是300M,还是有点恐怖的。 [b]问题补充:[/b] 这个系统不是我设计的,我接手是为了性能调优。目前用JProfiler来看,几乎什么东西都丢到session了,比如用户信息、权限表、查询条件、甚至查询结果集....我都有点疯了,我干了4年Java Web应用,从来不敢做的事情,这个系统都给做了。这个问题肯定要解决,我只想知道session过大是不是可能导致性能问题,或者有相关调优经验的同学来个点建议

struts2中add cookie 不能再客户端生成cookie文件,为什么?

我做自动登录的功能,是这样操作的: [code="java"] package com.zuwoba.presentation.action.account; import java.util.Map; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.struts2.ServletActionContext; import org.apache.struts2.StrutsStatics; import org.apache.struts2.interceptor.ServletRequestAware; import org.apache.struts2.interceptor.ServletResponseAware; import com.opensymphony.xwork2.ActionContext; import com.zuwoba.model.User; import com.zuwoba.model.UserSession; import com.zuwoba.presentation.action.base.BaseAction; import com.zuwoba.util.EmailLoginAddress; import com.zuwoba.util.MD5_Encoding; /** * @project_name zuwoba * @file_name LoginAction.java * @author tianhandigeng * @version Oct 25, 2010 2:53:04 PM * @declaration */ public class LoginAction extends BaseAction implements ServletRequestAware,ServletResponseAware{ private String email_username; private String password; private String captcha; private String autologin; private HttpServletRequest request; private HttpServletResponse response; // 提示窗口 private String hint; private String tip; public String getTip() { return tip; } public void setTip(String tip) { this.tip = tip; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getAutologin() { return autologin; } public void setAutologin(String autologin) { this.autologin = autologin; } public String getEmail_username() { return email_username; } public void setEmail_username(String email_username) { this.email_username = email_username; } public String getHint() { return hint; } public void setHint(String hint) { this.hint = hint; } public String getCaptcha() { return captcha; } public void setCaptcha(String captcha) { this.captcha = captcha; } public void setServletRequest(HttpServletRequest servletRequest) { this.request=servletRequest; } public void setServletResponse(HttpServletResponse servletResponse) { this.response=servletResponse; } @SuppressWarnings("unchecked") public String execute() { //// HttpServletResponse response = (HttpServletResponse) ActionContext //// .getContext().get(StrutsStatics.HTTP_RESPONSE); //// HttpServletRequest request = (HttpServletRequest) ActionContext //// .getContext().get(StrutsStatics.HTTP_REQUEST); //// HttpSession session = request.getSession(); // HttpServletResponse response=(HttpServletResponse)ServletActionContext.getResponse(); // HttpServletRequest request=(HttpServletRequest)ServletActionContext.getRequest(); HttpSession session=request.getSession(); //获得域名 // String host=request.getServerName(); String host="ceshi"; email_username = this.getEmail_username().trim(); password = this.getPassword().trim(); captcha = this.getCaptcha().trim().toLowerCase(); autologin = this.getAutologin(); // 密码加密 MD5_Encoding md5 = new MD5_Encoding(); password = md5.getMD5ofStr(password); if (!captcha.equals(session.getAttribute("idcode"))) { this.setTip("验证码错误"); this.setHint("failed"); return INPUT; } else { // Email登录 User user1 = userService.findUserByEmailPassword(email_username, password); if (user1 != null) { if ("N".equals(user1.getEnable())) {// 邮件登陆但没有激活 String emailAddress = EmailLoginAddress .getEmialLoginAddress(email_username); session.setAttribute("email", email_username); session.setAttribute("secret", user1.getSecret()); session.setAttribute("tempname", user1.getUsername()); session.setAttribute("emailAddress", emailAddress); return "unverified"; } else { // 处理自动登录 if (autologin != null) { // 创建两个cookie对象 // 一个cookie记录用户名,另一个记录唯一的验证码 // 并将此验证码写入数据库,以备用户返回时查询(防止伪造cookie) Cookie cookie1 = new Cookie("SESSION_LOGIN_USERNAME", user1 .getUsername()); cookie1.setMaxAge(60 * 60 * 24 * 14);// 设置cookie有效期为2周 cookie1.setPath("/"); cookie1.setDomain(host); response.addCookie(cookie1); String sessionid = session.getId(); Cookie cookie2 = new Cookie("SESSION_ID", sessionid); cookie2.setMaxAge(60 * 60 * 24 * 14); cookie2.setPath("/"); cookie2.setDomain(host); response.addCookie(cookie2); // 在数据库中插入相应记录 UserSession userSession = new UserSession(); userSession.setUsername(user1.getUsername()); userSession.setSessionid(sessionid); userService.addUserSession(userSession); } session.setAttribute("user", user1); return SUCCESS; } } else { // 用户名登陆 User user2 = userService.findUserByUserNamePassword( email_username, password); if (user2 != null) { if ("N".equals(user2.getEnable())) {// 用户名登陆但没有激活 String emailAddress = EmailLoginAddress .getEmialLoginAddress(email_username); session.setAttribute("email", email_username); session.setAttribute("secret", user2.getSecret()); session.setAttribute("tempname", user2.getUsername()); session.setAttribute("emailAddress", emailAddress); return "unverified"; } else { // 处理自动登录 if (autologin != null) { // 创建两个cookie对象 // 一个cookie记录用户名,另一个记录唯一的验证码 // 并将此验证码写入数据库,以备用户返回时查询(防止伪造cookie) Cookie cookie1 = new Cookie("SESSION_LOGIN_USERNAME", user2 .getUsername()); cookie1.setMaxAge(60*60*24*14);// 设置cookie有效期为2周 cookie1.setPath("/"); cookie1.setDomain(host); response.addCookie(cookie1); String sessionid = session.getId(); Cookie cookie2 = new Cookie("SESSION_ID", sessionid); cookie2.setMaxAge(60 * 60 * 24 * 14); cookie2.setPath("/"); cookie2.setDomain(host); response.addCookie(cookie2); // 在数据库中插入相应记录 UserSession userSession = new UserSession(); userSession.setUsername(user2.getUsername()); userSession.setSessionid(sessionid); userService.addUserSession(userSession); } session.setAttribute("user", user2); return SUCCESS; } } else { this.setHint("failed"); this.setTip("不存在这样的Email或用户名或密码错误"); return INPUT; } } } } } [/code] 奇怪的是,客户端就是不能生成cookie文件,我真的不知道是为什么了,哪位大哥分析一下是什么原因,小弟感激不尽

Struts2中英文切换的问题,提交两次才可以?

中英文切换时为什么提交两次才可以?以下是我的代码 action [code="java"] public class LanguageChangeAction extends ActionSupport { private String languageName; public String getLanguageName() { return languageName; } public void setLanguageName(String languageName) { this.languageName = languageName; } public String execute() throws Exception { HttpSession session = ServletActionContext.getRequest().getSession(); //HttpServletRequest request = ServletActionContext.getRequest(); Locale locale = Locale.getDefault(); System.out.println("languageName"+languageName); if(languageName != null && languageName.equals("en")){ //locale = new Locale("en","US"); locale = Locale.US; }else if(languageName != null && languageName.equals("zh")){ //locale = new Locale("zh","CN"); locale = Locale.CHINA; } session.setAttribute("WW_TRANS_I18N_LOCALE", locale); //request.setAttribute("WW_TRANS_I18N_LOCALE", locale); //ActionContext.getContext().setLocale(locale); return this.SUCCESS; } } [/code] jsp文件 [code="java"] <body> <center> <table> <tr> <td> <a href="changLan.action?languageName=zh">中文登录</a> <a href="changLan.action?languageName=en">English Login</a> </td> <td style="color:red"> ${sessionScope.WW_TRANS_I18N_LOCALE.country } </td> </tr> </table> </center> <s:form action="login" method="post"> <s:textfield name="userName" key="username"></s:textfield> <s:submit key="submit"></s:submit> </s:form> </body> [/code] struts.xml [code="java"] <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <constant name="struts.custom.i18n.resources" value="message"></constant> <package name="login" extends="struts-default"> <action name="changLan" class="com.darren.action.LanguageChangeAction"> <result>/login.jsp</result> </action> <action name="login"> <result>/login_succes.jsp</result> </action> </package> </struts> [/code] 提交两次才可以,result设成redirect后,提交两次也不行,怎么回事? [b]问题补充:[/b] System.out.println("languageName"+languageName); 这个地方打印是正确的吗 我跟踪了,代码执行都正确, [b]问题补充:[/b] 修改浏览器语言设置,显示都正常,国际化资源文件没问题。 [b]问题补充:[/b] if语句代码都正常,我跟踪了也在前台打了出来都正确,session.setAttribute("WW_TRANS_I18N_LOCALE", locale); struts是不是这样设置Locale的,有兴趣我可以把源码发你,我qq:412320107

jsp页面提示The method getValue(String) from the type HttpSession is deprecated,项目运行报空指针。

之前运行项目没错,功能都可以正常打开,项目停了,再打开代码,jsp页面有黄线并提示The method getValue(String) from the type HttpSession is deprecated(第3行) 代码: ``` <%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="GBK"%> <%@ include file="/include/tld.jsp"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> ``` 点击相关功能,控制台报错 ``` 2019-05-17 16:20:03,165 [http-8083-Processor15] ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/BZLXT].[jsp]] - Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at com.core.domain.screen.OptionsList.getOptionLabel(OptionsList.java:37) at com.core.struts.taglib.BaseFormTag.getSelectHtml(BaseFormTag.java:596) at com.core.struts.taglib.BaseFormTag.getActiveHtml(BaseFormTag.java:390) at com.core.struts.taglib.BaseFormTag.getFieldHtml(BaseFormTag.java:295) at com.core.struts.taglib.BaseFormTag.getFormHtml(BaseFormTag.java:207) at com.core.struts.taglib.FormTag.doStartTag(FormTag.java:86) at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspx_meth_dhcc_005fformTag_005f0(CifPersInf_005fList_jsp.java:885) at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspx_meth_s_005fform_005f0(CifPersInf_005fList_jsp.java:820) at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspService(CifPersInf_005fList_jsp.java:459) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:321) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:257) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:659) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:457) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:395) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311) at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:159) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at app.base.interceptor.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:73) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:662) 2019-05-17 16:20:27,381 [http-8083-Processor15] ERROR [com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor] Stacktrace: org.apache.jasper.JasperException: Stacktrace: at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:321) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:257) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:659) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:457) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:395) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311) at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:159) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at app.base.interceptor.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:73) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at com.core.domain.screen.OptionsList.getOptionLabel(OptionsList.java:37) at com.core.struts.taglib.BaseFormTag.getSelectHtml(BaseFormTag.java:596) at com.core.struts.taglib.BaseFormTag.getActiveHtml(BaseFormTag.java:390) at com.core.struts.taglib.BaseFormTag.getFieldHtml(BaseFormTag.java:295) at com.core.struts.taglib.BaseFormTag.getFormHtml(BaseFormTag.java:207) at com.core.struts.taglib.FormTag.doStartTag(FormTag.java:86) at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspx_meth_dhcc_005fformTag_005f0(CifPersInf_005fList_jsp.java:885) at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspx_meth_s_005fform_005f0(CifPersInf_005fList_jsp.java:820) at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspService(CifPersInf_005fList_jsp.java:459) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) ... 76 more org.apache.jasper.JasperException: Stacktrace: at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:321) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:257) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:659) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:457) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:395) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311) at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:159) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at app.base.interceptor.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:73) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at com.core.domain.screen.OptionsList.getOptionLabel(OptionsList.java:37) at com.core.struts.taglib.BaseFormTag.getSelectHtml(BaseFormTag.java:596) at com.core.struts.taglib.BaseFormTag.getActiveHtml(BaseFormTag.java:390) at com.core.struts.taglib.BaseFormTag.getFieldHtml(BaseFormTag.java:295) at com.core.struts.taglib.BaseFormTag.getFormHtml(BaseFormTag.java:207) at com.core.struts.taglib.FormTag.doStartTag(FormTag.java:86) at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspx_meth_dhcc_005fformTag_005f0(CifPersInf_005fList_jsp.java:885) at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspx_meth_s_005fform_005f0(CifPersInf_005fList_jsp.java:820) at org.apache.jsp.creditapp.sys.CifPersInf_005fList_jsp._jspService(CifPersInf_005fList_jsp.java:459) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) ... 76 more 2019-05-17 16:22:32,434 [http-8083-Processor15] ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/BZLXT].[default]] - Servlet.service() for servlet default threw exception java.lang.IllegalStateException at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:405) at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:771) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:506) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:662) ``` 页面显示:<script type="text/javascript" src="">, 其他功能还可以正常使用,项目使用spring,Struts,Ibatis搭建的,求助大佬,感谢!

2019 AI开发者大会

2019 AI开发者大会(AI ProCon 2019)是由中国IT社区CSDN主办的AI技术与产业年度盛会。多年经验淬炼,如今蓄势待发:2019年9月6-7日,大会将有近百位中美顶尖AI专家、知名企业代表以及千余名AI开发者齐聚北京,进行技术解读和产业论证。我们不空谈口号,只谈技术,诚挚邀请AI业内人士一起共铸人工智能新篇章!

实现简单的文件系统

实验内容: 通过对具体的文件存储空间的管理、文件的物理结构、目录结构和文件操作的实现,加深对文件系统内部功能和实现过程的理解。 要求: 1.在内存中开辟一个虚拟磁盘空间作为文件存储器,在其上实现一个简

MIPS单周期CPU-组成原理实验-华中科技大学

使用logisim布线完成的MIPS单周期CPU,可支持28条指令。跑马灯的代码已经装入了寄存器,可以直接开启时钟运行。

2019数学建模A题高压油管的压力控制 省一论文即代码

2019数学建模A题高压油管的压力控制省一完整论文即详细C++和Matlab代码,希望对同学们有所帮助

基于QT和OpenCV的五子棋实现源码

一个简单的五子棋应用,基于QT和OpenCV的实现源码,通过相邻棋子判断是否获胜,不包含人工智能算法,适合新手入门

Git 实用技巧

这几年越来越多的开发团队使用了Git,掌握Git的使用已经越来越重要,已经是一个开发者必备的一项技能;但很多人在刚开始学习Git的时候会遇到很多疑问,比如之前使用过SVN的开发者想不通Git提交代码为什么需要先commit然后再去push,而不是一条命令一次性搞定; 更多的开发者对Git已经入门,不过在遇到一些代码冲突、需要恢复Git代码时候就不知所措,这个时候哪些对 Git掌握得比较好的少数人,就像团队中的神一样,在队友遇到 Git 相关的问题的时候用各种流利的操作来帮助队友于水火。 我去年刚加入新团队,发现一些同事对Git的常规操作没太大问题,但对Git的理解还是比较生疏,比如说分支和分支之间的关联关系、合并代码时候的冲突解决、提交代码前未拉取新代码导致冲突问题的处理等,我在协助处理这些问题的时候也记录各种问题的解决办法,希望整理后通过教程帮助到更多对Git操作进阶的开发者。 本期教程学习方法分为“掌握基础——稳步进阶——熟悉协作”三个层次。从掌握基础的 Git的推送和拉取开始,以案例进行演示,分析每一个步骤的操作方式和原理,从理解Git 工具的操作到学会代码存储结构、演示不同场景下Git遇到问题的不同处理方案。循序渐进让同学们掌握Git工具在团队协作中的整体协作流程。 在教程中会通过大量案例进行分析,案例会模拟在工作中遇到的问题,从最基础的代码提交和拉取、代码冲突解决、代码仓库的数据维护、Git服务端搭建等。为了让同学们容易理解,对Git简单易懂,文章中详细记录了详细的操作步骤,提供大量演示截图和解析。在教程的最后部分,会从提升团队整体效率的角度对Git工具进行讲解,包括规范操作、Gitlab的搭建、钩子事件的应用等。 为了让同学们可以利用碎片化时间来灵活学习,在教程文章中大程度降低了上下文的依赖,让大家可以在工作之余进行学习与实战,并同时掌握里面涉及的Git不常见操作的相关知识,理解Git工具在工作遇到的问题解决思路和方法,相信一定会对大家的前端技能进阶大有帮助。

实用主义学Python(小白也容易上手的Python实用案例)

原价169,限时立减100元! 系统掌握Python核心语法16点,轻松应对工作中80%以上的Python使用场景! 69元=72讲+源码+社群答疑+讲师社群分享会&nbsp; 【哪些人适合学习这门课程?】 1)大学生,平时只学习了Python理论,并未接触Python实战问题; 2)对Python实用技能掌握薄弱的人,自动化、爬虫、数据分析能让你快速提高工作效率; 3)想学习新技术,如:人工智能、机器学习、深度学习等,这门课程是你的必修课程; 4)想修炼更好的编程内功,优秀的工程师肯定不能只会一门语言,Python语言功能强大、使用高效、简单易学。 【超实用技能】 从零开始 自动生成工作周报 职场升级 豆瓣电影数据爬取 实用案例 奥运冠军数据分析 自动化办公:通过Python自动化分析Excel数据并自动操作Word文档,最终获得一份基于Excel表格的数据分析报告。 豆瓣电影爬虫:通过Python自动爬取豆瓣电影信息并将电影图片保存到本地。 奥运会数据分析实战 简介:通过Python分析120年间奥运会的数据,从不同角度入手分析,从而得出一些有趣的结论。 【超人气老师】 二两 中国人工智能协会高级会员 生成对抗神经网络研究者 《深入浅出生成对抗网络:原理剖析与TensorFlow实现》一书作者 阿里云大学云学院导师 前大型游戏公司后端工程师 【超丰富实用案例】 0)图片背景去除案例 1)自动生成工作周报案例 2)豆瓣电影数据爬取案例 3)奥运会数据分析案例 4)自动处理邮件案例 5)github信息爬取/更新提醒案例 6)B站百大UP信息爬取与分析案例 7)构建自己的论文网站案例

深度学习原理+项目实战+算法详解+主流框架(套餐)

深度学习系列课程从深度学习基础知识点开始讲解一步步进入神经网络的世界再到卷积和递归神经网络,详解各大经典网络架构。实战部分选择当下最火爆深度学习框架PyTorch与Tensorflow/Keras,全程实战演示框架核心使用与建模方法。项目实战部分选择计算机视觉与自然语言处理领域经典项目,从零开始详解算法原理,debug模式逐行代码解读。适合准备就业和转行的同学们加入学习! 建议按照下列课程顺序来进行学习 (1)掌握深度学习必备经典网络架构 (2)深度框架实战方法 (3)计算机视觉与自然语言处理项目实战。(按照课程排列顺序即可)

C/C++跨平台研发从基础到高阶实战系列套餐

一 专题从基础的C语言核心到c++ 和stl完成基础强化; 二 再到数据结构,设计模式完成专业计算机技能强化; 三 通过跨平台网络编程,linux编程,qt界面编程,mfc编程,windows编程,c++与lua联合编程来完成应用强化 四 最后通过基于ffmpeg的音视频播放器,直播推流,屏幕录像,

三个项目玩转深度学习(附1G源码)

从事大数据与人工智能开发与实践约十年,钱老师亲自见证了大数据行业的发展与人工智能的从冷到热。事实证明,计算机技术的发展,算力突破,海量数据,机器人技术等,开启了第四次工业革命的序章。深度学习图像分类一直是人工智能的经典任务,是智慧零售、安防、无人驾驶等机器视觉应用领域的核心技术之一,掌握图像分类技术是机器视觉学习的重中之重。针对现有线上学习的特点与实际需求,我们开发了人工智能案例实战系列课程。打造:以项目案例实践为驱动的课程学习方式,覆盖了智能零售,智慧交通等常见领域,通过基础学习、项目案例实践、社群答疑,三维立体的方式,打造最好的学习效果。

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

Python界面版学生管理系统

前不久上传了一个控制台版本的学生管理系统,这个是Python界面版学生管理系统,这个是使用pycharm开发的一个有界面的学生管理系统,基本的增删改查,里面又演示视频和完整代码,有需要的伙伴可以自行下

Vue.js 2.0之全家桶系列视频课程

基于新的Vue.js 2.3版本, 目前新全的Vue.js教学视频,让你少走弯路,直达技术前沿! 1. 包含Vue.js全家桶(vue.js、vue-router、axios、vuex、vue-cli、webpack、ElementUI等) 2. 采用笔记+代码案例的形式讲解,通俗易懂

linux“开发工具三剑客”速成攻略

工欲善其事,必先利其器。Vim+Git+Makefile是Linux环境下嵌入式开发常用的工具。本专题主要面向初次接触Linux的新手,熟练掌握工作中常用的工具,在以后的学习和工作中提高效率。

JAVA初级工程师面试36问(完结)

第三十一问: 说一下线程中sleep()和wait()区别? 1 . sleep()是让正在执行的线程主动让出CPU,当时间到了,在回到自己的线程让程序运行。但是它并没有释放同步资源锁只是让出。 2.wait()是让当前线程暂时退让出同步资源锁,让其他线程来获取到这个同步资源在调用notify()方法,才会让其解除wait状态,再次参与抢资源。 3. sleep()方法可以在任何地方使用,而wait()只能在同步方法或同步块使用。 ...

java jdk 8 帮助文档 中文 文档 chm 谷歌翻译

JDK1.8 API 中文谷歌翻译版 java帮助文档 JDK API java 帮助文档 谷歌翻译 JDK1.8 API 中文 谷歌翻译版 java帮助文档 Java最新帮助文档 本帮助文档是使用谷

我以为我对Mysql事务很熟,直到我遇到了阿里面试官

太惨了,面试又被吊打

智鼎(附答案).zip

并不是完整题库,但是有智鼎在线2019年9、10、11三个月的试题,有十七套以上题目,普通的网申行测题足以对付,可以在做题时自己总结一些规律,都不是很难

Visual Assist X 破解补丁

vs a's'sixt插件 支持vs2008-vs2019 亲测可以破解,希望可以帮助到大家

150讲轻松搞定Python网络爬虫

【为什么学爬虫?】 &nbsp; &nbsp; &nbsp; &nbsp;1、爬虫入手容易,但是深入较难,如何写出高效率的爬虫,如何写出灵活性高可扩展的爬虫都是一项技术活。另外在爬虫过程中,经常容易遇到被反爬虫,比如字体反爬、IP识别、验证码等,如何层层攻克难点拿到想要的数据,这门课程,你都能学到! &nbsp; &nbsp; &nbsp; &nbsp;2、如果是作为一个其他行业的开发者,比如app开发,web开发,学习爬虫能让你加强对技术的认知,能够开发出更加安全的软件和网站 【课程设计】 一个完整的爬虫程序,无论大小,总体来说可以分成三个步骤,分别是: 网络请求:模拟浏览器的行为从网上抓取数据。 数据解析:将请求下来的数据进行过滤,提取我们想要的数据。 数据存储:将提取到的数据存储到硬盘或者内存中。比如用mysql数据库或者redis等。 那么本课程也是按照这几个步骤循序渐进的进行讲解,带领学生完整的掌握每个步骤的技术。另外,因为爬虫的多样性,在爬取的过程中可能会发生被反爬、效率低下等。因此我们又增加了两个章节用来提高爬虫程序的灵活性,分别是: 爬虫进阶:包括IP代理,多线程爬虫,图形验证码识别、JS加密解密、动态网页爬虫、字体反爬识别等。 Scrapy和分布式爬虫:Scrapy框架、Scrapy-redis组件、分布式爬虫等。 通过爬虫进阶的知识点我们能应付大量的反爬网站,而Scrapy框架作为一个专业的爬虫框架,使用他可以快速提高我们编写爬虫程序的效率和速度。另外如果一台机器不能满足你的需求,我们可以用分布式爬虫让多台机器帮助你快速爬取数据。 &nbsp; 从基础爬虫到商业化应用爬虫,本套课程满足您的所有需求! 【课程服务】 专属付费社群+每周三讨论会+1v1答疑

JavaWEB商城项目(包括数据库)

功能描述:包括用户的登录注册,以及个人资料的修改.商品的分类展示,详情,加入购物车,生成订单,到银行支付等!另外还有收货地址的和我的收藏等常用操作.环境(JDK 1.7 ,mysql 5.5,Ecli

Python数据挖掘简易入门

&nbsp; &nbsp; &nbsp; &nbsp; 本课程为Python数据挖掘方向的入门课程,课程主要以真实数据为基础,详细介绍数据挖掘入门的流程和使用Python实现pandas与numpy在数据挖掘方向的运用,并深入学习如何运用scikit-learn调用常用的数据挖掘算法解决数据挖掘问题,为进一步深入学习数据挖掘打下扎实的基础。

一学即懂的计算机视觉(第一季)

图像处理和计算机视觉的课程大家已经看过很多,但总有“听不透”,“用不了”的感觉。课程致力于创建人人都能听的懂的计算机视觉,通过生动、细腻的讲解配合实战演练,让学生真正学懂、用会。 【超实用课程内容】 课程内容分为三篇,包括视觉系统构成,图像处理基础,特征提取与描述,运动跟踪,位姿估计,三维重构等内容。课程理论与实战结合,注重教学内容的可视化和工程实践,为人工智能视觉研发及算法工程师等相关高薪职位就业打下坚实基础。 【课程如何观看?】 PC端:https://edu.csdn.net/course/detail/26281 移动端:CSDN 学院APP(注意不是CSDN APP哦) 本课程为录播课,课程2年有效观看时长,但是大家可以抓紧时间学习后一起讨论哦~ 【学员专享增值服务】 源码开放 课件、课程案例代码完全开放给你,你可以根据所学知识,自行修改、优化 下载方式:电脑登录https://edu.csdn.net/course/detail/26281,点击右下方课程资料、代码、课件等打包下载

软件测试2小时入门

本课程内容系统、全面、简洁、通俗易懂,通过2个多小时的介绍,让大家对软件测试有个系统的理解和认识,具备基本的软件测试理论基础。 主要内容分为5个部分: 1 软件测试概述,了解测试是什么、测试的对象、原则、流程、方法、模型;&nbsp; 2.常用的黑盒测试用例设计方法及示例演示;&nbsp; 3 常用白盒测试用例设计方法及示例演示;&nbsp; 4.自动化测试优缺点、使用范围及示例‘;&nbsp; 5.测试经验谈。

初级玩转Linux+Ubuntu(嵌入式开发基础课程)

课程主要面向嵌入式Linux初学者、工程师、学生 主要从一下几方面进行讲解: 1.linux学习路线、基本命令、高级命令 2.shell、vi及vim入门讲解 3.软件安装下载、NFS、Samba、FTP等服务器配置及使用

2019 Python开发者日-培训

本次活动将秉承“只讲技术,拒绝空谈”的理念,邀请十余位身处一线的Python技术专家,重点围绕Web开发、自动化运维、数据分析、人工智能等技术模块,分享真实生产环境中使用Python应对IT挑战的真知灼见。此外,针对不同层次的开发者,大会还安排了深度培训实操环节,为开发者们带来更多深度实战的机会。

快速入门Android开发 视频 教程 android studio

这是一门快速入门Android开发课程,顾名思义是让大家能快速入门Android开发。 学完能让你学会如下知识点: Android的发展历程 搭建Java开发环境 搭建Android开发环境 Android Studio基础使用方法 Android Studio创建项目 项目运行到模拟器 项目运行到真实手机 Android中常用控件 排查开发中的错误 Android中请求网络 常用Android开发命令 快速入门Gradle构建系统 项目实战:看美图 常用Android Studio使用技巧 项目签名打包 如何上架市场

机器学习初学者必会的案例精讲

通过六个实际的编码项目,带领同学入门人工智能。这些项目涉及机器学习(回归,分类,聚类),深度学习(神经网络),底层数学算法,Weka数据挖掘,利用Git开源项目实战等。

4小时玩转微信小程序——基础入门与微信支付实战

这是一个门针对零基础学员学习微信小程序开发的视频教学课程。课程采用腾讯官方文档作为教程的唯一技术资料来源。杜绝网络上质量良莠不齐的资料给学员学习带来的障碍。 视频课程按照开发工具的下载、安装、使用、程序结构、视图层、逻辑层、微信小程序等几个部分组织课程,详细讲解整个小程序的开发过程

相关热词 c#分级显示数据 c# 不区分大小写替换 c#中调用就java c#正则表达式 验证小数 c# vscode 配置 c#三维数组能存多少数据 c# 新建excel c#多个文本框 c#怎么创建tcp通讯 c# mvc 电子病例
立即提问