2007/05/24(木)Java

2015/07/19 07:06 Hello World

Java

public class HelloWorld{
  public static void main(String args[]){
   System.out.print("Hello World!");
  }
}

Servlet

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class HelloWorld extends HttpServlet{
  public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws IOException, ServletException{
    
    out.print("HelloWorld!");
  }
}

JSP

<html>
  <head>
    <title>HelloWorld!</title>
  </head>
  <body>
    <%="HelloWorld!" %>
  </body>
</html>