Java Printwriter and css Issue

Viewed 82

I hava a java dynamic web project and I want to use PrintWriter with CSS. Text.ccs file location is in L/css. Please help me, thank you.

   String myCurrentDir = System.getProperty("user.dir");
  
        PrintWriter writer = new PrintWriter(out);
        writer.println("<HTML>");       
        writer.println("<HEAD>");
        writer.println("<title>Report Foot</title>");
        writer.println("<link rel=\"stylesheet\" type=\"text/css\" href=\""+myCurrentDir+"/L/css/Test.css\">");
        writer.println("</HEAD>");
        writer.println("<body class = 'footer'>");
        writer.println("<B>");
        writer.println("myCurrentDir" +myCurrentDir);
        writer.println("<BR/>");
        writer.println("<BR/>");
        writer.close();
        writer.println("@ABC DEF XYZ");
        writer.println("</body>");
        writer.println("</HTML>");
        writer.close();
        System.out.println("Footer Written");
0 Answers
Related