Skip to content

Sof01/Sof01.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

Sof01.github.io

github domain name for whatever purpose I may find for it in the future.

https://www.server-world.info/en/note?os=Debian_12&p=java&f=2

from Tomcat 10, migrated to Jakarta EE

so it needs to replace [javax.] to [jakarta.]

import java.io.; import jakarta.servlet.; import jakarta.servlet.http.*; import java.util.Calendar;

public class daytime extends HttpServlet { public void doGet(HttpServletRequest request ,HttpServletResponse response)

throws IOException, ServletException{
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    Calendar cal = Calendar.getInstance();
    out.println("<html>\n<head>\n<title>DayTime</title>\n</head>\n<body>");
    out.println("<div style=\"font-size: 40px; text-align: center; font-weight: bold\">");
    out.println(cal.get(Calendar.YEAR) + "/" + (cal.get(Calendar.MONTH) + 1) + "/" + 
    cal.get(Calendar.DATE) + " " + cal.get(Calendar.HOUR_OF_DAY) + ":" + cal.get(Calendar.MINUTE));
    out.println("</div>\n</body>\n</html>");
}

}

About

github domain name for whatever purpose I may find for it in the future.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors