⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 submitaction.java

📁 NetBeans进行基础Struts编程
💻 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 + -