292 Advanced Internet Programming public static void main(String args[]) { try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if (\"Nimbus\".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; }} } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(UICrud.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(UICrud.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(UICrud.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(UICrud.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new UICrud().setVisible(true); } }); } private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JTextField jTextField1; private javax.swing.JTextField jTextField2; private javax.swing.JTextField jTextField3; private javax.swing.JTextField jTextField4; // End of variables declaration } CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 293 Output Practical - 3 Create a table of the cookies associated with the suitable home page. If there are no active cookies display as stating “No Cookies” otherwise display cookie name and value in a tabular format. Source code: Index.html <h3>Cookie Example</h3> <body> <form method=\"get\" action=\"http://localhost:8080/WebApplication/CookieSample.jsp\"> Cookie Header <input type=\"text\" name=\"particluar\"><br> Cookie Value <input type=\"text\" name=\"val\"><br> <input type=\"submit\" value=\"Add Cookie\" name=\"add\"> <input type=\"submit\" value=\"List Cookies\" name=\"list\"> </form> </body> CU IDOL SELF LEARNING MATERIAL (SLM)
294 Advanced Internet Programming CookieSample.jsp <body> <% String str1 = request.getParameter(\"particluar\"); // item name String str2 = request.getParameter(\"val\"); // item quantity String str3 = request.getParameter(\"add\"); // submit button by name add String str4 = request.getParameter(\"list\"); // submit button by name list if(str3 != null) { Cookie c1 = new Cookie(str1, str2); response.addCookie(c1); response.sendRedirect(\"index.html\"); } else if(str4 != null) { Cookie clientCookies[] = request.getCookies(); if (clientCookies != null) { out.print(\"<table border=1 align=center> \" + \"<tr> \" + \"<th>Cookie Name</th>\" +\"<th> Cookie Value</th>\" +\"</tr>\"); for( int i = 0; i < clientCookies.length; i++) { out.print(\"<tr>\"); out.print(\"<td>\" + clientCookies[i].getName() + \" </td><td>\" + clientCookies[i].getValue() + \"</td></tr>\"); }} else { out.print(\"No Cookies\"); }} %> </body> CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 295 Output: Practical - 4 Aim Create Login Form and Perform State Management using Cookies, HttpSession and URL Rewriting. Source Code 1. State management using cookies: CookieLog.jsp <% Cookie[] cookies = request.getCookies(); String uname=null; if (cookies != null) { CU IDOL SELF LEARNING MATERIAL (SLM)
296 Advanced Internet Programming for(int i = 0; i < cookies.length; i++) { Cookie c = cookies[i]; if (c.getName().equals(\"username\")) { uname = c.getValue(); }} if(uname!=null) { out.println(\"Welcome \" + uname); } else { %> <h3>Cookie Login</h3> <body> <form method=\"get\" action=\"CookieProcess.jsp\"> UserName <input type=\"text\" name=\"uname\"><br> Password <input type=\"password\" name=\"pass\"><br> <input type=\"submit\" value=\"Login\" name=\"login\"> </form> </body> <% } %> <% } else { %> <h3>Cookie Login</h3> <body> <form method=\"get\" action=\"CookieProcess.jsp\"> UserName <input type=\"text\" name=\"uname\"><br> Password <input type=\"password\" name=\"pass\"><br> CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 297 <input type=\"submit\" value=\"Login\" name=\"login\"> </form> </body> <% } %> CookieProcess.jsp <% String str1 = request.getParameter(\"uname\"); // item name String str2 = request.getParameter(\"pass\"); // item quantity String str3 = request.getParameter(\"login\"); // submit button by name add if(str3 != null) { if(str1.equals(\"admin\") && str2.equals(\"admin\")) { Cookie c1 = new Cookie(\"username\", str1); response.addCookie(c1); response.sendRedirect(\"http://localhost:8080/Cookie_Login/CookieLog.jsp\"); } else { out.print(\"Authentication Failed\"); } } %> Output: CU IDOL SELF LEARNING MATERIAL (SLM)
298 Advanced Internet Programming Index.html <form method=\"post\" action=\"Validate\"> User: <input type=\"text\" name=\"user\" /><br/> Password: <input type=\"text\" name=\"pass\" ><br/> <input type=\"submit\" value=\"submit\"> </form> Validate.java import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.*; @WebServlet(urlPatterns = {\"/Validate\"}) public class Validate extends HttpServlet { protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(\"text/html;charset=UTF-8\"); String name = request.getParameter(\"user\"); String pass = request.getParameter(\"pass\"); if(pass.equals(\"admmin\")) { //creating a session HttpSession session = request.getSession(); session.setAttribute(\"user\", name); response.sendRedirect(\"Welcome\"); }} protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 299 processRequest(request, response); } public String getServletInfo() { return \"Short description\"; }} Welcome.java import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.*; @WebServlet(urlPatterns = {\"/Welcome\"}) public class Welcome extends HttpServlet { protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(\"text/html;charset=UTF-8\"); PrintWriter out = response.getWriter(); HttpSession session = request.getSession(); String user = (String)session.getAttribute(\"user\"); out.println(\"Hello \"+user); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } public String getServletInfo() { return \"Short description\"; }} CU IDOL SELF LEARNING MATERIAL (SLM)
300 Advanced Internet Programming Practical - 5 Study and Implement MVC using Spring Framework Spring MVC is based on Model-View-Controller architecture. Spring MVC architecture at a high level is shown below: Fig: P1.1: Spring MVC Architecture DispatcherServlet is the front controller class to take all requests and start processing them. It can be configured in web.xml file. It passes request to appropriate controller class and sends the response back when view pages have rendered the response page. HomeController.java will be the single controller class in our spring MVC example application. Spring MVC App Eclipse Project Setup Since it is a web application and we want to use maven for dependencies management, first of all we have to create a dynamic web application and then convert it to a maven project. Below images show how to do this and get our project skeleton structure ready. Right click on the project explorer window and click on “New -> Dynamic Web Project” as shown in below image. CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 301 Provide name as “spring-mvc-app” in the next popup page, rest of the things should not required to be changed. CU IDOL SELF LEARNING MATERIAL (SLM)
302 Advanced Internet Programming On next page, provide the source folder as “src/main/java”. You might have to remove “src” folder from the list before adding this. Next is the web module page, provide the context root of application as “spring-mvc-app” and make sure to check “Generate web.xml deployment descriptor” option. CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 303 Click on Finish and you will have a new Dynamic Web Project in your eclipse project explorer. Converting Dynamic Web Project to Maven Project We want to use maven for easily manage our spring mvc dependencies. So let’s convert our web project to maven. Right click on the project and select “Configure -> Convert to Maven Project”. Next provide the pom.xml configurations as shown below. CU IDOL SELF LEARNING MATERIAL (SLM)
304 Advanced Internet Programming Spring MVC Dependencies to pom.xml We need to add spring-web and spring-webmvc dependencies in pom.xml, also add servlet- api, jsp-api and jstl dependencies. Our final pom.xml file will be like below. <project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema- instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd\"> <modelVersion>4.0.0</modelVersion> <groupId>spring-mvc-app</groupId> <artifactId>spring-mvc-app</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>war</packaging> <name>Spring MVC App</name> <description>Spring MVC Simple App</description> <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.0</version> <configuration> <source>1.8</source> CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 305 <target>1.8</target> </configuration> </plugin> <plugin> <artifactId>maven-war-plugin</artifactId> <version>3.2.3</version> <configuration> <warSourceDirectory>WebContent</warSourceDirectory> </configuration> </plugin> </plugins> </build> </project> Notice the finalName configuration in build, so that our WAR file name doesn’t have version details. When the project is build by Eclipse, you will notice all the jars showing up in maven dependencies section. Spring MVC DispatcherServlet as Front Controller We have to add Spring MVC framework to our web application, for that we need to configure DispatcherServlet in web.xml as shown below. <?xml version=\"1.0\" encoding=\"UTF-8\"?> <web-app xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://java.sun.com/xml/ns/javaee\" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd\" id=\"WebApp_ID\" version=\"3.0\"> <display-name>spring-mvc-app</display-name> <!-- Add Spring MVC DispatcherServlet as front controller --> <servlet> <servlet-name>spring</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring-servlet.xml</param-value> CU IDOL SELF LEARNING MATERIAL (SLM)
306 Advanced Internet Programming </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>spring</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> </web-app> contextConfigLocation init-param is used to provide the location of spring bean configuration file. Spring MVC Example Bean Configuration File Next step is to create spring bean configuration file spring-servlet.xml as shown below. Right click WEB-INF ( New ( File and type the name and click fFnish. CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 307 <?xml version=\"1.0\" encoding=\"UTF-8\"?> <beans:beans xmlns=\"https://www.springframework.org/schema/mvc\" xmlns:xsi=\"https://www.w3.org/2001/XMLSchema-instance\" xmlns:beans=\"https://www.springframework.org/schema/beans\" xmlns:context=\"https://www.springframework.org/schema/context\" xsi:schemaLocation=\"https://www.springframework.org/schema/mvc https://www.springframework.org/schema/mvc/spring-mvc.xsd https://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring- beans.xsd https://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd\"> <!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure --> <!-- Enables the Spring MVC @Controller programming model --> <annotation-driven /> <context:component-scan base-package=\"spring\" /> <!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory --> <beans:bean class=\"org.springframework.web.servlet.view.InternalResourceViewResolver\"> <beans:property name=\"prefix\" value=\"/WEB-INF/views/\" /> <beans:property name=\"suffix\" value=\".jsp\" /> </beans:bean> </beans:beans> There are three important configurations. 1. annotation-driven tells DispatcherServlet to look for Controller classes using @Controller annotation. 2. context:component-scan tells DispatcherServlet where to look for controller classes. 3. InternalResourceViewResolver bean configuration to specify location of view pages and suffix used. Controller class methods return name of the view page and then suffix is added to figure out the view page to use for rendering the response. Spring MVC Controller Class We have a single controller class to respond for two URIs – “/” for home page and “/user” for user page. CU IDOL SELF LEARNING MATERIAL (SLM)
308 Advanced Internet Programming package spring.controller; import java.text.DateFormat; import java.util.Date; import java.util.Locale; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import spring.model.User; @Controller public class HomeController { /** * Simply selects the home view to render by returning its name. */ @RequestMapping(value = \"/\", method = RequestMethod.GET) public String home(Locale locale, Model model) { System.out.println(\"Home Page Requested, locale = \" + locale); Date date = new Date(); DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); String formattedDate = dateFormat.format(date); model.addAttribute(\"serverTime\", formattedDate); return \"home\"; } @RequestMapping(value = \"/user\", method = RequestMethod.POST) public String user(@Validated User user, Model model) { System.out.println(\"User Page Requested\"); model.addAttribute(\"userName\", user.getUserName()); return \"user\"; }} Spring MVC Model Class We have a simple model class with a single variable and it’s getter-setter methods. It’s a simple POJO class. CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 309 package spring.model; public class User { private String userName; public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; }} Spring MVC View Pages We have two view pages as defined below. home.jsp <%@ page language=\"java\" contentType=\"text/html; charset=UTF-8\" pageEncoding=\"UTF-8\"%> <%@ taglib uri=\"https://java.sun.com/jsp/jstl/core\" prefix=\"c\"%> <%@ page session=\"false\"%> <html> <head> <title>Home</title> </head> <body> <h1>Hello world!</h1> <P>The time on the server is ${serverTime}.</p> <form action=\"user\" method=\"post\"> <input type=\"text\" name=\"userName\"><br> <input type=\"submit\" value=\"Login\"> </form> </body> </html> user.jsp <%@ page language=\"java\" contentType=\"text/html; charset=UTF-8\" pageEncoding=\"UTF-8\"%> <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"https://www.w3.org/TR/html4/loose.dtd\"> <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"> CU IDOL SELF LEARNING MATERIAL (SLM)
310 Advanced Internet Programming <title>User Home Page</title> </head> <body> <h3>Hi ${userName}</h3> </body> </html> The Spring MVC takes care of mapping form variables to model class variables, that is why we have same variable name in both places. Now our spring mvc example project is ready to de deployed and test. Spring MVC Eclipse Project Deployment We can use Eclipse export as WAR file option to deploy it directly to any running tomcat server webapps directory. However you can also use command line to build the project and then copy it into your favourite servlet container deployment directory. CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 311 Spring MVC Example Test Once the spring mvc project is deployed, we can access the home page at https://localhost:8080/spring-mvc-example/. Change the tomcat port and context-root accordingly. HPH CU IDOL SELF LEARNING MATERIAL (SLM)
312 Advanced Internet Programming HPH Practical - 6 Create Database of Student Subject-Wise Data and Retrieve All Data using JSP and Generate xml Structure Along with DTD and XML Schema Definition Create DTD document, which describes final XML metadata file, Connect to Database Create JSPage, which generates XML file from your database DTD: <!ELEMENT Student(SName, S1Marks, S1Marks, S1Marks,S1Marks)> <!ELEMENT SName(#PCDATA)> <!ELEMENT S1MARKS(#PCDATA)> <!ELEMENT S2MARKS(#PCDATA)> <!ELEMENT S3MARKS(#PCDATA)> <!ELEMENT S4MARKS(#PCDATA)> <!ELEMENT S5MARKS(#PCDATA)> <!-- Main Oracle Connection html page --> <html><head> <title>JSP + XML sample - entry page</title> </head> <body> <p><strong>Oracle Connection</strong></p> <!-- Include JSPage, which generates XML file from Oracle database --> <form action=\"OraDB2XmlFile.jsp\" method=get> <table> ?????? <!-- Insert Oracle Datbase Name --> ?????? <tr><td>Database:</td><td><input type=text name=database></td></tr> ?????? <!-- Insert Server Name where your database is stored --> ?????? <tr><td>Server Name:</td><td><input type=text name=servernm></td></tr> ?????? <!-- Insert your User Name to connect your database --> CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 313 ?????? <tr><td>User Name:</td><td><input type=text name=username></td></tr> ?????? <!-- Insert your account password --> ?????? <tr><td>Password:</td><td><input type=password name=password></td></tr> </table> <br> <!-- Submit button --> <input type=submit value=\"Submit\"> </form> </body> </html> OraDB2XmlFile JSPage <%@ page import=\"java.sql.*\" %> <%@ page import=\"java.io.*\" %> <% // Identify a carriage return character for each output line int iLf = 10; char cLf = (char)iLf; // Create a new empty binary file, which will content XML output File outputFile = new File(<YourFileName>); outputFile.createNewFile(); FileWriter outfile = new FileWriter(outputFile); // the header for XML file outfile.write(\"<?xml version='1.0' encoding='ISO-8859-1'?>\"+cLf); try { ?????? // The HTTP request's parameters to get a database connection ?????? String servernm = request.getParameter(\"servernm\"); ?????? String database = request.getParameter(\"database\"); ?????? String username = request.getParameter(\"username\"); ?????? String password = request.getParameter(\"password\"); ?????? // We access the database directly from the JSP with the Oracle JDBC driver CU IDOL SELF LEARNING MATERIAL (SLM)
314 Advanced Internet Programming ?????? DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver()); ?????? // Define connection string and make a connection to database ?????? Connection conn = DriverManager.getConnection(\"jdbc:oracle:thin:@\"+servernm+\":1521:\"+ ???????????????????????????????????????????????????? database, username, password); ?????? Statement stat = conn.createStatement(); ?????? // Create a recordset ?????? ResultSet rset = stat.executeQuery(\"Select * From Students”); ? ?????? // Expecting at least one record ?????? if( !rset.next() ) { ????????????? throw new IllegalArgumentException(\"No data found for the Cars table\"); ?????? } ?????? outfile.write(\"<Table>\"+cLf); ?????? // Parse our recordset ?????? while(rset.next()) { ????????????? outfile.write(\"<Student>\"+cLf); ????????????? outfile.write(\"<S1Marks>\" + rset.getString(\"S1Marks\") +\"</S1Marks>\"+cLf); ????????????? outfile.write(\"<S2Marks>\" + rset.getString(\"S2Marks\") +\"</S2Marks >\"+cLf); ????????????? outfile.write(\"<S3Marks>\" + rset.getString(\"S3Marks\") +\"</S3Marks>\"+cLf); ????????????? outfile.write(\"<S4Marks>\" + rset.getString(\"S4Marks\") +\"</S4Marks>\"+cLf); ????????????? outfile.write(\"<S5Marks>\" + rset.getString(\"S5Marks\") +\"</S5Marks>\"+cLf); ????????????? outfile.write(\"</Student>\"+cLf); ?????? } ?????? outfile.write(\"</Table>\"+cLf); ?????? // Everything must be closed ?????? rset.close(); ?????? stat.close(); ?????? conn.close(); ?????? outfile.close(); } catch( Exception er ) { %> ?????? <exception><%= er.getMessage()%></exception> <% CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 315 ?????? outfile.close(); } %> Practical - 7 Create Servlet file which contains following functions: Connect Create Database CreateTable Insert Records into respectivetable Update records of particular table of database Delete Records from table Delete table and also database. Design database for student administration. Develop servlet(s) to perform CRUD operations. HomePage.html <!DOCTYPE html> <html> <head> <title>Home page</title> <meta charset=\"UTF-8\"> <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"> </head> <body> <center> <h1>Student Administration</h1> <form action=\"createtblStud\"> <input type=\"submit\" value=\"Create tblStudent\"> </form> <br> CU IDOL SELF LEARNING MATERIAL (SLM)
316 Advanced Internet Programming <form action=\"insertData.html\"> <input type=\"submit\" value=\"Insert\"> </form> <br> <form action=\"updateData.html\"> <input type=\"submit\" value=\"Update\"> </form> <br> <form action=\"deleteData.html\"> <input type=\"submit\" value=\"Delete\"> </form> <br> <form action=\"selectStud\"> <input type=\"submit\" value=\"Show All Records\"> </form> </center> </body> </html> web.xml <?xml version=\"1.0\" encoding=\"UTF-8\"?> <web-app xmlns=\"http://xmlns.jcp.org/xml/ns/javaee\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web- app_3_1.xsd\" version=\"3.1\"> <session-config> <session-timeout> 30 </session-timeout> </session-config> <welcome-file-list> <welcome-file>HomePage.html</welcome-file> </welcome-file-list> <servlet> <servlet-name>createtblStud</servlet-name> <servlet-class>createtblStud</servlet-class> </servlet> <servlet-mapping> <servlet-name>createtblStud</servlet-name> CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 317 <url-pattern>/createtblStud</url-pattern> </servlet-mapping> <servlet> <servlet-name>selectStud</servlet-name> <servlet-class>selectStud</servlet-class> </servlet> <servlet-mapping> <servlet-name>selectStud</servlet-name> <url-pattern>/selectStud</url-pattern> </servlet-mapping> <servlet> <servlet-name>InsertStudent</servlet-name> <servlet-class>InsertStudent</servlet-class> </servlet> <servlet-mapping> <servlet-name>InsertStudent</servlet-name> <url-pattern>/InsertStudent</url-pattern> </servlet-mapping> <servlet> <servlet-name>UpdateStudent</servlet-name> <servlet-class>UpdateStudent</servlet-class> </servlet> <servlet-mapping> <servlet-name>UpdateStudent</servlet-name> <url-pattern>/UpdateStudent</url-pattern> </servlet-mapping> <servlet> <servlet-name>DeleteStudent</servlet-name> <servlet-class>DeleteStudent</servlet-class> </servlet> <servlet-mapping> <servlet-name>DeleteStudent</servlet-name> <url-pattern>/DeleteStudent</url-pattern> </servlet-mapping> <servlet> CU IDOL SELF LEARNING MATERIAL (SLM)
318 Advanced Internet Programming <servlet-name>UpdateStudentDetails</servlet-name> <servlet-class>UpdateStudentDetails</servlet-class> </servlet> <servlet-mapping> <servlet-name>UpdateStudentDetails</servlet-name> <url-pattern>/UpdateStudentDetails</url-pattern> </servlet-mapping> </web-app> createtblStud.java import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.sql.*; public class createtblStud extends HttpServlet{ public void service(HttpServletRequest request,HttpServletResponse response) throws IOException { Connection con; Statement st; PrintWriter out=response.getWriter(); response.setContentType(\"text/html\"); out.println(\"<center>\"); try { Class.forName(\"com.mysql.jdbc.Driver\"); con=DriverManager.getConnection(\"jdbc:mysql://localhost:9300/dbStudent\",\"root\",\"root\"); st=con.createStatement(); String query=\"create table tblStudent(RollNo int,StudName varchar(20),MarksSSC float,MarksHSC float);\"; System.out.println(query); int c=st.executeUpdate(query); if(c==0) out.println(\"<h1>Table created<br>\"); else out.println(\"<h1>Error in creation/already exists<br>\"); CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 319 out.println(\"<a href='HomePage.html'>Click to go to Home Page</a><br>\"); } catch(Exception e) { System.out.println(e); out.println(\"<h1>Error in creation/already exists<br>\"); out.println(\"<a href='HomePage.html'>Click to go to Home Page</a><br>\"); }}} insertData.html <!DOCTYPE html> <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"> <title>Insert</title> </head> <body> <center> <h1>Student Data Insertion</h1> <form action=\"InsertStudent\"> <table> <tr> <td>Roll no</td> <td><input type=\"text\" name=\"txtRollNo\"></td> </tr> <tr> <td>Student Name</td> <td><input type=\"text\" name=\"txtStudName\"></td> </tr> <tr> <td>Marks in SSC</td> <td><input type=\"text\" name=\"txtMarksSSC\"></td> </tr> <tr> <td>Marks in HSC</td> <td><input type=\"text\" name=\"txtMarksHSC\"></td> </tr> <tr> <td><input type=\"submit\" name=\"Insert\"></td> CU IDOL SELF LEARNING MATERIAL (SLM)
320 Advanced Internet Programming </tr> </table> </form> </center> </body> </html> InsertStudent.java import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.sql.*; public class InsertStudent extends HttpServlet{ public void service(HttpServletRequest request,HttpServletResponse response) throws IOException { Connection con; Statement st; PrintWriter out=response.getWriter(); response.setContentType(\"text/html\"); out.println(\"<center>\"); try { Class.forName(\"com.mysql.jdbc.Driver\"); con=DriverManager.getConnection(\"jdbc:mysql://localhost:9300/dbStudent\",\"root\",\"root\"); st=con.createStatement(); int no=Integer.parseInt(request.getParameter(\"txtRollNo\")); String name=request.getParameter(\"txtStudName\"); float marksSSC=Float.parseFloat(request.getParameter(\"txtMarksSSC\")); float marksHSC=Float.parseFloat(request.getParameter(\"txtMarksHSC\")); String query=\"insert into tblStudent values(\"+no+\",'\"+name+\"',\"+marksSSC+\",\"+marksHSC+\")\"; System.out.println(query); int c=st.executeUpdate(query); if(c!=0) out.println(\"<h1>Record inserted<br>\"); else out.println(\"<h1>Error in insertion<br>\"); out.println(\"<a href='HomePage.html'>Click to go to Home Page</a><br>\"); out.println(\"<a href='insertData.html'>Click to add one more record</a></h1>\"); } CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 321 catch(Exception e) { System.out.println(e); out.println(\"<h1>Error in insertion<br>\"); out.println(\"<a href='HomePage.html'>Click to go to Home Page</a><br>\"); out.println(\"<a href='insertData.html'>Click to add one more record</a></h1>\"); }} } deleteData.html <!DOCTYPE html> <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"> <title>Delete</title> </head> <body> <center> <h1>Student Data Deletion</h1> <form action=\"DeleteStudent\"> <table> <tr> <td>Roll No</td> <td><input type=\"text\" name=\"txtRollNo\"></td> </tr> <tr> <td><input type=\"submit\" name=\"Delete\"></td> </tr> </table> </form> </center> </body> </html> DeleteStudent.java import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.sql.*; public class DeleteStudent extends HttpServlet{ public void service(HttpServletRequest request,HttpServletResponse response) throws IOException CU IDOL SELF LEARNING MATERIAL (SLM)
322 Advanced Internet Programming { Connection con; Statement st; PrintWriter out=response.getWriter(); response.setContentType(\"text/html\"); out.println(\"<center>\"); try { Class.forName(\"com.mysql.jdbc.Driver\"); con=DriverManager.getConnection(\"jdbc:mysql://localhost:9300/dbStudent\",\"root\",\"root\"); st=con.createStatement(); int no=Integer.parseInt(request.getParameter(\"txtRollNo\")); String query=\"select * from tblStudent where RollNo=\"+no+\";\"; ResultSet rs=st.executeQuery(query); if(rs.next()) { query=\"delete from tblStudent where RollNo=\"+no+\";\"; int c=st.executeUpdate(query); if(c!=0) out.println(\"<h1>Record deleted<br>\"); } else out.println(\"<h1>No such record<br>\"); out.println(\"<a href='HomePage.html'>Click to go to Home Page</a><br><br>\"); } catch(Exception e) { System.out.println(e); out.println(\"<h1>Error in deletion<br>\"); out.println(\"<a href='HomePage.html'>Click to go to Home Page</a><br><br>\"); }} } updateData.html <!DOCTYPE html> <html> CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 323 <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"> <title>Updation</title> </head> <body> <center> <h1>Student Data Updation</h1> <form action=\"UpdateStudent\"> <table> <tr> <td>Roll No</td> <td><input type=\"text\" name=\"txtRollNo\"></td> </tr> <tr> <td><input type=\"submit\" name=\"Update\"></td> </tr> </table> </form> </center> </body> </html> UpdateStudent.java import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.sql.*; public class UpdateStudent extends HttpServlet{ public void service(HttpServletRequest request,HttpServletResponse response) throws IOException { Connection con; Statement st; PrintWriter out=response.getWriter(); response.setContentType(\"text/html\"); out.println(\"<center>\"); try { Class.forName(\"com.mysql.jdbc.Driver\"); con=DriverManager.getConnection(\"jdbc:mysql://localhost:9300/dbStudent\",\"root\",\"root\"); CU IDOL SELF LEARNING MATERIAL (SLM)
324 Advanced Internet Programming st=con.createStatement(); int no=Integer.parseInt(request.getParameter(\"txtRollNo\")); String query=\"select * from tblStudent where RollNo=\"+no+\";\"; ResultSet rs=st.executeQuery(query); if(rs.next()) { no=Integer.parseInt(rs.getString(1)); String name=rs.getString(2); float marksSSC=rs.getFloat(3); float marksHSC=rs.getFloat(4); out.println(\"<form action='UpdateStudentDetails'><table><tr><td>Roll No</td><td><input type='text' name='txtRollNo' value=\"+no+\"></td></tr>\"); out.println(\"<tr><td>Student Name</td><td><input type='text' name='txtStudName' value=\"+name+\"></td></tr>\"); out.println(\"<tr><td>Marks in SSC</td><td><input type='text' name='marksSSC' value=\"+marksSSC+\"></td></tr>\"); out.println(\"<tr><td>Marks in HSC</td><td><input type='text' name='marksHSC' value=\"+marksHSC+\"></td></tr>\"); out.println(\"<tr><td><input type='submit' name='Update'></td></tr></table></form>\"); } else out.println(\"<h1>No such record<br>\"); out.println(\"<a href='HomePage.html'>Click to go to Home Page</a><br><br>\"); } catch(Exception e) { System.out.println(e); out.println(\"<h1>Error in updation<br>\"); out.println(\"<a href='HomePage.html'>Click to go to Home Page</a><br><br>\"); } }} UpdateStudentDetails.java import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.sql.*; CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 325 public class UpdateStudentDetails extends HttpServlet{ public void service(HttpServletRequest request,HttpServletResponse response) throws IOException { Connection con; Statement st; PrintWriter out=response.getWriter(); response.setContentType(\"text/html\"); out.println(\"<center>\"); try { Class.forName(\"com.mysql.jdbc.Driver\"); con=DriverManager.getConnection(\"jdbc:mysql://localhost:9300/dbStudent\",\"root\",\"root\"); st=con.createStatement(); int no=Integer.parseInt(request.getParameter(\"txtRollNo\")); String name=request.getParameter(\"txtStudName\"); float marksSSC=Float.parseFloat(request.getParameter(\"marksSSC\")); float marksHSC=Float.parseFloat(request.getParameter(\"marksHSC\")); String query=\"update tblStudent set StudName='\"+name+\"',MarksSSC=\"+marksSSC+\",MarksHSC='\"+marksHSC+\"' where RollNo=\"+no+\";\"; System.out.println(query); int c=st.executeUpdate(query); if(c!=0) out.println(\"<h1>Record updated<br>\"); else out.println(\"<h1>Error in updation<br>\"); out.println(\"<a href='HomePage.html'>Click to go to Home Page</a><br>\"); } catch(Exception e) { System.out.println(e); out.println(\"<h1>Error in updation<br>\"); out.println(\"<a href='HomePage.html'>Click to go to Home Page</a><br>\"); }}} CU IDOL SELF LEARNING MATERIAL (SLM)
326 Advanced Internet Programming selectStud.java import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.sql.*; public class selectStud extends HttpServlet{ public void service(HttpServletRequest request,HttpServletResponse response) throws IOException { Connection con; Statement st; PrintWriter out=response.getWriter(); response.setContentType(\"text/html\"); out.println(\"<center>\"); try { Class.forName(\"com.mysql.jdbc.Driver\"); con=DriverManager.getConnection(\"jdbc:mysql://localhost:9300/dbStudent\",\"root\",\"root\"); st=con.createStatement(); out.print(\"<h1>Records in tblStudent</h1>\"); String query=\"select * from tblStudent\"; ResultSet rs=st.executeQuery(query); out.println(\"<table border='1'><tr><td>Roll No</td><td>Student Name</td><td>Marks in SSC</td><td>Marks in HSC</td></tr>\"); while(rs.next()) { out.print(\"<tr><td>\"+rs.getString(1) +\"</td><td>\"+ rs.getString(2) +\"</td><td>\"+ rs.getString(3) +\"</td><td>\"+ rs.getString(4) + \"</td></tr>\"); } out.println(\"<a href='HomePage.html'>Click to go to Home Page</a><br>\"); } catch(Exception e) { System.out.println(e); out.println(\"<h1>Error<br>\"); out.println(\"<a href='HomePage.html'>Click to go to Home Page</a><br>\"); } }} CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 327 Output: Home page Table Creation Record Data Insertion CU IDOL SELF LEARNING MATERIAL (SLM)
328 Advanced Internet Programming Update Record Data Before Updation After Updation Record Deletion when Not in Database CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 329 Show All Records Practical - 8 Create a Servlet that uses session tracking to keep per-client access counts. Also show other generic- info about the session. index.html <html> <head><title>Cookie Demo</title></head> <body> <form action=\"Page1\" > Enter Your Name <input type=\"text\" name=\"txtName\"><br> <input type=\"submit\" value=\"~~~ Click to Enter ~~~\"> </form> CU IDOL SELF LEARNING MATERIAL (SLM)
330 Advanced Internet Programming </body> </html> Page1.java package mypack; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.Cookie; public class Page1 extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(\"text/html;charset=UTF-8\"); PrintWriter out = response.getWriter(); out.println(\"<html><head><title>Page1</title></head>\"); out.println(\"<body bgcolor=pink >\"); String uname = request.getParameter(\"txtName\"); out.println(\"<h1>~~~ Welcome \"+uname+\"</h1>\"); Cookie ck1 = new Cookie(\"username\", uname); Cookie ck2 = new Cookie(\"visit\",\"1\"); response.addCookie(ck1); response.addCookie(ck2); out.println(\"<h1><a href=Page2 >Click to visit Page 2 </a></h1>\"); out.println(\"</body>\"); out.println(\"</html>\"); } } Page2.java package mypack; import java.io.*; import javax.servlet.ServletException; import javax.servlet.http.*; CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 331 public class Page2 extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(\"text/html;charset=UTF-8\"); PrintWriter out = response.getWriter(); out.println(\"<html><head><title>Page2</title></head>\"); out.println(\"<body bgcolor=yellow >\"); Cookie [] ck = request.getCookies(); for(int i=0;i<ck.length;i++){ if(ck[i].getName().equals(\"visit\")){ int count = Integer.parseInt(ck[i].getValue())+1; out.println(\"<h1>Visit No : \"+count+\"</h1>\"); ck[i] = new Cookie(\"visit\",count+\"\"); response.addCookie(ck[i]); } else { out.println(ck[i].getName()+ \" = \"+ck[i].getValue()); } out.println(\"<h1><a href=Page3 >Click to visit Page 3 </a></h1>\"); out.println(\"<h1><a href=Page4 >Click to visit Page 4 </a></h1>\"); out.println(\"<h1><a href=Page5 >Click to visit Page 5 </a></h1>\"); out.println(\"</body>\"); out.println(\"</html>\"); }} Repeat the code from Page2.java for Page3.java, Page4.java and Page5.java with relevant changes. CU IDOL SELF LEARNING MATERIAL (SLM)
332 Advanced Internet Programming Practical - 9 Make a Program which Creates a Cookie on the Server Side using Servlets and when Server Returns a Response to the User also Send Cookies to Clients for Later Retrieve Its Data from that Client // Java program to illustrate methods // of Cookie class import java.io.IOException; import java.io.PrintWriter; import java.util.List; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * Servlet implementation class cookieTest */ @WebServlet(\"/cookieTest\") public class cookieTest extends HttpServlet { private static final long serialVersionUID = 1L; CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 333 /** * @see HttpServlet#HttpServlet() */ public cookieTest() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse * response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(\"text/html\"); // Create a new cookie with the name test cookie // and value 123 Cookie cookie = new Cookie(\"test_cookie\", \"123\"); // setComment() method cookie.setComment(\"Just for testing\"); // setDomain() method // cookie.setDomain(\"domain\"); // setMaxAge() method cookie.setMaxAge(3600); // setPath() method cookie.setPath(\"/articles\"); // setSecure() method cookie.setSecure(false); // setValue() method cookie.setValue(\"321\"); // setVersion() method cookie.setVersion(0); response.addCookie(cookie); CU IDOL SELF LEARNING MATERIAL (SLM)
334 Advanced Internet Programming PrintWriter pw = response.getWriter(); pw.print(\"<html><head></head><body>\"); Cookie ck[] = request.getCookies(); if (ck == null) { pw.print(\"<p>This is first time the page is requested.</p>\"); pw.print(\"<p>And therefore no cookies found</p></body></html>\"); } else { pw.print(\"<p>Welcome Again...Cookies found</p>\"); for (int i = 0; i < ck.length; i++) { // getName() method pw.print(\"<p>Name :\" + ck[i].getName() + \"</p>\"); // getValue() method pw.print(\"<p>Value :\" + ck[i].getValue() + \"</p>\"); // getDomain() method pw.print(\"<p>Domain :\" + ck[i].getDomain() + \"</p>\"); // getPath() method pw.print(\"<p>Name :\" + ck[i].getPath() + \"</p>\"); // getMaxAge() method pw.print(\"<p>Max Age :\" + ck[i].getMaxAge() + \"</p>\"); // getComment() method pw.print(\"<p>Comment :\" + ck[i].getComment() + \"</p>\"); // getSecure() method pw.print(\"<p>Name :\" + ck[i].getSecure() + \"</p>\"); // getVersion() method pw.print(\"<p>Version :\" + ck[i].getVersion() + \"</p>\"); } pw.print(\"<body></html>\"); } pw.close(); } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse * response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) CU IDOL SELF LEARNING MATERIAL (SLM)
Basics 335 throws ServletException, IOException { doGet(request, response); } } Output: The following output are from a web browser0 For the first request: This is first time the page is requested. And therefore no cookies found. For the second request: Welcome Again...Cookies found Name :test_cookie Value :321 Domain :null Name :null Max Age :-1 Comment :null Name :false CU IDOL SELF LEARNING MATERIAL (SLM)
PRACTICAL JAVASCRIPT/CSS UNIT 2 vcvc Practical - 1 1. Create a registration page using HTML and CSS with right corner of the page having current date and time. 2. Design specification for the webpage as follows: (a) The text box background color will be displayed and shadowed when th cursor inserts into the text field. (b) The text area background color will be displayed by and shadowed when the cursor places into textarea. (c) The submit button background color will be displayed and shadowed when the cursor moves over the submit button. (d) For the same page and write validation function for registration page and modify the onSubmit event handler in the form code to validate the following form fields: (i) FirstName – Must be entered – Must be Character (ii) Password – Password length should be between 6 to 20 characters. (iii) Gender(Use radio button) – Must be selected (iv) Mobile Number – Must be in format(XXXXXXXXXXXX) CU IDOL SELF LEARNING MATERIAL (SLM)
JavaScript/CSS 337 (v) Email – Email address must contain at least an @ sign and a dot(.) <!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. <html> <head> <title>Registration</title> <meta charset=\"UTF-8\"> <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"> </head> <style> .input-group { float: right; } .button { background-color: #4CAF50; /* Green */ border: none; color: white; padding: 16px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 4px 2px; transition-duration: 0.4s; cursor: pointer; } button1 { background-color: white; CU IDOL SELF LEARNING MATERIAL (SLM)
338 Advanced Internet Programming color: black; border: 2px solid #4CAF50; } .button1:hover { background-color: #4CAF50; color: white; } </style> <body> <form onsubmit=\"myFunction();\"> <div class=\"input-group\"> <span id=\"datetime\"></span> </div> Name:<input type='text' name='name' id=\"name\" style=\"background-color:yellow\" onfocus=\"nameChanged();\"/> <label id='nameRes' style=\"color:red\"></label><br> <br> Email: <input type='text' name='email' id='email'/> <br> Password: <input type='password' name='pass' id=\"pass\" /><br> Gender<input type='radio' name='gender' id=\"r1\" value=\"Male\">Male <input type='radio' name='gender'id=\"r2\" value=\"Female\">Female<br> Mobile:<input type='text' name='mobile' id=\"mobile\" /><br> Address<textarea id=\"address\" name='address'rows=\"4\" cols=\"50\" style=\"background-color:green\" onfocus=\"addressChanged();\"></textarea><br> <button type='submit' id=\"submit\" class=\"button button1\">Submit</button> </form> <script> var dt = new Date(); document.getElementById(\"datetime\").innerHTML = dt.toLocaleString(); function myFunction() { var alphaExp = /^[a-zA-Z]+$/; var name = document.getElementById(\"name\"); if(name.value.length == 0) { alert(\"Name cannot be blank\"); return false; } if(!name.value.match(alphaExp)) { alert(\"Name Must be character\"); return false; } var emailExp = /^[a-zA-Z0-9]+[@]+[a-zA-Z]+[.]+[a-zA-Z]+$/; var email = document.getElementById(\"email\"); CU IDOL SELF LEARNING MATERIAL (SLM)
JavaScript/CSS 339 if(!email.value.match(emailExp)) { alert(\"Enter valid email\"); } var uInput = document.getElementById(\"pass\"); if((uInput.value.length>= 6 && uInput.value.length <= 20)) { } else { window.alert(\"Please enter between 6 and 20 characters\" ); uInput.focus(); return false; } var r1 = document.getElementById(\"r1\"); var r2 = document.getElementById(\"r2\"); if (!r1.checked && !r2.checked) { alert(\"Select gender\"); return false; } var mobileExp = /^[0-9]+$/; var mobile = document.getElementById(\"mobile\"); if((mobile.value.length>= 10 && mobile.value.length <= 12)) { } if(!mobile.value.match(mobileExp)) { alert(\"Enter valid mobile\"); return false; } alert(\"All details are correct\\nTHank YOu\"); } function nameChanged() { var inputVal = document.getElementById(\"name\"); inputVal.style.backgroundColor = \"lightyellow\"; } function addressChanged() { var inputVal = document.getElementById(\"address\"); inputVal.style.backgroundColor = \"yellowgreen\"; } function mousever() { var inputVal = document.getElementById(\"email\"); inputVal.style.backgroundColor=\"#ffcccc\"; } </script> </body> </html> CU IDOL SELF LEARNING MATERIAL (SLM)
340 Advanced Internet Programming 1. Create a registration page using HTML and CSS with right corner of the page having current date and time. 2. Design specification for the webpage as follows: (a) The text box background color will be displayed and shadowed when th cursor inserts into the text field. (b) The text area background color will be displayed by and shadowed when the cursor places into textarea. (c) The submit button background color will be displayed and shadowed when the cursor moves over the submit button. (d) For the same page and write validation function for registration page and modify the onSubmit event handler in the form code to validate the following form fields: (i) FirstName – Must be entered – Must be Character CU IDOL SELF LEARNING MATERIAL (SLM)
JavaScript/CSS 341 (ii) Password Password length should be between 6 to 20 characters. (iii) Gender(Use radio button) Must be selected (iv) Mobile Number Must be in format(XXXXXXXXXXXX) CU IDOL SELF LEARNING MATERIAL (SLM)
Search
Read the Text Version
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
- 164
- 165
- 166
- 167
- 168
- 169
- 170
- 171
- 172
- 173
- 174
- 175
- 176
- 177
- 178
- 179
- 180
- 181
- 182
- 183
- 184
- 185
- 186
- 187
- 188
- 189
- 190
- 191
- 192
- 193
- 194
- 195
- 196
- 197
- 198
- 199
- 200
- 201
- 202
- 203
- 204
- 205
- 206
- 207
- 208
- 209
- 210
- 211
- 212
- 213
- 214
- 215
- 216
- 217
- 218
- 219
- 220
- 221
- 222
- 223
- 224
- 225
- 226
- 227
- 228
- 229
- 230
- 231
- 232
- 233
- 234
- 235
- 236
- 237
- 238
- 239
- 240
- 241
- 242
- 243
- 244
- 245
- 246
- 247
- 248
- 249
- 250
- 251
- 252
- 253
- 254
- 255
- 256
- 257
- 258
- 259
- 260
- 261
- 262
- 263
- 264
- 265
- 266
- 267
- 268
- 269
- 270
- 271
- 272
- 273
- 274
- 275
- 276
- 277
- 278
- 279
- 280
- 281
- 282
- 283
- 284
- 285
- 286
- 287
- 288
- 289
- 290
- 291
- 292
- 293
- 294
- 295
- 296
- 297
- 298
- 299
- 300
- 301
- 302
- 303
- 304
- 305
- 306
- 307
- 308
- 309
- 310
- 311
- 312
- 313
- 314
- 315
- 316
- 317
- 318
- 319
- 320
- 321
- 322
- 323
- 324
- 325
- 326
- 327
- 328
- 329
- 330
- 331
- 332
- 333
- 334
- 335
- 336
- 337
- 338
- 339
- 340
- 341
- 342
- 343
- 344
- 345
- 346
- 347
- 348
- 349
- 350
- 351
- 352
- 353
- 354
- 355
- 356
- 357
- 358
- 359
- 360
- 361
- 362
- 363
- 364
- 365
- 366
- 367
- 368
- 369
- 370
- 371
- 372