formaction.java
来自「MVC portlet 源码 JSR168标准」· Java 代码 · 共 37 行
JAVA
37 行
package com.x4ee.portlet.samples.mvcpart.actions;
import java.io.IOException;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletException;
import com.x4ee.portlet.mvcportlet.core.ActionConfig;
import com.x4ee.portlet.mvcportlet.core.ActionProcessor;
import com.x4ee.portlet.mvcportlet.core.BaseRequestProcessor;
public class FormAction extends BaseRequestProcessor implements ActionProcessor {
public String process(ActionRequest request, ActionResponse response,
ActionConfig config) throws PortletException, IOException {
// TODO Auto-generated method stub
String strusername=request.getParameter("username");
String strpwd=request.getParameter("password");
//--将参数放到request中
response.setRenderParameter("username",strusername);
response.setRenderParameter("password",strpwd);
//--设置转发页面参数
response.setRenderParameter("showmsg","showmsg");
//---以下可以进行数据库等操作---
//--------------------------
return "default";
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?