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

📄 uriaction.java

📁 非常好的论坛源代码
💻 JAVA
字号:
package com.ntsky.bbs.action;import org.apache.struts.action.*;import javax.servlet.http.*;import org.apache.log4j.Logger ;/** * <p>Title: Ntsky OpenSource BBS</p> * <p>Description: 页面跳转</p> * <p>Copyright: Copyright (c) 2004</p> * <p>Company: WWW.FM880.COM</p> * @author 姚君林 * @version 1.0 */public class URIAction extends Action {    private final static Logger logger = Logger.getLogger(URIAction.class);    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();        String uri = (String)session.getAttribute("uri");        logger.info("用户当前的URI为 : " + uri);        if(uri==null){            /**             * 跳转到首页             */            return actionMapping.findForward("index");        }        else{            session.removeAttribute("uri");            httpServletRequest.removeAttribute("uri");            httpServletRequest.setAttribute("uri",uri);            return actionMapping.findForward("uri");        }        //throw new java.lang.UnsupportedOperationException("Method perform() not yet implemented.");    }}

⌨️ 快捷键说明

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