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 language="java" contentType="text/html; charset=ISO-8859-1" | |
| pageEncoding="ISO-8859-1"%> | |
| <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> | |
| <%@ taglib uri = "http://java.sun.com/jsp/jstl/fmt" prefix= "fmt" %> | |
| <!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>List Customers</title> |
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.juratech.springdemo.dao; | |
| import java.util.List; | |
| import javax.persistence.TypedQuery; | |
| import javax.persistence.criteria.CriteriaBuilder; | |
| import javax.persistence.criteria.CriteriaQuery; | |
| import javax.persistence.criteria.Root; | |
| import org.hibernate.Session; |
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.springdemo.mvc.validation; | |
| import java.lang.annotation.ElementType; | |
| import java.lang.annotation.Retention; | |
| import java.lang.annotation.RetentionPolicy; | |
| import java.lang.annotation.Target; | |
| import javax.validation.Constraint; | |
| import javax.validation.Payload; |
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
| You can use the troubleshooting tips below. | |
| Troubleshooting Tip #1 | |
| 1. Exit Eclipse | |
| 2. Open a web web browser and visit, http://localhost:8080 | |
| 3. If you see a "Tomcat" web page then that means Tomcat is running as a Windows service. To stop Tomcat running as a Windows services, open your Windows Control Panel. Find the service "Apache Tomcat" and stop it. |
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.training.springdemo; | |
| import org.springframework.context.support.ClassPathXmlApplicationContext; | |
| public class HelloSpring { | |
| public static void main(String args[]){ | |
| //load the spring configuration file |
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
| <html> | |
| <body> | |
| <h3>Hello World of Java!</h3> | |
| The time on the server is <%= new java.util.Date() %> | |
| </body> |
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.nguyen92.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
| <beans xmlns="http://www.springframework.org/schema/beans" | |
| xmlns:p="http://www.springframework.org/schema/p" | |
| xmlns:context="http://www.springframework.org/schema/context" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 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 | |
| http://www.springframework.org/schema/context/spring-context.xsd |
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.springdemo.mvc; | |
| import java.util.SortedMap; | |
| import org.springframework.beans.factory.annotation.Value; | |
| import org.springframework.stereotype.Controller; | |
| import org.springframework.ui.Model; |
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
| <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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>WebCustomerUdemy</groupId> | |
| <artifactId>WebCustomerUdemy</artifactId> | |
| <version>0.0.1-SNAPSHOT</version> | |
| <packaging>war</packaging> | |
| <properties> | |
| <failOnMissingWebXml>false</failOnMissingWebXml> | |
| <spring.version>4.3.9.RELEASE</spring.version> |