- 浏览: 5099 次
- 来自: ...
-
最近访客 更多访客>>
最新评论
-
sunbird69:
cool ~~~
jsp web上传zip文件的处理 -
sunbird69:
cool~~~
sitemesh简单应用
文章列表
最近项目有一模块上处理上传ZIP文件,总结一下处理方法
File[] files=null;
try {
MultiPartRequestWrapper mpRequest =(MultiPartRequestWrapper)request; //struts2:对REQUEST进行转换,用于得到上传文件
HttpSession session=request.getSession();
files = mpRequest.getFiles("upload");
String[] fileNames ...
- 2008-08-08 16:47
- 浏览 2815
- 评论(1)
如下:
package com.pattern.decoretor.yzb;
public interface IDog {
void move();
}
这个狗开始只会走路.这样一来呢.我的GW也就只会走路了, 哎,看下面就知道了.
package com.pattern.decoretor.yzb;
public class MyDog implements IDog{
public void move() {
System.out.println("MyDog can move");//GW
}
}
package co ...
web开发当中,前端的页面逻辑很难被重用,当我们在每一个页面中用include来复用公共的header, css, js,footer时,会大量的出现重复的代码,无形中增加的开发人员的负担.sitemesh通过filter截取request和response,并给原始的页面加入一定的装饰(可能为header,footer...),然后把结果返回给客户端,并且被装饰的原始页面并不知道sitemesh的装饰,这也就达到了脱耦的目的。
SiteMesh 是opensymphony项目,下是官网中的介绍:
SiteMesh is a web-page layout and decoration fram ...