Featured Post

Event Sourcing Video from Michael Ploed

Event Sourcing I want to share a great video I found few days ago that describes very well what Event Sourcing is.

Thursday, January 19, 2017

Example of Controller Spring Portlet MVC

Example of Controlle Portlet MVC


import javax.portlet.RenderResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import org.springframework.web.portlet.bind.annotation.ActionMapping;
import org.springframework.web.portlet.bind.annotation.RenderMapping;
import org.springframework.web.portlet.bind.annotation.ResourceMapping;

@RequestMapping(value = "VIEW")
public class HelloPortletController {

 public String renderPage(RenderResponse response) {
     return "view";

 @ActionMapping(params = "myaction=sayHello")
 public void actionMethod(@RequestParam("nome") String nome, @RequestParam("cognome") String cognome) {
     System.out.println("actionMethod() - start");
     System.out.println("nome:" + nome);
     System.out.println("nome:" + cognome);
     System.out.println("actionMethod() - end ");

 @ResourceMapping(value = "refresh")
 public String refresh() {
     return "ajax";


No comments :

Post a Comment