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

📄 postaction.java

📁 bbs struts
💻 JAVA
字号:
public class TopicAction extends Action {
   
    public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception{
        /**@todo: complete the business logic here, this is just a skeleton.*/
        HttpSession session = httpServletRequest.getSession();
        Userbean user=session.getAttribute("user");
        
        
        //logon?
        
        
        
        TopicAcionForm topic=(TopicAcitionForm)actionForm;
        String title=topic.getTopicTitle();
        String content=topic.getTopicContent();
        String author=user.getName();
        topic.setAuthor(author);
        
        
        DBTopicFactory fa=new  DBTopicFactory();
        fa.createTopic(topic);
        return actionMapping.findForward("success");
      }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -