SlideShare a Scribd company logo
1 of 100
Spring Portlet MVC Seminar ,[object Object],[object Object],[object Object],[object Object],[object Object],© Copyright Unicon, Inc., 2009.  Some rights reserved.  This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License. To view a copy of this license, visit  http://creativecommons.org/licenses/by-nc-sa/3.0/us/
Speaker Background ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Portlet Review ,[object Object]
Diagram from Java ™  Portlet Specification, Version 2.0
Java Portlet Standards ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Portlets and Servlets ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Multiple Request Phases ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Diagram from Java ™  Portlet Specification, Version 2.0
Portlet Modes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Portlet Window States ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Portlet URL Handling ,[object Object],[object Object],[object Object],[object Object],[object Object]
Spring Review ,[object Object]
What Is Spring? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Diagram from Spring Framework Reference Documentation
Dependency Injection ,[object Object],[object Object]
Diagram from Spring Framework Reference Documentation
Spring Beans ,[object Object],[object Object],[object Object],[object Object],[object Object]
Spring Bean Definition ,[object Object],<beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;...> <bean id=“logger” class=“com.logging.StandardOutLogger”/> <bean id=“doIt” class=“com.do.DoIt”> <property name=“log”> <ref local=“logger”/> </property> </bean> </beans>
The Spring MVC Framework ,[object Object]
Using A Framework ,[object Object],[object Object],[object Object],[object Object]
Spring MVC ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Dispatcher (Servlet/Portlet) Request Handler Mapping View Resolver Response Controller View ModelAndView Map (Model) viewName
Spring Views ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Spring Controllers ,[object Object],[object Object],[object Object],[object Object]
Other MVC Features ,[object Object],[object Object],[object Object],[object Object],[object Object]
Spring Web MVC Resources ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Spring Portlet MVC Resources ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Configuring Spring Portlet MVC ,[object Object]
web.xml: ContextLoaderLister ,[object Object],[object Object],<listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> No different from Servlet Spring Web MVC
web.xml: contextConfigLocation ,[object Object],<context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/service-context.xml /WEB-INF/data-context.xml </param-value> </context-param> No different from Servlet Spring Web MVC
web.xml: ViewRendererServlet ,[object Object],<servlet> <servlet-name>view-servlet</servlet-name> <servlet-class> org.springframework.web.servlet.ViewRendererServlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>view-servlet</servlet-name> <url-pattern>/WEB-INF/servlet/view</url-pattern> </servlet-mapping>
ViewRendererServlet ,[object Object],[object Object],[object Object],[object Object]
portlet.xml <portlet> <portlet-name>example</portlet-name> <portlet-class> o rg.springframework.web.portlet.DispatcherPortlet </portlet-class> <init-param> <name> contextConfigLocation </name> <value> /WEB-INF/context/example-portlet.xml </value> </init-param> <supports> <mime-type>text/html</mime-type> <portlet-mode>view</portlet-mode> <portlet-mode>edit</portlet-mode> <portlet-mode>help</portlet-mode> </supports> <portlet-info> <title>Example Portlet</title> </portlet-info> </portlet>
DispatcherPortlet ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sample Portlet Application ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
View Resolver &  Exception Resolver ,[object Object]
Resolving Views ,[object Object],<bean id=&quot;viewResolver&quot; class=&quot;org.springframework.web.servlet.view. InternalResourceViewResolver&quot;> <property name=&quot;cache&quot; value=&quot;false&quot; /> <property name=&quot;viewClass&quot; value=&quot;org.springframework.web.servlet.view.JstlView&quot; /> <property name=&quot;prefix&quot; value=&quot;/WEB-INF/jsp/&quot; /> <property name=&quot;suffix&quot; value=&quot;.jsp&quot; /> </bean> Can be shared between multiple portlets & servlets
Map  Exceptions  to  View Names  (used by View Resolver) <bean id=&quot;exceptionResolver&quot; class=&quot;org.springframework.web.portlet.handler. SimpleMappingExceptionResolver&quot;> <property name=&quot;defaultErrorView&quot; value=&quot;error&quot;/> <property name=&quot;exceptionMappings&quot;> <value> javax.portlet.PortletSecurityException=unauthorized javax.portlet.UnavailableException=unavailable </value> </property> </bean> Resolving Exceptions ,[object Object]
More on Resolvers ,[object Object],[object Object],[object Object]
Resolver Example ,[object Object],[object Object],[object Object]
Internationalization & Localization ,[object Object]
Internationalization ,[object Object],button.home = Home button.edit = Edit button.next = Next button.previous = Previous button.finish = Finish button.cancel = Cancel exception.notAuthorized.title = Access Not Permitted exception.notAuthorized.message = You do not have permission to access this area.
MessageSource ,[object Object],<bean id=&quot;messageSource&quot; class=&quot;org.springframework.context.support. ResourceBundleMessageSource&quot;> <property name=&quot;basenames&quot;> <list> <value>messages</value> </list> </property> </bean>
Using Messages in Views ,[object Object],[object Object],<%@ taglib prefix=&quot;spring&quot; uri=&quot;http://www.springframework.org/tags&quot; %> ... <p><spring:message code=&quot;exception.contactAdmin&quot;/></p>
Localization ,[object Object],[object Object],[object Object],[object Object],[object Object]
I18n & L10n Sample ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Handler Mapping ,[object Object]
Annotation-Based HandlerMapping <context:annotation-config/> <bean class=&quot;org.springframework.web.portlet.mvc. annotation.DefaultAnnotationHandlerMapping&quot;/> <bean class=&quot; org.sample.MyView Controller&quot;/> <bean class=&quot;org.sample.MyEditController&quot;/> <bean class=&quot;org.sample.MyHelpController&quot;/>
Interface-Based HandlerMappings ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],These will be deprecated in Spring 3.0 because the Annotation-Based HandlerMapping is now preferred
PortletModeHandlerMapping <bean id=&quot;portletModeHandlerMapping&quot; class=&quot;org.springframework.web.portlet.handler. PortletModeHandlerMapping&quot;> <property name=&quot;portletModeMap&quot;> <map> <entry key=&quot;view&quot; value-ref=&quot;viewController&quot;/> <entry key=&quot;edit&quot; value-ref=&quot;editController&quot;/> <entry key=&quot;help&quot; value-ref=&quot;helpController&quot;/> </map> </property> </bean> <bean id=&quot;viewController&quot; class=&quot;ViewController&quot;/> ...
ParameterHandlerMapping ,[object Object],<bean id=&quot;handlerMapping“ class=&quot;org.springframework.web.portlet.handler. ParameterHandlerMapping&quot;> <property name=&quot;parameterMap&quot;> <map> <entry key=&quot;add&quot; value-ref=&quot;addHandler&quot;/> <entry key=&quot;remove&quot; value-ref=&quot;removeHandler&quot;/> </map> </property> </bean>
PortletModeParameterHandlerMapping <bean id=&quot;handlerMapping&quot; class=&quot;…PortletModeParameterHandlerMapping&quot;>  <property name=&quot;portletModeParameterMap&quot;> <map> <entry key=&quot;view&quot;> <map> <entry key=&quot;add&quot; value-ref=&quot;addHandler&quot;/> <entry key=&quot;remove&quot; value-ref=&quot;removeHandler&quot;/> </map> </entry> <entry key=&quot;edit&quot;> <map> <entry key=&quot;prefs” value-ref=&quot;prefsHandler&quot;/> </map> </entry> </map> </property> </bean>
More on  HandlerMapping ,[object Object],[object Object]
Mapping and Portlet Lifecycle ,[object Object],[object Object],[object Object]
Handler Mapping Sample ,[object Object],[object Object]
Annotation-Based Controllers ,[object Object]
Annotation-Based Controllers ,[object Object],[object Object],[object Object],[object Object]
Annotation-Based Controller Beans <context:annotation-config/> <bean class=&quot;org.springframework.web.portlet.mvc. annotation.DefaultAnnotationHandlerMapping&quot;/> <bean class=&quot;org.sample.MyViewController&quot;/> <bean class=&quot;org.sample.MyEditController&quot;/> <bean class=&quot;org.sample.MyHelpController&quot;/>
Spring MVC Controller Annotations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Annotation-Based Controller Examples @Controller @RequestMapping(&quot;VIEW&quot;) @SessionAttributes(&quot;item&quot;) public class  MyViewController  { @RequestMapping public String listItems(Model model) { model.addAttribute(&quot;items&quot;,  this.itemService.getAllItems()); return &quot;itemList&quot;; } @RequestMapping(params=&quot;action=view&quot;) public String viewPet( @RequestParam(&quot;item&quot;)  int itemId, Model model) { model.addAttribute(&quot;item&quot;, this.itemService.getItem(itemId)); return &quot;itemDetails&quot;; } ...
Annotation-Based Controller Examples ... @ModelAttribute(&quot;dateFormat&quot;) protected String dateFormat(PortletPreferences prefs) { return preferences.getValue(&quot;dateFormat&quot;,  itemService.DEFAULT_DATE_FORMAT); } @InitBinder public void initBinder(PortletRequestDataBinder binder, PortletPreferences preferences) { String format = preferences.getValue(&quot;dateFormat&quot;, ItemService.DEFAULT_DATE_FORMAT); SimpleDateFormat dateFormat =  new SimpleDateFormat(formatString); binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true)); } ...
Annotation-Based Controller Sample ,[object Object],[object Object],[object Object]
Interface-Based Controllers ,[object Object],[object Object]
Interface-Based Controllers ,[object Object],[object Object],[object Object],[object Object],[object Object],These will all be deprecated in Spring 3.0 because the Annotation-Based Controllers are now preferred
The Controller Interface public interface  Controller  { ModelAndView  handleRenderRequest  ( RenderRequest request, RenderResponse response)  throws Exception; void  handleActionRequest  ( ActionRequest request, ActionResponse response)  throws Exception; }
PortletModeNameViewController ,[object Object],[object Object],[object Object]
AbstractController ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Command Controllers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SimpleFormController ,[object Object],[object Object],[object Object],[object Object],[object Object]
SimpleFormController Form ,[object Object],[object Object],[object Object],[object Object],[object Object]
SimpleFormController Submit ,[object Object],[object Object],[object Object],[object Object]
AbstractWizardFormController ,[object Object],[object Object],[object Object],[object Object],[object Object]
More AbstractWizardFormController ,[object Object],[object Object],[object Object],[object Object],[object Object]
Handler Interceptors ,[object Object]
HandlerInterceptor ,[object Object],[object Object],[object Object],[object Object]
HandlerInterceptor Interface public interface  HandlerInterceptor  { boolean  preHandleAction ( ActionRequest request, ActionResponse response, Object handler) throws Exception; void  afterActionCompletion ( ActionRequest request, ActionResponse response, Object handler, Exception ex) throws Exception; boolean  preHandleRender ( RenderRequest request, RenderResponse response, Object handler) throws Exception; void  postHandleRender ( RenderRequest request, RenderResponse response, Object handler, ModelAndView modelAndView) throws Exception; void  afterRenderCompletion ( RenderRequest request, RenderResponse response, Object handler, Exception ex) throws Exception; }
Useful Portlet Interceptors ,[object Object],[object Object]
Configuring Interceptors <context:annotation-config/> <bean id=&quot;parameterMappingInterceptor&quot;  class=&quot;org.springframework.web.portlet.handler. ParameterMappingInterceptor&quot; /> <bean class=&quot;org.springframework.web.portlet.mvc. annotation.DefaultAnnotationHandlerMapping&quot;> <property name=&quot;interceptors&quot;> <bean class=&quot;org.springframework.web.portlet.handler. ParameterMappingInterceptor&quot;/> </property> </bean>
Configuring Interceptors <bean id=&quot;parameterMappingInterceptor&quot;  class=&quot;org.springframework.web.portlet.handler. ParameterMappingInterceptor&quot; /> <bean id=&quot;portletModeParameterHandlerMapping&quot; class=&quot;org.springframework.web.portlet.handler. PortletModeParameterHandlerMapping&quot;> <property name=&quot;interceptors&quot;> <list> <ref bean=&quot;parameterMappingInterceptor&quot;/> </list> </property> <property name=&quot;portletModeParameterMap&quot;> ... </property> </bean>
File Uploads ,[object Object]
Handling File Uploads ,[object Object],[object Object],[object Object],[object Object],[object Object],<bean id=&quot;portletMultipartResolver&quot; class=&quot;org.springframework.web.portlet.multipart. CommonsPortletMultipartResolver&quot;> <property name=&quot;maxUploadSize“ value=“2048”/> </bean>
MultipartResolver Sample ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Redirects ,[object Object]
Performing Redirects ,[object Object],[object Object],[object Object]
Redirect Sample ,[object Object],[object Object],[object Object],[object Object],[object Object]
Portlet 2.0 (JSR 286) Support ,[object Object]
Major Changes in Portlet 2.0 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Portlet 2.0 In Spring 3.0 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Annotations for Portlet 2.0 Support ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Portlet 2.0 Examples @ActionMapping(”delete”) public void deleteItem(...) { ... } @EventMapping(”reload”) public void reloadData(...) { ... } @RenderMapping(&quot;maximized&quot;, params=&quot;action=search&quot;) public String displaySearch(...) { ... } @ResourceMapping(”picklist”) public ModelAndView pickList (...) {...}
Other Things to Look At ,[object Object]
Portlets & Servlets Sharing Session ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Tomcat 5.5.4 + On  <Connector>  element set  emptySessionPath=true
Adapting Other Frameworks ,[object Object],[object Object],[object Object],[object Object],[object Object]
Reuse Existing Portlets ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Spring Security ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Spring Web Flow ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Spring JavaScript ,[object Object],[object Object],[object Object],[object Object],[object Object]
Questions & Answers John A. Lewis Chief Software Architect Unicon, Inc. [email_address] www.unicon.net

