SlideShare una empresa de Scribd logo
1 de 40
Descargar para leer sin conexión
copyright © I-Admin
Spring Framework 3.0 MVC
Prepared By:
Ravi Kant Soni
Sr. Software Engineer | ADS-Bangalore
session - 2
copyright © I-Admin
Objectives
 Demonstrate Spring MVC with Examples
– Spring MVC Form Handling Example
– Spring Page Redirection Example
– Spring Static pages Example
– Spring Exception Handling Example
copyright © I-Admin
Spring MVC Form Handling Example
 To develop a Dynamic Form based Web
Application using Spring MVC Framework
copyright © I-Admin
Spring MVC Form Handling cont…
 Steps
– Create a Dynamic Web Project
– Add Spring and other libraries into the
folder WebContent/WEB-INF/lib
– Create a Java classes Student and StudentController
– Create Spring configuration files Web.xml and Spring-
servlet.xml under the WebContent/WEB-INF folder
– Create a sub-folder with a name jsp under
the WebContent/WEB-INF folder. Create a view
files student.jsp and result.jsp under this sub-folder
copyright © I-Admin
Spring MVC Form Handling cont…
 Student.java
public class Student {
private Integer age;
private String name;
private Integer id;
public getter() & setter()……..
}
copyright © I-Admin
Spring MVC Form Handling cont…
 StudentController.java
@Controller
public class StudentController {
@RequestMapping(value = "/student", method = RequestMethod.GET)
public String student(ModelMap model) {
model.addAttribute( "command", new Student());
return “student”;
}
@RequestMapping(value = "/addStudent", method = RequestMethod.POST)
public String addStudent(@ModelAttribute("SpringWeb") Student student,
ModelMap model) {
model.addAttribute("name", student.getName());
model.addAttribute("age", student.getAge());
model.addAttribute("id", student.getId());
return "result";
}
}
copyright © I-Admin
Spring MVC Form Handling cont…
 web.xml
<display-name>Spring MVC Form Handling</display-name>
<servlet>
<servlet-name>Spring</servlet-name>
<servlet-class> org.springframework.web.servlet.DispatcherServlet
</servlet-class> <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Spring</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
copyright © I-Admin
Spring MVC Form Handling cont…
 Spring-servlet.xml
<beans ……..>
<context:component-scan base-package="com.tutorialspoint" />
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
</beans>
copyright © I-Admin
Spring MVC Form Handling cont…
 student.jsp
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<html>
<head> <title>Spring MVC Form Handling</title> </head>
<body>
<h2>Student Information</h2>
<form:form method="POST" action="/HelloWeb/addStudent">
<table>
<tr>
<td><form:label path="name">Name</form:label></td> <td><form:input path="name" /></td>
</tr> <tr>
<td><form:label path="age">Age</form:label></td> <td><form:input path="age" /></td>
</tr> <tr>
<td><form:label path="id">id</form:label></td><td><form:input path="id" /></td>
</tr> <tr>
<td colspan="2"> <input type="submit" value="Submit"/> </td>
</tr>
</table>
</form:form>
</body>
</html>
copyright © I-Admin
Spring MVC Form Handling cont…
 result.jsp
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<html>
<head> <title>Spring MVC Form Handling</title> </head>
<body>
<h2>Submitted Student Information</h2>
<table>
<tr> <td>Name</td> <td>${name}</td> </tr>
<tr> <td>Age</td> <td>${age}</td> </tr>
<tr> <td>ID</td> <td>${id}</td> </tr>
</table> </body>
</html>
copyright © I-Admin
Spring MVC Form Handling cont…
 List of Spring and other libraries to be included in your web
application in WebContent/WEB-INF/lib folder
– commons-logging-x.y.z.jar
– org.springframework.asm-x.y.z.jar
– org.springframework.beans-x.y.z.jar
– org.springframework.context-x.y.z.jar
– org.springframework.core-x.y.z.jar
– org.springframework.expression-x.y.z.jar
– org.springframework.web.servlet-x.y.z.jar
– org.springframework.web-x.y.z.jar
– spring-web.jar
copyright © I-Admin
Spring Page Redirection Example
 redirect to transfer a http request to another
page
copyright © I-Admin
Spring Page Redirection cont…
 Steps:
– Create a Dynamic Web Project
– Add Spring and other libraries into the
folder WebContent/WEB-INF/lib
– Create a Java class WebController
– Create Spring configuration files Web.xml and Spring-
servlet.xml under theWebContent/WEB-INF folder
– Create a sub-folder with a name jsp under
the WebContent/WEB-INF folder
copyright © I-Admin
Spring Page Redirection cont…
 WebController.java
@Controller
public class WebController {
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "index";
}
@RequestMapping(value = "/redirect", method =RequestMethod.GET)
public String redirect() {
return "redirect:finalPage";
}
@RequestMapping(value = "/finalPage", method = RequestMethod.GET)
public String finalPage() {
return "final";
}
}
copyright © I-Admin
Spring Page Redirection cont…
 web.xml
