Академический Документы
Профессиональный Документы
Культура Документы
Part of codlings
LOGIN.JSP
<%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Login Page</title> </head> <body> <title>Login Page</title> <div id="header"> <div id="title"> <br> <h1 class="style1">Arts ForEver</h1> </div> <img src="bg/front.jpg" width="760" height="275" alt="front"/> </div> <script language="JavaScript1.2"> <!-- Begin var months=new Array(13); months[1]="January"; months[2]="February"; months[3]="March"; months[4]="April"; months[5]="May"; months[6]="June"; months[7]="July"; months[8]="August"; months[9]="September"; months[10]="October"; months[11]="November"; months[12]="December"; var time=new Date(); var lmonth=months[time.getMonth() + 1]; var date=time.getDate(); var year=time.getYear(); if (year < 2000) // Y2K Fix, Isaac Powell year = year + 1900; // http://onyx.idbsu.edu/~ipowell document.write("<right>" + lmonth + " "); document.write(date + ", " + year + "</right>"); // End --> </script>
1|Page
size="15"
<form method="post" action=" http://localhost:8084/Shopping_Cart/Contactus.jsp"> <td><input type="Submit" value="CONTACT US" name="" /></td> </form></tr>
</table> </body>
</html>
2|Page
3|Page
<form method="post" action="http://localhost:8084/Shopping_Cart/Payment.jsp" > <tr> <br><br><br><br><br><br><td><input type="submit" here Payment.." ></td> </tr> </form>
value="Click
4|Page
package PK1; import import import import import import import import import java.io.IOException; java.io.PrintWriter; javax.servlet.ServletException; javax.servlet.http.HttpServlet; javax.servlet.http.HttpServletRequest; javax.servlet.http.HttpServletResponse; java.io.*; java.sql.*; javax.servlet.RequestDispatcher;
/** * * @author Niranjan */ public class Goin extends HttpServlet { /** * Processes requests for both HTTP <code>GET</code> and methods. * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ Connection dbcon; Statement state; ResultSet result; public String status, userId; protected void processRequest(HttpServletRequest request, response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); String Username = request.getParameter("UName"); String Password = request.getParameter("txtpassword1"); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:MyDataSource", "", ""); PreparedStatement stat2 where username=? and password=?"); = con.prepareStatement("Select * from member <code>POST</code>
HttpServletResponse
5|Page
out.println("<form >"); out.println("             "); //out.println ("             <input type=submit value=About Us align=left>"); out.println("</form>"); out.println("<form>"); out.println("             "); out.println("             "); // out.println("<input type=submit value=Contact Us align=left>"); out.println("</form>"); out.println("<form>"); out.println("             "); out.println("             "); //out.println ("<input font=red color=black type=submit value=Services align=left>"); out.println("</form>"); out.println("</body></html>"); } else { out.println("<html>"); out.println("<body>"); //out.println ("<h1 align=center> Art Stuff's</h1>"); out.println("<h3 align=center>Varitey of Art's</h3>"); out.println("<br><br><br><br><br><h2 align=center>Try Again with the Correct Username</h2>"); out.println("<form method=post action=http://localhost:8084/Shopping_Cart/Login.jsp>"); out.println("<input type=submit value=Back align=center>"); out.println("</form></body></html>"); out.println("<br> <br> For Loging to the Site Please Press BACK Button"); out.println("<br> <FORM method=post action=http://localhost:8084/Shopping_Cart/Login.jsp>"); out.println("<br> <INPUT type=submit name= Return value=BACK>"); } } catch (Exception e) {
6|Page
7|Page
Task 7
Create a user interface on the Web using java
Screen layouts
Login page
This Is the login page of the Web site. 1st user have to signup to the system then can login to the system
8|Page
9|Page
10 | P a g e
11 | P a g e
Product Catalog
12 | P a g e
13 | P a g e
14 | P a g e
15 | P a g e