Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <body>
- <%
- String username = request.getParameter("username");
- String password = request.getParameter("password");
- String colors[] = request.getParameterValues("color");
- %>
- <%= "Welcome ,"+username %>
- <br/>
- <%
- if(username.equals("hello"))
- {
- response.setContentType("text/plain");
- response.sendRedirect("incorrect.html");
- }
- else
- {
- //code by which I retrieved the role information about this user
- String role = "ADMIN_MAYBANK";
- RequestDispatcher rd = request.getRequestDispatcher("Home.jsp");
- rd.forward(request, response);
- }
- for(int i=0;i<colors.length;i++)
- {
- out.println("<br/><font color="+colors[i]+">Your name is : :"+username);
- }
- %>
- </body>
- </html>
Add Comment
Please, Sign In to add comment