<display-name>Spring Page Redirection</display-name>
<servlet>
<servlet-name>Spring</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Spring</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
copyright © I-Admin
Spring Page Redirection cont…
 Spring-servlet.xml
<context:component-scan base-package="com.tutorialspoint" />
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
copyright © I-Admin
Spring Page Redirection cont…
 index.jsp
 <%@taglib uri="http://www.springframework.org/tags/form"
prefix="form"%>
 Spring Form:
<form:form method="GET" action="/HelloWeb/redirect">
<table>
<tr>
<td> <input type="submit" value="Redirect Page"/> </td>
</tr>
</table>
</form:form>
copyright © I-Admin
Spring Page Redirection cont…
 final.jsp
<%@taglib uri="http://www.springframework.org/tags/form"
prefix="form"%>
<html>
<head>
<title>Spring Page Redirection</title>
</head>
<body>
<h2>Redirected Page</h2>
</body>
</html>
copyright © I-Admin
Spring Page Redirection cont…
 List of Spring and other libraries to be included in
your web application in WebContent/WEB-
INF/lib folder
– commons-logging-x.y.z.jar
– org.springframework.asm-x.y.z.jar
– org.springframework.beans-x.y.z.jar
– org.springframework.context-x.y.z.jar
– org.springframework.core-x.y.z.jar
– org.springframework.expression-x.y.z.jar
– org.springframework.web.servlet-x.y.z.jar
– org.springframework.web-x.y.z.jar
– spring-web.jar
copyright © I-Admin
Spring Static pages Example
 Access static pages along with dynamic
pages with the help of <mvc:resources> tag
copyright © I-Admin
Spring Static pages cont…
 Steps
– Create a Dynamic Web Project
– Add Spring and other libraries into the
folder WebContent/WEB-INF/lib
– Create a Java class WebController
– Create Spring configuration files Web.xml and Spring-
servlet.xml under theWebContent/WEB-INF folder
– Create a sub-folder with a name jsp under
the WebContent/WEB-INF folder
– Create a sub-folder with a name pages under
the WebContent/WEB-INF folder. Create a static
file final.htm under this sub-folder
copyright © I-Admin
Spring Static pages cont…
 WebController.java
@Controller
public class WebController {
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "index";
}
@RequestMapping(value = "/staticPage", method = RequestMethod.GET)
public String redirect() {
return "redirect:/pages/final.htm";
}
}
copyright © I-Admin
Spring Static pages cont…
 web.xml
<display-name>Spring Page Redirection</display-name>
<servlet>
<servlet-name>Spring</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Spring</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
copyright © I-Admin
Spring Static pages cont…
 Spring-servlet.xml
 <mvc:resources..../> tag is being used to map static pages
 Static pages including images, style sheets, JavaScript, and other static content
 Multiple resource locations may be specified using a comma-separated list of values
<context:component-scan base-package="com.tutorialspoint" />
<mvc:annotation-driven/>
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
<mvc:resources mapping="/pages/**" location="/WEB-INF/pages/" />
copyright © I-Admin
Spring Static pages cont…
 index.jsp
 <%@taglib uri="http://www.springframework.org/tags/form"
prefix="form"%>
<p>Click below button to get a simple HTML page</p>
<form:form method="GET" action="/HelloWeb/staticPage">
<table>
<tr>
<td>
<input type="submit" value="Get HTML Page"/>
</td>
</tr>
</table>
</form:form>
copyright © I-Admin
Spring Static pages cont…
 WEB-INF/pages/final.htm
<html>
<head>
<title>Spring Static Page</title>
</head>
<body>
<h2>A simple HTML page</h2>
</body>
</html>
copyright © I-Admin
Spring Static pages cont…
 List of Spring and other libraries to be included in
your web application in WebContent/WEB-
INF/lib folder
– commons-logging-x.y.z.jar
– org.springframework.asm-x.y.z.jar
– org.springframework.beans-x.y.z.jar
– org.springframework.context-x.y.z.jar
– org.springframework.core-x.y.z.jar
– org.springframework.expression-x.y.z.jar
– org.springframework.web.servlet-x.y.z.jar
– org.springframework.web-x.y.z.jar
– spring-web.jar
copyright © I-Admin
Spring Exception Handling Example
 Simple web based application using Spring
MVC Framework, which can handle one or
more exceptions raised inside its controllers
copyright © I-Admin
Spring Exception Handling cont…
 Steps:
– Create a Dynamic Web Project
– Add Spring and other libraries into the folder WebContent/WEB-
INF/lib
– Create a Java
classes Student, StudentController and SpringException
– Create Spring configuration files Web.xml and Spring-
servlet.xml under theWebContent/WEB-INF folder
– Create a sub-folder with a name jsp under the WebContent/WEB-
INF folder. Create a view files
 student.jsp
 result.jsp
 error.jsp
 ExceptionPage.jsp
copyright © I-Admin
Spring Exception Handling cont…
 Student.java
public class Student {
private Integer age;
private String name;
private Integer id;
public getter() & setter()……..
}
copyright © I-Admin
Spring Exception Handling cont…
 SpringException.java
public class SpringException extends RuntimeException{
private String exceptionMsg;
public SpringException(String exceptionMsg) {
this.exceptionMsg = exceptionMsg;
}
public String getExceptionMsg(){
return this.exceptionMsg;
}
public void setExceptionMsg(String exceptionMsg) {
this.exceptionMsg = exceptionMsg;
}
}
copyright © I-Admin
Spring Exception Handling cont…
 StudentController.java
@Controller
public class StudentController {
@RequestMapping(value = "/student", method = RequestMethod.GET)
public ModelAndView student() {
return new ModelAndView("student", "command", new Student());
}
@RequestMapping(value = "/addStudent", method = RequestMethod.POST)
@ExceptionHandler({SpringException.class})
public String addStudent( @ModelAttribute("HelloWeb")Student student, ModelMap model) {
if(student.getName().length() < 5 ){
throw new SpringException("Given name is too short");
}else{
model.addAttribute("name", student.getName());
}
if( student.getAge() < 10 ){
throw new SpringException("Given age is too low");
}else{
model.addAttribute("age", student.getAge());
}
model.addAttribute("id", student.getId());
return "result";
}
}
copyright © I-Admin
Spring Exception Handling cont…
 web.xml
<display-name>Spring Exception Handling</display-name>
<servlet>
<servlet-name>Spring</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Spring</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
copyright © I-Admin
Spring Exception Handling cont…
 Spring-servlet.xml
<context:component-scan base-package="com.tutorialspoint" />
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
<bean class="org.springframework.web.servlet.handler.
SimpleMappingExceptionResolver">
<property name="exceptionMappings">
<props>
<prop key="com.iadmin.SpringException">
ExceptionPage
</prop>
</props>
</property>
<property name="defaultErrorView" value="error"/>
</bean>
copyright © I-Admin
Spring Exception Handling cont…
 student.jsp
<form:form method="POST" action="/HelloWeb/addStudent">
<table>
<tr> <td>
<form:label path="name">Name</form:label>
</td> <td>
<form:input path="name" />
</td> </tr> <tr> <td>
<form:label path="age">Age</form:label>
</td> <td>
<form:input path="age" />
</td> </tr> <tr> <td>
<form:label path="id">id</form:label>
</td> <td>
<form:input path="id" />
</td> </tr> <tr>
<td colspan="2"> <input type="submit" value="Submit"/>
</td> </tr>
</table>
</form:form>
copyright © I-Admin
Spring Exception Handling cont…
 Other type of exception, generic view error will take
place
 error.jsp
<html>
<head>
<title>Spring Error Page</title>
</head>
<body>
<p>An error occured, please contact webmaster.</p>
</body>
</html>
copyright © I-Admin
Spring Exception Handling cont…
 ExceptionPage.jsp
 ExceptionPage as an exception view in case SpringException occurs
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<html>
<head>
<title>Spring MVC Exception Handling</title>
</head>
<body>
<h2>Spring MVC Exception Handling</h2>
<h3>${exception.exceptionMsg}</h3>
</body>
</html>
copyright © I-Admin
Spring Exception Handling cont…
 result.jsp
<h2>Submitted Student Information</h2>
<table>
<tr>
<td>Name</td>
<td>${name}</td>
</tr> <tr>
<td>Age</td>
<td>${age}</td>
</tr> <tr>
<td>ID</td> <td>${id}</td>
</tr>
</table>
copyright © I-Admin
Spring Exception Handling cont…
 List of Spring and other libraries to be included in
your web application in WebContent/WEB-
INF/lib folder
– commons-logging-x.y.z.jar
– org.springframework.asm-x.y.z.jar
– org.springframework.beans-x.y.z.jar
– org.springframework.context-x.y.z.jar
– org.springframework.core-x.y.z.jar
– org.springframework.expression-x.y.z.jar
– org.springframework.web.servlet-x.y.z.jar
– org.springframework.web-x.y.z.jar
– spring-web.jar
copyright © I-Admin
Questions
Thank You
ravikant.soni@i-admin.com

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Spring 3.x - Spring MVC
Spring 3.x - Spring MVCSpring 3.x - Spring MVC
Spring 3.x - Spring MVC
 
Introduction to Spring MVC
Introduction to Spring MVCIntroduction to Spring MVC
Introduction to Spring MVC
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892
 
Jsf intro
Jsf introJsf intro
Jsf intro
 
SpringMVC
SpringMVCSpringMVC
SpringMVC
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Annotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVCAnnotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVC
 
A Complete Tour of JSF 2
A Complete Tour of JSF 2A Complete Tour of JSF 2
A Complete Tour of JSF 2
 
Struts Introduction Course
Struts Introduction CourseStruts Introduction Course
Struts Introduction Course
 
Spring MVC Annotations
Spring MVC AnnotationsSpring MVC Annotations
Spring MVC Annotations
 
Jinal desai .net
Jinal desai .netJinal desai .net
Jinal desai .net
 
Spring mvc 2.0
Spring mvc 2.0Spring mvc 2.0
Spring mvc 2.0
 
Java Server Faces (JSF) - advanced
Java Server Faces (JSF) - advancedJava Server Faces (JSF) - advanced
Java Server Faces (JSF) - advanced
 
