不知道你是什么意思?是不是像新闻管理软件一样生成具体的html页?
参考以下代码:
import java.io.*;public class filetype {
public static void main(String args[]){
try{
String aa; //File file=new File();
    //file.mkdirs();
    aa="D:/java/WEB-INF/src/file/aa/";
    (new File(aa)).mkdirs();
    String bb=aa+"/"+"abcd.txt";
FileOutputStream out=new FileOutputStream(bb);
PrintStream p=new PrintStream(out);
p.println("hello wordsdfsdffffffffffffffffffffffff!!");
p.close();
}catch(Exception e){
System.out.println(e);}
}}
改一下就能满足你要求了

解决方案 »

  1.   

    是的,
    不知道大家有没有用过php 的template类jsp中有吗?
      

  2.   

    php不了解
    可以说一下具体的
      

  3.   

    先把模析文件(html code)存在静态页里,使用jsp读入内存,
    然后对tag进行替换,最后写到一个文件里
      

  4.   

    那很简单啊,你首先做一个html模版,在你想加入新闻的地方做上标记,例如
    NEW_DATA  表示新闻内容
    然后用replaceAll("NEW_DATA","你的字新闻内容");
    就可以了,具体实现方法,你自己想一想吧,很容易的
      

  5.   

    php Templates 我用过,很棒的。
    最早以前我使用 asp(fso) 生成html .
    url:http://www.andyfans.com/chinese/news/ (html)
    url:http://www.andyfans.com/97741/news/ (xml)后来我 用 php Templates
    url:http://cheung.cxc.cc/Article/用 Java生成 HTML File太容易了 。
    我的一篇原创文章,当然了,写得很简单,就是个模型而已了。
    http://cheung.cxc.cc/Article/showArticle.phtml?id=42
      

  6.   

    跟aleccheung大xia说的思路一样;有没有更强的,有的话就有福了