More Related Content

What's hot

Best Practices for JSF, Gameduell 2013
Best Practices for JSF, Gameduell 2013Best Practices for JSF, Gameduell 2013
Best Practices for JSF, Gameduell 2013Edward Burns
 
Spring framework-tutorial
Spring framework-tutorialSpring framework-tutorial
Spring framework-tutorialvinayiqbusiness
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework tola99
 
9. java server faces
9. java server faces9. java server faces
9. java server facesAnusAhmad
 
Spring Framework
Spring FrameworkSpring Framework
Spring Frameworknomykk
 
Java server faces
Java server facesJava server faces
Java server facesowli93
 
JSF basics
JSF basicsJSF basics
JSF basicsairbo
 
Spring framework
Spring frameworkSpring framework
Spring frameworkvietduc17
 
Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Arun Gupta
 
Introduction to Ibatis by Rohit
Introduction to Ibatis by RohitIntroduction to Ibatis by Rohit
Introduction to Ibatis by RohitRohit Prabhakar
 

What's hot (20)

Best Practices for JSF, Gameduell 2013
Best Practices for JSF, Gameduell 2013Best Practices for JSF, Gameduell 2013
Best Practices for JSF, Gameduell 2013
 
Spring boot jpa
Spring boot jpaSpring boot jpa
Spring boot jpa
 
