<input type=text name=file>
<input type=text name=content>这么把content内容生成file.html文件??

解决方案 »

  1.   

    是要显示为html还是保存为html
      

  2.   

    保存为一个以file名字命名的html文件file=aaa    aaa.html
      

  3.   

    String sFile = "\\qwe\\ind1ex.htm";  \\路径文件名
      File f = new File(sFile);  FileWriter fw;
            try
            {
                fw = new FileWriter(sFile);
                fw.write("前台页面得到的内容");            fw.close();
            }
            catch (IOException e)
            {
              e.printStackTrace();
            }
      

  4.   

    前台页面得到的内容??  content?
      

  5.   

    不就是得到filename
    new File(filename + ".html")
    然后File.write(content)不就行了
    记得里面有一些html的特殊字符自己转化以下,比方说<>,转化为&lt;&gt;等等的
      

  6.   

    这些文本框的值都可以用request对象或者是javabean得到
      

  7.   

    String sFile = "\\qwe\\ind1ex.htm";  \\路径文件名生成的html文件是保存到服务器上的  运行结果是路径找不到!!!!  这么把文件保存到服务器的指定路径上??    谢谢朋友们的帮助  完了就结帖!!!