摘要:        
request.setAttribute("flag1","哈哈1");request.getSession().setAttribute("flag3", "测试");1. response.sendRedirect("/qq/success.jsp");PS:如果工程不是在ROOT根目录下,不要忘记加上你的工程名success.jsp :SESSION : 。FLAG1 : 。输出:SESSION : 测试。 FLAG1 : null。 显然getAttribute拿不到flag的值,但是S    阅读全文
posted @ 2013-04-02 15:33
MuaRine
阅读(4894)
评论(0)
推荐(0)
        
            
        
        
摘要:        
web.xml配置:This is the description of my J2EE componentThis is the display name of my J2EE componentTestServletcom.nubb.servlet.TestServletTestServlet/servlet/TestServlet.do浏览器首次发送请求后经过Http协议在服务器端Servlet执行顺序:构造方法->init方法->service方法->doGet方法(若是Post请求则先经过doPost方法,这是传下来的习惯)->destory方法(此方法是在服    阅读全文
posted @ 2013-04-02 12:03
MuaRine
阅读(4676)
评论(0)
推荐(0)
        
 
                    
                
 浙公网安备 33010602011771号
浙公网安备 33010602011771号