Spring framework-tutorial
Spring framework-tutorialSpring framework-tutorial
Spring framework-tutorial
 
Spring Web MVC
Spring Web MVCSpring Web MVC
Spring Web MVC
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
9. java server faces
9. java server faces9. java server faces
9. java server faces
 
Rest web service
Rest web serviceRest web service
Rest web service
 
Introduction to jsf 2
Introduction to jsf 2Introduction to jsf 2
Introduction to jsf 2
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Java spring ppt
Java spring pptJava spring ppt
Java spring ppt
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
JSF 2.2
JSF 2.2JSF 2.2
JSF 2.2
 
Java server faces
Java server facesJava server faces
Java server faces
 
Jsf intro
Jsf introJsf intro
Jsf intro
 
JSF basics
JSF basicsJSF basics
JSF basics
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Introduction to Ibatis by Rohit
Introduction to Ibatis by RohitIntroduction to Ibatis by Rohit
Introduction to Ibatis by Rohit
 
Java Spring Framework
Java Spring FrameworkJava Spring Framework
Java Spring Framework
 

Similar to Sprint Portlet MVC Seminar

Spring Basics
Spring BasicsSpring Basics
Spring BasicsEmprovise
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applicationshchen1
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Tuna Tore
 
springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892Tuna Tore
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksSunil Patil
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworksSunil Patil
 
Introduction to ASP.NET MVC 1.0
Introduction to ASP.NET MVC 1.0Introduction to ASP.NET MVC 1.0
Introduction to ASP.NET MVC 1.0Shiju Varghese
 
ASP.NET MVC - In the Wild
ASP.NET MVC - In the WildASP.NET MVC - In the Wild
ASP.NET MVC - In the WildBrian Boatright
 
Asp.net mvc 5 course module 1 overview
Asp.net mvc 5 course   module 1 overviewAsp.net mvc 5 course   module 1 overview
Asp.net mvc 5 course module 1 overviewSergey Seletsky
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET PresentationRasel Khan
 
Introduction To Mvc
Introduction To MvcIntroduction To Mvc
Introduction To MvcVolkan Uzun
 
Jetspeed-2 Overview
Jetspeed-2 OverviewJetspeed-2 Overview
Jetspeed-2 Overviewbettlebrox
 
Struts & spring framework issues
Struts & spring framework issuesStruts & spring framework issues
Struts & spring framework issuesPrashant Seth
 

Similar to Sprint Portlet MVC Seminar (20)

Spring MVC 5 & Hibernate 5 Integration
Spring MVC 5 & Hibernate 5 IntegrationSpring MVC 5 & Hibernate 5 Integration
Spring MVC 5 & Hibernate 5 Integration
 
MVC
MVCMVC
MVC
 
Spring Basics
Spring BasicsSpring Basics
Spring Basics
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5
 
springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892
 
MVC - Introduction
MVC - IntroductionMVC - Introduction
MVC - Introduction
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
Introduction to ASP.NET MVC 1.0
Introduction to ASP.NET MVC 1.0Introduction to ASP.NET MVC 1.0
Introduction to ASP.NET MVC 1.0
 
ASP.NET MVC - In the Wild
ASP.NET MVC - In the WildASP.NET MVC - In the Wild
ASP.NET MVC - In the Wild
 
Asp.net mvc 5 course module 1 overview
Asp.net mvc 5 course   module 1 overviewAsp.net mvc 5 course   module 1 overview
Asp.net mvc 5 course module 1 overview
 
CAF & Portlet Development Notes
CAF & Portlet Development NotesCAF & Portlet Development Notes
CAF & Portlet Development Notes
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
Introduction To Mvc
Introduction To MvcIntroduction To Mvc
Introduction To Mvc
 
JavaEE6 my way
JavaEE6 my wayJavaEE6 my way
JavaEE6 my way
 
Spring mvc 2.0
Spring mvc 2.0Spring mvc 2.0
Spring mvc 2.0
 
Jetspeed-2 Overview
Jetspeed-2 OverviewJetspeed-2 Overview
Jetspeed-2 Overview
 
Struts & spring framework issues
Struts & spring framework issuesStruts & spring framework issues
Struts & spring framework issues
 

More from John Lewis

Jasig uMobile - Open Source Enterprise Mobile Campus Solution
Jasig uMobile - Open Source Enterprise Mobile Campus SolutionJasig uMobile - Open Source Enterprise Mobile Campus Solution
Jasig uMobile - Open Source Enterprise Mobile Campus SolutionJohn Lewis
 
IMS LIS Outcomes and Sakai: Standardizing Grade Exchange
IMS LIS Outcomes and Sakai: Standardizing Grade ExchangeIMS LIS Outcomes and Sakai: Standardizing Grade Exchange
IMS LIS Outcomes and Sakai: Standardizing Grade ExchangeJohn Lewis
 
New Opportunites to Connect Learning with LIS and LTI
New Opportunites to Connect Learning with LIS and LTINew Opportunites to Connect Learning with LIS and LTI
New Opportunites to Connect Learning with LIS and LTIJohn Lewis
 
Open Source Your Project (With Jasig)
Open Source Your Project (With Jasig)Open Source Your Project (With Jasig)
Open Source Your Project (With Jasig)John Lewis
 
Sakai uPortal Integration Options
Sakai uPortal Integration OptionsSakai uPortal Integration Options
Sakai uPortal Integration OptionsJohn Lewis
 
Agile Engineering
Agile EngineeringAgile Engineering
Agile EngineeringJohn Lewis
 
Securing Portlets With Spring Security
Securing Portlets With Spring SecuritySecuring Portlets With Spring Security
Securing Portlets With Spring SecurityJohn Lewis
 
Shibboleth Guided Tour Webinar
Shibboleth Guided Tour WebinarShibboleth Guided Tour Webinar
Shibboleth Guided Tour WebinarJohn Lewis
 
Leveraging Open Source
Leveraging Open SourceLeveraging Open Source
Leveraging Open SourceJohn Lewis
 
Java Portlet 2.0 (JSR 286) Specification
Java Portlet 2.0 (JSR 286) SpecificationJava Portlet 2.0 (JSR 286) Specification
Java Portlet 2.0 (JSR 286) SpecificationJohn Lewis
 
Open Source Licensing
Open Source LicensingOpen Source Licensing
Open Source LicensingJohn Lewis
 
Real World Identity Managment
Real World Identity ManagmentReal World Identity Managment
Real World Identity ManagmentJohn Lewis
 

More from John Lewis (13)

Jasig uMobile - Open Source Enterprise Mobile Campus Solution
Jasig uMobile - Open Source Enterprise Mobile Campus SolutionJasig uMobile - Open Source Enterprise Mobile Campus Solution
Jasig uMobile - Open Source Enterprise Mobile Campus Solution
 
IMS LIS Outcomes and Sakai: Standardizing Grade Exchange
IMS LIS Outcomes and Sakai: Standardizing Grade ExchangeIMS LIS Outcomes and Sakai: Standardizing Grade Exchange
IMS LIS Outcomes and Sakai: Standardizing Grade Exchange
 
New Opportunites to Connect Learning with LIS and LTI
New Opportunites to Connect Learning with LIS and LTINew Opportunites to Connect Learning with LIS and LTI
New Opportunites to Connect Learning with LIS and LTI
 
Open Source Your Project (With Jasig)
Open Source Your Project (With Jasig)Open Source Your Project (With Jasig)
Open Source Your Project (With Jasig)
 
Sakai uPortal Integration Options
Sakai uPortal Integration OptionsSakai uPortal Integration Options
Sakai uPortal Integration Options
 
Agile Engineering
Agile EngineeringAgile Engineering
Agile Engineering
 
Scrum Process
Scrum ProcessScrum Process
Scrum Process
 