Spring MVC 5 & Hibernate 5 Integration
Spring MVC 5 & Hibernate 5 IntegrationSpring MVC 5 & Hibernate 5 Integration
Spring MVC 5 & Hibernate 5 Integration
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
Jsf
JsfJsf
Jsf
 
Sun JSF Presentation
Sun JSF PresentationSun JSF Presentation
Sun JSF Presentation
 
Introduction to jsf 2
Introduction to jsf 2Introduction to jsf 2
Introduction to jsf 2
 
Java server faces
Java server facesJava server faces
Java server faces
 

Destacado

портфоліо на мк 2013 [автосохраненный] готовий
портфоліо  на мк 2013 [автосохраненный] готовийпортфоліо  на мк 2013 [автосохраненный] готовий
портфоліо на мк 2013 [автосохраненный] готовийles1812
 
Курсовая Сланова Н.
Курсовая Сланова Н.Курсовая Сланова Н.
Курсовая Сланова Н.Socreklamanalytics
 
Диплом Никифорова А.
Диплом Никифорова А.Диплом Никифорова А.
Диплом Никифорова А.Socreklamanalytics
 
Padur flower presentation sujitha
Padur   flower presentation sujithaPadur   flower presentation sujitha
Padur flower presentation sujithasujiswetha65
 
