Advertisement
Guest User

Untitled

a guest
May 21st, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. package Login;
  2.  
  3. import java.io.*;
  4. import javax.servlet.*;
  5. import javax.servlet.http.*;
  6.  
  7. public class LoginApp extends HttpServlet {
  8.  
  9. String message = "asdasd";
  10.  
  11.  
  12. public void doGet(HttpServletRequest request, HttpServletResponse response)
  13. throws ServletException, IOException {
  14.  
  15. response.setContentType("text/html");
  16.  
  17. PrintWriter out = response.getWriter();
  18. /* String title = "Cook Book";
  19. String docType =
  20. "<!doctype html public \"-//w3c//dtd html 4.0 " + "transitional//en\">\n";
  21.  
  22. out.println(docType +
  23. "<html>\n" +
  24. "<head><title>" + title + "</title></head>\n" +
  25. "<body bgcolor = \"#f0f0f0\">\n" +
  26. "<h1 align = \"center\">" + title + "</h1>\n" +
  27. "<ul>\n" +
  28. " <li><b>Maths Flag : </b>: "
  29. + request.getParameter("maths") + "\n" +
  30. " <li><b>Physics Flag: </b>: "
  31. + request.getParameter("physics") + "\n" +
  32. " <li><b>Chemistry Flag: </b>: "
  33. + request.getParameter("chemistry") + "\n" +
  34. "</ul>\n" +
  35. "</body>"+
  36. "</html>"
  37. );*/
  38. }
  39.  
  40. public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
  41.  
  42. }
  43.  
  44. public void destroy() {
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement