Featured Post

NoSQL use cases

Here are a simple summary of use cases for Cassandra, MongoDB and Redis MongoDB Storing Log Data Speed is the primary perfor...

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