<%@ 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">
<!-- jsp directives code-->
<%@ page import="java.lang.Math.*"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<form method ="POST" action ="index1.jsp">
Enter username:
<input name="username" />
Enter password:
<input name="password" />
<button type="submit">login</button>
</form>
<%
String username = request.getParameter("username");
String password = request.getParameter("password");
if(username == null)
{
out.print("error_01");
}
else if (password == null)
{
out.print("error_02");
}
else
{
no errors... set session ...
}
%>
</body>
</html>
*** Edit ***
Please use code tags when posting code
This post has been edited by GunnerInc: 17 February 2013 - 01:39 PM
Reason for edit:: Added elusive code tags

New Topic/Question
Reply


MultiQuote


|