Question
Write a program to show the functionality of servlets.

Answers

- The servlets is being written like a normal application. The program is as follows:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*:
public class HelloWWW extends HttpServlet
{
   public void doGet(HttpServletRequest request, HttpServletResponse response)
   throws ServletException, IOException   {       response.setContentType("text/html");       PrintWriter out = response.getWriter();
       String docType =
       "
";
       out.println(docType + "
" + "Hello WWW
" + "
" +
"

Hello       
WWW


" + "");
   }}
- This is the format of the servlet which is included in the JSP with the HTML tags and the output is being shown on the screen.   Your Comment




More Software,Java Questions..
What is the inputsplit in map reduce software?

Can variables be used in Java without initialization?

What is the difference between java bean and enterprise java bean?

What is software configuration management?

How does the java database connectivity (jdbc) work?

What are the advantages of threads in java?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

What is object cloning in Java?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?



Search
Can you Answer!!
  • Q What http status code 204 states?
  • Q In which year the battle of HaldiGhati was fought?
  • Q How do you prevent oracle from giving you informational messages during and after a
  • Q All atoms with 6 protons in their nuclei are atoms of the chemical element carbon, and all atoms with 92 protons in their nuclei are atoms of the element:
  • Q Why are temperatures rising more in polar regions than in tropical regions?
  • Q Can you use someone else's style sheet without permission?
  • Q Who is eligible to participate in the public beta?
  • Q Pierre Boulez, Ferenc Fricsay, Valery Gergiev, Kurt Masur, Dmitri Mitropoulos, Leopold Stokowski are noted for being famous what, who generally did not use what now common tool of their profession?
  • Q How do you declare constant values in java
  • Q Discuss what test metrics you feel are important to publish an organization?
  • Q Can you increase the size of a tablespace ? how ?