Совершенствование методов фестивальной оценки рекламной деятельности (на при...
Совершенствование методов фестивальной оценки рекламной деятельности  (на при...Совершенствование методов фестивальной оценки рекламной деятельности  (на при...
Совершенствование методов фестивальной оценки рекламной деятельности (на при...Socreklamanalytics
 
Курсовая Хананушан Н.
Курсовая Хананушан Н.Курсовая Хананушан Н.
Курсовая Хананушан Н.Socreklamanalytics
 
Caring for your election candidates
Caring for your election candidatesCaring for your election candidates
Caring for your election candidatesJo Walters
 
Padur flower presentation sujitha
Padur   flower presentation sujithaPadur   flower presentation sujitha
Padur flower presentation sujithasujiswetha65
 
Диплом Пакалина Ю.
Диплом Пакалина Ю.Диплом Пакалина Ю.
Диплом Пакалина Ю.Socreklamanalytics
 
Zed ria presentation
Zed ria presentationZed ria presentation
Zed ria presentationsujiswetha65
 

Destacado (17)

портфоліо на мк 2013 [автосохраненный] готовий
портфоліо  на мк 2013 [автосохраненный] готовийпортфоліо  на мк 2013 [автосохраненный] готовий
портфоліо на мк 2013 [автосохраненный] готовий
 
Junit
JunitJunit
Junit
 
Курсовая Сланова Н.
Курсовая Сланова Н.Курсовая Сланова Н.
Курсовая Сланова Н.
 
Диплом Никифорова А.
Диплом Никифорова А.Диплом Никифорова А.
Диплом Никифорова А.
 
Padur flower presentation sujitha
Padur   flower presentation sujithaPadur   flower presentation sujitha
Padur flower presentation sujitha
 
Pp pidato
Pp pidatoPp pidato
Pp pidato
 
Gui automation framework
Gui automation frameworkGui automation framework
Gui automation framework
 
Pp pidato
Pp pidatoPp pidato
Pp pidato
 
Matilla Portfolio
Matilla PortfolioMatilla Portfolio
Matilla Portfolio
 
Совершенствование методов фестивальной оценки рекламной деятельности (на при...
Совершенствование методов фестивальной оценки рекламной деятельности  (на при...Совершенствование методов фестивальной оценки рекламной деятельности  (на при...
Совершенствование методов фестивальной оценки рекламной деятельности (на при...
 
Курсовая Хананушан Н.
Курсовая Хананушан Н.Курсовая Хананушан Н.
Курсовая Хананушан Н.
 
Oktaviani sari
Oktaviani sariOktaviani sari
Oktaviani sari
 
Caring for your election candidates
Caring for your election candidatesCaring for your election candidates
Caring for your election candidates
 
Padur flower presentation sujitha
Padur   flower presentation sujithaPadur   flower presentation sujitha
Padur flower presentation sujitha
 
Диплом Пакалина Ю.
Диплом Пакалина Ю.Диплом Пакалина Ю.
Диплом Пакалина Ю.
 
Zed ria presentation
Zed ria presentationZed ria presentation
Zed ria presentation
 
Диплом Ярош А.
Диплом Ярош А.Диплом Ярош А.
Диплом Ярош А.
 

Similar a Spring MVC 3.0 Framework (sesson_2)

Similar a Spring MVC 3.0 Framework (sesson_2) (20)

Jsf
JsfJsf
Jsf
 
[Laptrinh.vn] lap trinh Spring Framework 3
[Laptrinh.vn] lap trinh Spring Framework 3[Laptrinh.vn] lap trinh Spring Framework 3
[Laptrinh.vn] lap trinh Spring Framework 3
 
Organize directories for applications with front-end and back-end with yii - ...
Organize directories for applications with front-end and back-end with yii - ...Organize directories for applications with front-end and back-end with yii - ...
Organize directories for applications with front-end and back-end with yii - ...
 
Laravel 8 export data as excel file with example
Laravel 8 export data as excel file with exampleLaravel 8 export data as excel file with example
Laravel 8 export data as excel file with example
 
Mvc in symfony
Mvc in symfonyMvc in symfony
Mvc in symfony
 
Creating web form
Creating web formCreating web form
Creating web form
 
Creating web form
Creating web formCreating web form
Creating web form
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1
 
ASP.NET - Web Programming
ASP.NET - Web ProgrammingASP.NET - Web Programming
ASP.NET - Web Programming
 
A View about ASP .NET and their objectives
A View about ASP .NET and their objectivesA View about ASP .NET and their objectives
A View about ASP .NET and their objectives
 
Ibm
IbmIbm
Ibm
 
Toms introtospring mvc
Toms introtospring mvcToms introtospring mvc
Toms introtospring mvc
 
Asp.net By Durgesh Singh
Asp.net By Durgesh SinghAsp.net By Durgesh Singh
Asp.net By Durgesh Singh
 
Asp.net
Asp.netAsp.net
Asp.net
 
Asp
AspAsp
Asp
 
The Rails Way
The Rails WayThe Rails Way
The Rails Way
 
Templates
TemplatesTemplates
Templates
 
.Net course-in-mumbai-ppt
.Net course-in-mumbai-ppt.Net course-in-mumbai-ppt
.Net course-in-mumbai-ppt
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with Maven
 
Spring-training-in-bangalore
Spring-training-in-bangaloreSpring-training-in-bangalore
Spring-training-in-bangalore
 

Último

Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.EnglishCEIPdeSigeiro
 
Over the counter (OTC)- Sale, rational use.pptx
Over the counter (OTC)- Sale, rational use.pptxOver the counter (OTC)- Sale, rational use.pptx
Over the counter (OTC)- Sale, rational use.pptxraviapr7
 
How to Manage Cross-Selling in Odoo 17 Sales
How to Manage Cross-Selling in Odoo 17 SalesHow to Manage Cross-Selling in Odoo 17 Sales
How to Manage Cross-Selling in Odoo 17 SalesCeline George
 
Vani Magazine - Quarterly Magazine of Seshadripuram Educational Trust
Vani Magazine - Quarterly Magazine of Seshadripuram Educational TrustVani Magazine - Quarterly Magazine of Seshadripuram Educational Trust
Vani Magazine - Quarterly Magazine of Seshadripuram Educational TrustSavipriya Raghavendra
 
3.26.24 Race, the Draft, and the Vietnam War.pptx
3.26.24 Race, the Draft, and the Vietnam War.pptx3.26.24 Race, the Draft, and the Vietnam War.pptx
3.26.24 Race, the Draft, and the Vietnam War.pptxmary850239
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.raviapr7
 
Optical Fibre and It's Applications.pptx
Optical Fibre and It's Applications.pptxOptical Fibre and It's Applications.pptx
Optical Fibre and It's Applications.pptxPurva Nikam
 
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...Nguyen Thanh Tu Collection
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...CaraSkikne1
 
How to Solve Singleton Error in the Odoo 17
How to Solve Singleton Error in the  Odoo 17How to Solve Singleton Error in the  Odoo 17
How to Solve Singleton Error in the Odoo 17Celine George
 
Riddhi Kevadiya. WILLIAM SHAKESPEARE....
Riddhi Kevadiya. WILLIAM SHAKESPEARE....Riddhi Kevadiya. WILLIAM SHAKESPEARE....
Riddhi Kevadiya. WILLIAM SHAKESPEARE....Riddhi Kevadiya
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17Celine George
 
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptxSandy Millin
 
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRADUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRATanmoy Mishra
 
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptxraviapr7
 
EBUS5423 Data Analytics and Reporting Bl
EBUS5423 Data Analytics and Reporting BlEBUS5423 Data Analytics and Reporting Bl
EBUS5423 Data Analytics and Reporting BlDr. Bruce A. Johnson
 
In - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxIn - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxAditiChauhan701637
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxraviapr7
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapitolTechU
 

Último (20)

Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.
 
Over the counter (OTC)- Sale, rational use.pptx
Over the counter (OTC)- Sale, rational use.pptxOver the counter (OTC)- Sale, rational use.pptx
Over the counter (OTC)- Sale, rational use.pptx
 
How to Manage Cross-Selling in Odoo 17 Sales
How to Manage Cross-Selling in Odoo 17 SalesHow to Manage Cross-Selling in Odoo 17 Sales
How to Manage Cross-Selling in Odoo 17 Sales
 
Vani Magazine - Quarterly Magazine of Seshadripuram Educational Trust
Vani Magazine - Quarterly Magazine of Seshadripuram Educational TrustVani Magazine - Quarterly Magazine of Seshadripuram Educational Trust
Vani Magazine - Quarterly Magazine of Seshadripuram Educational Trust
 
3.26.24 Race, the Draft, and the Vietnam War.pptx
3.26.24 Race, the Draft, and the Vietnam War.pptx3.26.24 Race, the Draft, and the Vietnam War.pptx
3.26.24 Race, the Draft, and the Vietnam War.pptx
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.
 
Optical Fibre and It's Applications.pptx
Optical Fibre and It's Applications.pptxOptical Fibre and It's Applications.pptx
Optical Fibre and It's Applications.pptx
 
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...
 
How to Solve Singleton Error in the Odoo 17
How to Solve Singleton Error in the  Odoo 17How to Solve Singleton Error in the  Odoo 17
How to Solve Singleton Error in the Odoo 17
 
Riddhi Kevadiya. WILLIAM SHAKESPEARE....
Riddhi Kevadiya. WILLIAM SHAKESPEARE....Riddhi Kevadiya. WILLIAM SHAKESPEARE....
Riddhi Kevadiya. WILLIAM SHAKESPEARE....
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17
 
March 2024 Directors Meeting, Division of Student Affairs and Academic Support
March 2024 Directors Meeting, Division of Student Affairs and Academic SupportMarch 2024 Directors Meeting, Division of Student Affairs and Academic Support
March 2024 Directors Meeting, Division of Student Affairs and Academic Support
 
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
 
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRADUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
 
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
 
EBUS5423 Data Analytics and Reporting Bl
EBUS5423 Data Analytics and Reporting BlEBUS5423 Data Analytics and Reporting Bl
EBUS5423 Data Analytics and Reporting Bl
 
In - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxIn - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptx
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptx
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptx
 

Spring MVC 3.0 Framework (sesson_2)

  • 1. copyright © I-Admin Spring Framework 3.0 MVC Prepared By: Ravi Kant Soni Sr. Software Engineer | ADS-Bangalore session - 2
  • 2. copyright © I-Admin Objectives  Demonstrate Spring MVC with Examples – Spring MVC Form Handling Example – Spring Page Redirection Example – Spring Static pages Example – Spring Exception Handling Example
  • 3. copyright © I-Admin Spring MVC Form Handling Example  To develop a Dynamic Form based Web Application using Spring MVC Framework
  • 4. copyright © I-Admin Spring MVC Form Handling cont…  Steps – Create a Dynamic Web Project – Add Spring and other libraries into the folder WebContent/WEB-INF/lib – Create a Java classes Student and StudentController – Create Spring configuration files Web.xml and Spring- servlet.xml under the WebContent/WEB-INF folder – Create a sub-folder with a name jsp under the WebContent/WEB-INF folder. Create a view files student.jsp and result.jsp under this sub-folder
  • 5. copyright © I-Admin Spring MVC Form Handling cont…  Student.java public class Student { private Integer age; private String name; private Integer id; public getter() & setter()…….. }
  • 6. copyright © I-Admin Spring MVC Form Handling cont…  StudentController.java @Controller public class StudentController { @RequestMapping(value = "/student", method = RequestMethod.GET) public String student(ModelMap model) { model.addAttribute( "command", new Student()); return “student”; } @RequestMapping(value = "/addStudent", method = RequestMethod.POST) public String addStudent(@ModelAttribute("SpringWeb") Student student, ModelMap model) { model.addAttribute("name", student.getName()); model.addAttribute("age", student.getAge()); model.addAttribute("id", student.getId()); return "result"; } }
  • 7. copyright © I-Admin Spring MVC Form Handling cont…  web.xml <display-name>Spring MVC Form Handling</display-name> <servlet> <servlet-name>Spring</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Spring</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
  • 8. copyright © I-Admin Spring MVC Form Handling cont…  Spring-servlet.xml <beans ……..> <context:component-scan base-package="com.tutorialspoint" /> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/jsp/" /> <property name="suffix" value=".jsp" /> </bean> </beans>
  • 9. copyright © I-Admin Spring MVC Form Handling cont…  student.jsp <%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%> <html> <head> <title>Spring MVC Form Handling</title> </head> <body> <h2>Student Information</h2> <form:form method="POST" action="/HelloWeb/addStudent"> <table> <tr> <td><form:label path="name">Name</form:label></td> <td><form:input path="name" /></td> </tr> <tr> <td><form:label path="age">Age</form:label></td> <td><form:input path="age" /></td> </tr> <tr> <td><form:label path="id">id</form:label></td><td><form:input path="id" /></td> </tr> <tr> <td colspan="2"> <input type="submit" value="Submit"/> </td> </tr> </table> </form:form> </body> </html>
  • 10. copyright © I-Admin Spring MVC Form Handling cont…  result.jsp <%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%> <html> <head> <title>Spring MVC Form Handling</title> </head> <body> <h2>Submitted Student Information</h2> <table> <tr> <td>Name</td> <td>${name}</td> </tr> <tr> <td>Age</td> <td>${age}</td> </tr> <tr> <td>ID</td> <td>${id}</td> </tr> </table> </body> </html>
  • 11. copyright © I-Admin Spring MVC Form Handling cont…  List of Spring and other libraries to be included in your web application in WebContent/WEB-INF/lib folder – commons-logging-x.y.z.jar – org.springframework.asm-x.y.z.jar – org.springframework.beans-x.y.z.jar – org.springframework.context-x.y.z.jar – org.springframework.core-x.y.z.jar – org.springframework.expression-x.y.z.jar – org.springframework.web.servlet-x.y.z.jar – org.springframework.web-x.y.z.jar – spring-web.jar
  • 12. copyright © I-Admin Spring Page Redirection Example  redirect to transfer a http request to another page
  • 13. copyright © I-Admin Spring Page Redirection cont…  Steps: – Create a Dynamic Web Project – Add Spring and other libraries into the folder WebContent/WEB-INF/lib – Create a Java class WebController – Create Spring configuration files Web.xml and Spring- servlet.xml under theWebContent/WEB-INF folder – Create a sub-folder with a name jsp under the WebContent/WEB-INF folder
  • 14. copyright © I-Admin Spring Page Redirection cont…  WebController.java @Controller public class WebController { @RequestMapping(value = "/index", method = RequestMethod.GET) public String index() { return "index"; } @RequestMapping(value = "/redirect", method =RequestMethod.GET) public String redirect() { return "redirect:finalPage"; } @RequestMapping(value = "/finalPage", method = RequestMethod.GET) public String finalPage() { return "final"; } }
  • 15. copyright © I-Admin Spring Page Redirection cont…  web.xml <display-name>Spring Page Redirection</display-name> <servlet> <servlet-name>Spring</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Spring</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
  • 16. copyright © I-Admin Spring Page Redirection cont…  Spring-servlet.xml <context:component-scan base-package="com.tutorialspoint" /> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/jsp/" /> <property name="suffix" value=".jsp" /> </bean>
  • 17. copyright © I-Admin Spring Page Redirection cont…  index.jsp  <%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>  Spring Form: <form:form method="GET" action="/HelloWeb/redirect"> <table> <tr> <td> <input type="submit" value="Redirect Page"/> </td> </tr> </table> </form:form>
  • 18. copyright © I-Admin Spring Page Redirection cont…  final.jsp <%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%> <html> <head> <title>Spring Page Redirection</title> </head> <body> <h2>Redirected Page</h2> </body> </html>
  • 19. copyright © I-Admin Spring Page Redirection cont…  List of Spring and other libraries to be included in your web application in WebContent/WEB- INF/lib folder – commons-logging-x.y.z.jar – org.springframework.asm-x.y.z.jar – org.springframework.beans-x.y.z.jar – org.springframework.context-x.y.z.jar – org.springframework.core-x.y.z.jar – org.springframework.expression-x.y.z.jar – org.springframework.web.servlet-x.y.z.jar – org.springframework.web-x.y.z.jar – spring-web.jar
  • 20. copyright © I-Admin Spring Static pages Example  Access static pages along with dynamic pages with the help of <mvc:resources> tag
  • 21. copyright © I-Admin Spring Static pages cont…  Steps – Create a Dynamic Web Project – Add Spring and other libraries into the folder WebContent/WEB-INF/lib – Create a Java class WebController – Create Spring configuration files Web.xml and Spring- servlet.xml under theWebContent/WEB-INF folder – Create a sub-folder with a name jsp under the WebContent/WEB-INF folder – Create a sub-folder with a name pages under the WebContent/WEB-INF folder. Create a static file final.htm under this sub-folder
  • 22. copyright © I-Admin Spring Static pages cont…  WebController.java @Controller public class WebController { @RequestMapping(value = "/index", method = RequestMethod.GET) public String index() { return "index"; } @RequestMapping(value = "/staticPage", method = RequestMethod.GET) public String redirect() { return "redirect:/pages/final.htm"; } }
  • 23. copyright © I-Admin Spring Static pages cont…  web.xml <display-name>Spring Page Redirection</display-name> <servlet> <servlet-name>Spring</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Spring</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
  • 24. copyright © I-Admin Spring Static pages cont…  Spring-servlet.xml  <mvc:resources..../> tag is being used to map static pages  Static pages including images, style sheets, JavaScript, and other static content  Multiple resource locations may be specified using a comma-separated list of values <context:component-scan base-package="com.tutorialspoint" /> <mvc:annotation-driven/> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/jsp/" /> <property name="suffix" value=".jsp" /> </bean> <mvc:resources mapping="/pages/**" location="/WEB-INF/pages/" />
  • 25. copyright © I-Admin Spring Static pages cont…  index.jsp  <%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%> <p>Click below button to get a simple HTML page</p> <form:form method="GET" action="/HelloWeb/staticPage"> <table> <tr> <td> <input type="submit" value="Get HTML Page"/> </td> </tr> </table> </form:form>
  • 26. copyright © I-Admin Spring Static pages cont…  WEB-INF/pages/final.htm <html> <head> <title>Spring Static Page</title> </head> <body> <h2>A simple HTML page</h2> </body> </html>
  • 27. copyright © I-Admin Spring Static pages cont…  List of Spring and other libraries to be included in your web application in WebContent/WEB- INF/lib folder – commons-logging-x.y.z.jar – org.springframework.asm-x.y.z.jar – org.springframework.beans-x.y.z.jar – org.springframework.context-x.y.z.jar – org.springframework.core-x.y.z.jar – org.springframework.expression-x.y.z.jar – org.springframework.web.servlet-x.y.z.jar – org.springframework.web-x.y.z.jar – spring-web.jar
  • 28. copyright © I-Admin Spring Exception Handling Example  Simple web based application using Spring MVC Framework, which can handle one or more exceptions raised inside its controllers
  • 29. copyright © I-Admin Spring Exception Handling cont…  Steps: – Create a Dynamic Web Project – Add Spring and other libraries into the folder WebContent/WEB- INF/lib – Create a Java classes Student, StudentController and SpringException – Create Spring configuration files Web.xml and Spring- servlet.xml under theWebContent/WEB-INF folder – Create a sub-folder with a name jsp under the WebContent/WEB- INF folder. Create a view files  student.jsp  result.jsp  error.jsp  ExceptionPage.jsp
  • 30. copyright © I-Admin Spring Exception Handling cont…  Student.java public class Student { private Integer age; private String name; private Integer id; public getter() & setter()…….. }
  • 31. copyright © I-Admin Spring Exception Handling cont…  SpringException.java public class SpringException extends RuntimeException{ private String exceptionMsg; public SpringException(String exceptionMsg) { this.exceptionMsg = exceptionMsg; } public String getExceptionMsg(){ return this.exceptionMsg; } public void setExceptionMsg(String exceptionMsg) { this.exceptionMsg = exceptionMsg; } }
  • 32. copyright © I-Admin Spring Exception Handling cont…  StudentController.java @Controller public class StudentController { @RequestMapping(value = "/student", method = RequestMethod.GET) public ModelAndView student() { return new ModelAndView("student", "command", new Student()); } @RequestMapping(value = "/addStudent", method = RequestMethod.POST) @ExceptionHandler({SpringException.class}) public String addStudent( @ModelAttribute("HelloWeb")Student student, ModelMap model) { if(student.getName().length() < 5 ){ throw new SpringException("Given name is too short"); }else{ model.addAttribute("name", student.getName()); } if( student.getAge() < 10 ){ throw new SpringException("Given age is too low"); }else{ model.addAttribute("age", student.getAge()); } model.addAttribute("id", student.getId()); return "result"; } }
  • 33. copyright © I-Admin Spring Exception Handling cont…  web.xml <display-name>Spring Exception Handling</display-name> <servlet> <servlet-name>Spring</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Spring</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
  • 34. copyright © I-Admin Spring Exception Handling cont…  Spring-servlet.xml <context:component-scan base-package="com.tutorialspoint" /> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/jsp/" /> <property name="suffix" value=".jsp" /> </bean> <bean class="org.springframework.web.servlet.handler. SimpleMappingExceptionResolver"> <property name="exceptionMappings"> <props> <prop key="com.iadmin.SpringException"> ExceptionPage </prop> </props> </property> <property name="defaultErrorView" value="error"/> </bean>
  • 35. copyright © I-Admin Spring Exception Handling cont…  student.jsp <form:form method="POST" action="/HelloWeb/addStudent"> <table> <tr> <td> <form:label path="name">Name</form:label> </td> <td> <form:input path="name" /> </td> </tr> <tr> <td> <form:label path="age">Age</form:label> </td> <td> <form:input path="age" /> </td> </tr> <tr> <td> <form:label path="id">id</form:label> </td> <td> <form:input path="id" /> </td> </tr> <tr> <td colspan="2"> <input type="submit" value="Submit"/> </td> </tr> </table> </form:form>
  • 36. copyright © I-Admin Spring Exception Handling cont…  Other type of exception, generic view error will take place  error.jsp <html> <head> <title>Spring Error Page</title> </head> <body> <p>An error occured, please contact webmaster.</p> </body> </html>
  • 37. copyright © I-Admin Spring Exception Handling cont…  ExceptionPage.jsp  ExceptionPage as an exception view in case SpringException occurs <%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%> <html> <head> <title>Spring MVC Exception Handling</title> </head> <body> <h2>Spring MVC Exception Handling</h2> <h3>${exception.exceptionMsg}</h3> </body> </html>
  • 38. copyright © I-Admin Spring Exception Handling cont…  result.jsp <h2>Submitted Student Information</h2> <table> <tr> <td>Name</td> <td>${name}</td> </tr> <tr> <td>Age</td> <td>${age}</td> </tr> <tr> <td>ID</td> <td>${id}</td> </tr> </table>
  • 39. copyright © I-Admin Spring Exception Handling cont…  List of Spring and other libraries to be included in your web application in WebContent/WEB- INF/lib folder – commons-logging-x.y.z.jar – org.springframework.asm-x.y.z.jar – org.springframework.beans-x.y.z.jar – org.springframework.context-x.y.z.jar – org.springframework.core-x.y.z.jar – org.springframework.expression-x.y.z.jar – org.springframework.web.servlet-x.y.z.jar – org.springframework.web-x.y.z.jar – spring-web.jar
  • 40. copyright © I-Admin Questions Thank You ravikant.soni@i-admin.com