- 博客(9)
- 收藏
- 关注
转载 AOP(面向切面编程)初识Demo
刚学习了AOP的前值增强和后置增强,个人感觉就是在调用一些方法前,或调用一些方法后绑定一个方法,让这些方法被调用之前或者调用结束后执行这个方法。例子:MyAdvice类:存放调用service方法前或后需要执行的方法:public class MyAdvice { /* * * @param jp 表示一个方法调用 *...
2019-05-06 01:16:00
118
转载 Struts2 获取Request、Response的四种方法(摘抄)
摘抄自:https://blog.csdn.net/alan_liuyue/article/details/71123416 只为自己方便记忆!方法(1):使用Struts2 Aware拦截器(耦合):public class MyAction extends ActionSupport implements ServletResponseAware { ...
2019-05-04 23:03:00
164
转载 Struts2 Ajax Jquery 验证用户名
JS:<script type="text/javascript" src="<%=basePath%>js/jquery.js"></script><script type="text/javascript"> $(document).ready( function(){ $("#...
2019-05-04 21:01:00
96
转载 Struts2 Ajax验证用户名
Action: private String uname; private String upwd; @Override public String execute() throws Exception { HttpServletResponse response = ServletActionContext.getRes...
2019-05-04 04:33:00
92
转载 Struts拦截器登录权限验证(自用)
LoginAction:自定义拦截器代码:struts.xml 配置拦截器:转载于:https://www.cnblogs.com/MonkeyJava/p/10807392.html
2019-05-04 02:55:00
148
转载 Struts2 文件下载
JSP界面:需要给文件的fileName属性传值Action:Action中 需要给出fileName(文件名)和InputStream(读入流)两个属性,红线为is的get方法,无需set方法。之后struts.xml文件中会调用is的get方法获取返回的读入流,默认的execute()方法只需返回SUCCESS即可。struts.xml:...
2019-05-04 01:45:00
77
转载 Struts2 文件上传
JSP界面:必须把表单的enctype属性改为 multipart/form-data才能上传Action:程序如果多人使用,必须保证文件名是唯一,文件名相同会覆盖掉原来的文件,所以使用时间作为文件名。可以把生成的文件名直接存入数据库中,就可找到文件。Struts.xml:通过Struts自带的fileUpload拦截器控制上传文件的类型和最大...
2019-05-03 23:42:00
69
转载 IO流 文件读写
了解:I/O流:字节流(文件拷贝):InputStream - FileInputStream - BufferedInputStream (字节输入流 读) OutputStream - FileOutputStream - BufferedOutputStream...
2019-05-03 22:03:00
200
转载 Struts2 struts.xml配置自定义拦截器
<!-- 声明拦截器 --> <interceptors> <interceptor name="time" class="com.lwq.interceptor.TimeIntercepter"></interceptor> <interceptor name="demo1" c...
2019-05-03 18:13:00
228
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人