Search
 
SCRIPT & CODE EXAMPLE
 

HTML

Write html into file using Java dynamically

import java.awt.Desktop;
import java.io.*;

class ShowGeneratedHtml {

    public static void main(String[] args) throws Exception {
        File f = new File("source.htm");
        BufferedWriter bw = new BufferedWriter(new FileWriter(f));
        bw.write("<html><body><h1>Blah, Blah!</h1>");
        bw.write("<textarea cols=75 rows=10>");
        for (int ii=0; ii<20; ii++) {
            bw.write("Blah blah..");
        }
        bw.write("</textarea>");
        bw.write("</body></html>");
        bw.close();

        Desktop.getDesktop().browse(f.toURI());
    }
}
Comment

PREVIOUS NEXT
Code Example
Html :: bootstrap accordion snippet 
Html :: capture image 
Html :: twig first last element 
Html :: vertical tabs bootstrap 
Html :: how to use Video tags 
Html :: add ruby title html erb icon 
Html :: html table column filter dropdown 
Html :: how to work on portfolio in html and css 
Html :: bootstrap tables 
Html :: handlebar js basic example 
Html :: table columns html 
Html :: bootstrap input tagsinput 
Html :: make bootstrap div not wrap html 
Html :: examples of metadata 
Html :: floating modal bootstrap 
Html :: starter bootstrap 
Html :: html tag remover 
Html :: tags semanticas 
Html :: mark tag in html 
Html :: multilevel list html 
Html :: strong and bold difference in html 
Html :: animate text 
Html :: how to write h1 tag in html 
Html :: bootstrap 5 growing spinner 
Html :: python remove html from a list item 
Html :: document.getElementByClassName("preview").innerHTML=src; 
Html :: cdn 
Html :: theme my login/logout shortcode 
Html :: internal phone input 
Html :: nativescript scrollview full height 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =