首页 新闻 会员 周边

这个路径是正确的么?

0
[已关闭问题] 关闭于 2016-11-25 09:53

这个路径生成的文件是在这个路径里么?

@Action(value="makeHtml")
public String makeHtml(){
Map <String,Object>map = new HashMap<String,Object>();
CreateHtml createHtml=new CreateHtml();
String ftl = "article.html";
String relaPath = "Article/";
int count=0;
try {
for (Integer id:ids)
{
String htmlName = id+".html";
Article entity=entityService.find(id);
if(entity!=null&&entity.getCheckState()==CheckState.pass){
map.put("entity",entity);
createHtml.init(ftl, htmlName, map, relaPath);
count++;
}
}
Struts2Utils.setAttribute("message","已在"+relaPath+"目录生成个"+count+"个html文件");
return "succ";
} catch (IOException e) {
e.printStackTrace();
} catch (TemplateException e) {
e.printStackTrace();
}
return ERROR;
}

谁说不可以重名的主页 谁说不可以重名 | 初学一级 | 园豆:15
提问于:2016-08-15 13:52
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册