Logo 
Search:

Java Articles

Submit Article
Home » Articles » Java » Remote Method InvocationRSS Feeds

RMI servlet program to display message

Posted By: Milind Mishra     Category: Java     Views: 7765

RMI servlet program to display message.

Code for RMI servlet program to display message in Java

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

publicclass HelloWorldServlet extends HttpServlet {

    publicvoid doGet(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException
    {
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
        out.println("<html>");
        out.println("<body>");
        out.println("<head>");
        out.println("<title>Hello World!</title>");
        out.println("</head>");
        out.println("<body>");
        out.println("<h1>Hello World!</h1>");
        out.println("</body>");
        out.println("</html>");
    }
}
  
Share: 


Didn't find what you were looking for? Find more on RMI servlet program to display message Or get search suggestion and latest updates.

Milind Mishra
Milind Mishra author of RMI servlet program to display message is from India.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!