📄 submitaction.java
字号:
package submit;import javax.servlet.http.*;import org.apache.struts.action.*;public final class SubmitAction extends Action { // The execute() method is where you provide your business logic public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { // Cast ActionForm object to SubmitForm type SubmitForm f = (SubmitForm) form; // Retrieve the value of lastname field String lastName = f.getLastName(); // Translate the lastname to upper case and save it Request scope request.setAttribute("lastName", lastName.toUpperCase()); // Create and return ActionForward object with "success" outcome return (mapping.findForward("success")); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -