This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <beans xmlns="http://www.springframework.org/schema/beans" | |
| xmlns:context="http://www.springframework.org/schema/context" | |
| xmlns:mvc="http://www.springframework.org/schema/mvc" | |
| xmlns:util="http://www.springframework.org/schema/util" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation=" | |
| http://www.springframework.org/schema/beans | |
| http://www.springframework.org/schema/beans/spring-beans.xsd | |
| http://www.springframework.org/schema/context |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%@page import="java.util.*" %> | |
| <%@ 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> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
| <title>Session example</title> | |
| </head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| antlr-2.7.7.jar | |
| c3p0-0.9.2.1.jar | |
| cdi-api-1.1.jar | |
| classmate-1.3.0.jar | |
| commons-logging-1.2.jar | |
| dom4j-1.6.1.jar | |
| el-api-2.2.jar | |
| geronimo-jta_1.1_spec-1.1.1.jar | |
| hibernate-c3p0-5.2.2.Final.jar | |
| hibernate-commons-annotations-5.0.1.Final.jar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <beans xmlns="http://www.springframework.org/schema/beans" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xmlns:context="http://www.springframework.org/schema/context" | |
| xmlns:mvc="http://www.springframework.org/schema/mvc" | |
| xsi:schemaLocation=" | |
| http://www.springframework.org/schema/beans | |
| http://www.springframework.org/schema/beans/spring-beans.xsd | |
| http://www.springframework.org/schema/context |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <head> | |
| <h2>Add Student</h2> | |
| </head> | |
| <body> | |
| <form action="StudentControllerServlet" method="GET"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.luv2code.web.jdbc; | |
| import java.io.IOException; | |
| import java.util.List; | |
| import javax.annotation.Resource; | |
| import javax.servlet.RequestDispatcher; | |
| import javax.servlet.ServletException; | |
| import javax.servlet.annotation.WebServlet; | |
| import javax.servlet.http.HttpServlet; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.File; | |
| import java.io.FileOutputStream; | |
| import java.io.InputStream; | |
| import java.sql.Connection; | |
| import java.sql.DriverManager; | |
| import java.sql.ResultSet; | |
| import java.sql.SQLException; | |
| import java.sql.Statement; | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.joelvirux.annotations; | |
| import java.util.Random; | |
| import javax.annotation.PostConstruct; | |
| import org.springframework.beans.factory.annotation.Value; | |
| import org.springframework.stereotype.Component; | |
| @Component |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Update the form for sorting drop-down list | |
| To pass the sortfield, we give a named parameter: "thesortfield". Also, update the options to use the same field names as our Hibernate entities. The form also includes a submit button to send data to the controller. | |
| <form action="${pageContext.request.contextPath}/customer/list"> | |
| <select name="thesortfield"> | |
| <option value="firstName">First Name</option> | |
| <option value="lastName">Last Name</option> |