在web开发中,Struts2中我们常需要将一些参数传到action中去处理,为了避免在action 用request.getParameter("..")方法,可以在action中声明属性,如private ResultPage page; get()/set()方法;
在页面写上<a href="toIcoPerson.action.page.currentPage="currentpage>当前页</a>
这样直接跟action中的属性=?,相当于给属性的set()方法赋值了。
获取类加载器绝对路径:ImageUtil.class.getProtectionDomain().getCodeSource().getLocation().getPath();