现有一JSP页面,需要让浏览器访问的时候生成HTML页面来显示
求具体操作原理或解决办法!
谢谢

解决方案 »

  1.   


    package ball.news;import java.io.*;public class WriteHtml
    {    public WriteHtml()
        {
        }    public static void save(String s, String s1, String s2)
            
        {
            try
            {
                a(s1);
                FileOutputStream fileoutputstream = new FileOutputStream(s1 + s2);
                byte abyte0[] = s.getBytes();
                fileoutputstream.write(abyte0);
                fileoutputstream.close();
            }
            catch(IOException e)
            {
             System.out.println("write html error"+e.getMessage());
            }
        }    private static void a(String s)
        {
           try
           {
            File file = new File(s);
            if(!file.exists())
                file.mkdirs();
           }
           catch (Exception e)
           {
            System.out.println("mkdirs error!"+e.getMessage());
           }
        }
    }找到段代码不知道咋用~~
      

  2.   

    String s    好像是完整的提交过来的html代码
    String s1   好像是 保存路径
    String s2   好像是保存的文件名
      

  3.   

    window.location="view-source:"+resourceURL;