Securing Portlets With Spring Security
Securing Portlets With Spring SecuritySecuring Portlets With Spring Security
Securing Portlets With Spring Security
 
Shibboleth Guided Tour Webinar
Shibboleth Guided Tour WebinarShibboleth Guided Tour Webinar
Shibboleth Guided Tour Webinar
 
Leveraging Open Source
Leveraging Open SourceLeveraging Open Source
Leveraging Open Source
 
Java Portlet 2.0 (JSR 286) Specification
Java Portlet 2.0 (JSR 286) SpecificationJava Portlet 2.0 (JSR 286) Specification
Java Portlet 2.0 (JSR 286) Specification
 
Open Source Licensing
Open Source LicensingOpen Source Licensing
Open Source Licensing
 
Real World Identity Managment
Real World Identity ManagmentReal World Identity Managment
Real World Identity Managment
 

Recently uploaded

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 

Recently uploaded (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 

Sprint Portlet MVC Seminar

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. Diagram from Java ™ Portlet Specification, Version 2.0
  • 7.
  • 8.
  • 9.
  • 10. Diagram from Java ™ Portlet Specification, Version 2.0
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. Diagram from Spring Framework Reference Documentation
  • 17.
  • 18. Diagram from Spring Framework Reference Documentation
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24. Dispatcher (Servlet/Portlet) Request Handler Mapping View Resolver Response Controller View ModelAndView Map (Model) viewName
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35. portlet.xml <portlet> <portlet-name>example</portlet-name> <portlet-class> o rg.springframework.web.portlet.DispatcherPortlet </portlet-class> <init-param> <name> contextConfigLocation </name> <value> /WEB-INF/context/example-portlet.xml </value> </init-param> <supports> <mime-type>text/html</mime-type> <portlet-mode>view</portlet-mode> <portlet-mode>edit</portlet-mode> <portlet-mode>help</portlet-mode> </supports> <portlet-info> <title>Example Portlet</title> </portlet-info> </portlet>
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50. Annotation-Based HandlerMapping <context:annotation-config/> <bean class=&quot;org.springframework.web.portlet.mvc. annotation.DefaultAnnotationHandlerMapping&quot;/> <bean class=&quot; org.sample.MyView Controller&quot;/> <bean class=&quot;org.sample.MyEditController&quot;/> <bean class=&quot;org.sample.MyHelpController&quot;/>
  • 51.
  • 52. PortletModeHandlerMapping <bean id=&quot;portletModeHandlerMapping&quot; class=&quot;org.springframework.web.portlet.handler. PortletModeHandlerMapping&quot;> <property name=&quot;portletModeMap&quot;> <map> <entry key=&quot;view&quot; value-ref=&quot;viewController&quot;/> <entry key=&quot;edit&quot; value-ref=&quot;editController&quot;/> <entry key=&quot;help&quot; value-ref=&quot;helpController&quot;/> </map> </property> </bean> <bean id=&quot;viewController&quot; class=&quot;ViewController&quot;/> ...
  • 53.
  • 54. PortletModeParameterHandlerMapping <bean id=&quot;handlerMapping&quot; class=&quot;…PortletModeParameterHandlerMapping&quot;> <property name=&quot;portletModeParameterMap&quot;> <map> <entry key=&quot;view&quot;> <map> <entry key=&quot;add&quot; value-ref=&quot;addHandler&quot;/> <entry key=&quot;remove&quot; value-ref=&quot;removeHandler&quot;/> </map> </entry> <entry key=&quot;edit&quot;> <map> <entry key=&quot;prefs” value-ref=&quot;prefsHandler&quot;/> </map> </entry> </map> </property> </bean>
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60. Annotation-Based Controller Beans <context:annotation-config/> <bean class=&quot;org.springframework.web.portlet.mvc. annotation.DefaultAnnotationHandlerMapping&quot;/> <bean class=&quot;org.sample.MyViewController&quot;/> <bean class=&quot;org.sample.MyEditController&quot;/> <bean class=&quot;org.sample.MyHelpController&quot;/>
  • 61.
  • 62. Annotation-Based Controller Examples @Controller @RequestMapping(&quot;VIEW&quot;) @SessionAttributes(&quot;item&quot;) public class MyViewController { @RequestMapping public String listItems(Model model) { model.addAttribute(&quot;items&quot;, this.itemService.getAllItems()); return &quot;itemList&quot;; } @RequestMapping(params=&quot;action=view&quot;) public String viewPet( @RequestParam(&quot;item&quot;) int itemId, Model model) { model.addAttribute(&quot;item&quot;, this.itemService.getItem(itemId)); return &quot;itemDetails&quot;; } ...
  • 63. Annotation-Based Controller Examples ... @ModelAttribute(&quot;dateFormat&quot;) protected String dateFormat(PortletPreferences prefs) { return preferences.getValue(&quot;dateFormat&quot;, itemService.DEFAULT_DATE_FORMAT); } @InitBinder public void initBinder(PortletRequestDataBinder binder, PortletPreferences preferences) { String format = preferences.getValue(&quot;dateFormat&quot;, ItemService.DEFAULT_DATE_FORMAT); SimpleDateFormat dateFormat = new SimpleDateFormat(formatString); binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true)); } ...
  • 64.
  • 65.
  • 66.
  • 67. The Controller Interface public interface Controller { ModelAndView handleRenderRequest ( RenderRequest request, RenderResponse response) throws Exception; void handleActionRequest ( ActionRequest request, ActionResponse response) throws Exception; }
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78. HandlerInterceptor Interface public interface HandlerInterceptor { boolean preHandleAction ( ActionRequest request, ActionResponse response, Object handler) throws Exception; void afterActionCompletion ( ActionRequest request, ActionResponse response, Object handler, Exception ex) throws Exception; boolean preHandleRender ( RenderRequest request, RenderResponse response, Object handler) throws Exception; void postHandleRender ( RenderRequest request, RenderResponse response, Object handler, ModelAndView modelAndView) throws Exception; void afterRenderCompletion ( RenderRequest request, RenderResponse response, Object handler, Exception ex) throws Exception; }
  • 79.
  • 80. Configuring Interceptors <context:annotation-config/> <bean id=&quot;parameterMappingInterceptor&quot; class=&quot;org.springframework.web.portlet.handler. ParameterMappingInterceptor&quot; /> <bean class=&quot;org.springframework.web.portlet.mvc. annotation.DefaultAnnotationHandlerMapping&quot;> <property name=&quot;interceptors&quot;> <bean class=&quot;org.springframework.web.portlet.handler. ParameterMappingInterceptor&quot;/> </property> </bean>
  • 81. Configuring Interceptors <bean id=&quot;parameterMappingInterceptor&quot; class=&quot;org.springframework.web.portlet.handler. ParameterMappingInterceptor&quot; /> <bean id=&quot;portletModeParameterHandlerMapping&quot; class=&quot;org.springframework.web.portlet.handler. PortletModeParameterHandlerMapping&quot;> <property name=&quot;interceptors&quot;> <list> <ref bean=&quot;parameterMappingInterceptor&quot;/> </list> </property> <property name=&quot;portletModeParameterMap&quot;> ... </property> </bean>
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 91.
  • 92. Portlet 2.0 Examples @ActionMapping(”delete”) public void deleteItem(...) { ... } @EventMapping(”reload”) public void reloadData(...) { ... } @RenderMapping(&quot;maximized&quot;, params=&quot;action=search&quot;) public String displaySearch(...) { ... } @ResourceMapping(”picklist”) public ModelAndView pickList (...) {...}
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.
  • 100. Questions & Answers John A. Lewis Chief Software Architect Unicon, Inc. [email_address] www.unicon.net