📄 customlable_action.java
字号:
package com.v246;
import org.apache.struts.action.*;
import javax.servlet.http.*;
public class CustomLable_action extends org.apache.struts.action.Action
{
public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)
{
CustomLable_form custom=(CustomLable_form)form;
CustomLable_bean bean=new CustomLable_bean();
String re=null;
String tmp=null;
try
{
tmp=bean.addCustomLable(custom);//执行数据库写入并接收返回信息
if(tmp.equals("error"))//如果返回error则查找出错页
{
re="customError";
}
else//否则查找正确页面
{
re="custom";
}
}
catch(Exception e)
{
e.printStackTrace();
}
request.setAttribute("custom",custom);
return mapping.findForward(re);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -