Guest User

Untitled

a guest
Jun 14th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  2. pageEncoding="ISO-8859-1"%>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  4. <html>
  5. <body>
  6. <%
  7. String username = request.getParameter("username");
  8. String password = request.getParameter("password");
  9. String colors[] = request.getParameterValues("color");
  10. %>
  11.  
  12. <%= "Welcome ,"+username %>
  13. <br/>
  14. <%
  15. if(username.equals("hello"))
  16. {
  17. response.setContentType("text/plain");
  18. response.sendRedirect("incorrect.html");
  19. }
  20. else
  21. {
  22. //code by which I retrieved the role information about this user
  23. String role = "ADMIN_MAYBANK";
  24. RequestDispatcher rd = request.getRequestDispatcher("Home.jsp");
  25. rd.forward(request, response);
  26. }
  27. for(int i=0;i<colors.length;i++)
  28. {
  29. out.println("<br/><font color="+colors[i]+">Your name is : :"+username);
  30. }
  31. %>
  32. </body>
  33. </html>
Add Comment
Please, Sign In to add comment