fork download
  1. /* package whatever; // don't place package name! */
  2. <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  3. pageEncoding="ISO-8859-1"%>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://w...content-available-to-author-only...3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  8. <title>Insert title here</title>
  9. </head>
  10. <body>
  11. <%
  12. // get client locale
  13. java.util.Locale locale = request.getLocale();
  14.  
  15. // get Dateformat for client's locale
  16. java.text.DateFormat dateFormat =
  17. java.text.DateFormat.getDateTimeInstance(
  18. java.text.DateFormat.LONG,
  19. java.text.DateFormat.LONG, locale);
  20.  
  21. %>
  22.  
  23. <%=dateFormat.format( new java.util.Date() ) %>
  24. </body>
  25. </html>
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:2: error: class, interface, or enum expected
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
^
Main.java:2: error: class, interface, or enum expected
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         ^
Main.java:16: error: class, interface, or enum expected
  java.text.DateFormat dateFormat =
  ^
Main.java:21: error: class, interface, or enum expected
%>
^
4 errors
stdout
Standard output is empty