1 21 package net.mlw.vlh.web.mvc; 22 23 import java.text.MessageFormat ; 24 25 import javax.servlet.http.HttpServletRequest ; 26 import javax.servlet.http.HttpServletResponse ; 27 28 import org.apache.struts.tiles.ComponentContext; 29 import org.springframework.web.servlet.view.tiles.ComponentControllerSupport; 30 31 37 public class ReportController extends ComponentControllerSupport 38 { 39 protected static boolean init = false; 40 41 45 protected void doPerform(ComponentContext componentContext, HttpServletRequest request, HttpServletResponse response) throws Exception 46 { 47 String name = request.getParameter("report"); 49 50 String report = MessageFormat.format(componentContext.getAttribute("body").toString(), new String [] { name }); 53 54 componentContext.putAttribute("body", report); 55 } 56 } | Popular Tags |