String[] compileuris = new String[]{"../webapps/xxx/include/newCom.jsp","../webapps/xxx/include/newNews.jsp","../webapps/xxx/include/recomTele.jsp","../webapps/xxx/include/hotPlay.jsp"};
for(int i = 0; i < sourceuris.length; i++){
url = sourceuris[i];
name = compileuris[i];// 这是生成的html文件名,如index.html.
RequestDispatcher rd = request.getRequestDispatcher(url);
final ByteArrayOutputStream os = new ByteArrayOutputStream();
final ServletOutputStream stream = new ServletOutputStream() {
public void write(byte[] data, int offset, int length) {
os.write(data, offset, length);
}
public void write(int b) throws IOException {
os.write(b);
}
};
final PrintWriter pw = new PrintWriter(new OutputStreamWriter(os,
Charset.forName("utf-8")));
HttpServletResponse rep = new HttpServletResponseWrapper(response) {
public ServletOutputStream getOutputStream() {
return stream;
}