public class DispachStrutsPortlet extends StrutsPortlet {
public void doView(RenderRequest req, RenderResponse res)
throws IOException, PortletException {
//注意我的命令参数是cmdx,而不是通常的cmd。
String cmd = req.getParameter("cmdx");
if(cmd==null || cmd.length()==0){
if (req.getWindowState().equals(WindowState. MAXIMIZED)) {
req.setAttribute("cmdx","queryAll");
}
super.doView(req, res);
}
}