- 12
- 0
- 约4.6千字
- 约 5页
- 2015-09-26 发布于重庆
- 举报
servlet跳转页面的几种方法
servlet跳转页面的几种方法
一直对Servlet的几 ? 跳servlet,一是在JSP,其JSP也就是servlet,不 Servlet: 当然,在servlet中,一般跳转都发生在doGet, doPost等方法里面。 1)? redirect 方式 response.sendRedirect(/a.jsp); sendRedirect可以将web应用中,如: response.sendRedirect(); 跳 这种方式要传值出去的话,只能在url中parameter或者放在session中,无法使用request.setAttribute来 2) forward方式 RequestDispatcher dispatcher = request.getRequestDispatcher(/a.jsp); dispatcher .forward(request, response); forward方式只能跳web应用中的页面上。 跳 使用这种方式跳转,传值可以使用三种方法:url中parameter,session,request.setAttribute JSP: 1)? response.sendRedirect(); 和servlet的response.sendRedirect()方式一 此out.flush()
您可能关注的文档
- PQRASME要求填写的焊接工艺评定报告.doc
- Practical Automatic Determination of Causal Relationships in Software Execution Traces.pdf
- Prediction of Physical, Color, and Sensory Characteristics of Broiler Breasts by VisibleNea.pdf
- Precision Spectroscopy of Pionic Atoms From Pion Mass Evaluation to Tests of Chiral Perturb.pdf
- Predictive Evaluation of Econometric Forecasting Models in Commodity Futures Markets.pdf
- Predicting the Performance of Randomized Parallel Search An Application to Robot Motion Pla.pdf
- PRELIMINARY VERSION A Design Diversity Metric and Analysis of Redundant Systems.pdf
- Present and NearFuture Reflected Light Searches for CloseIn Planets.pdf
- prepared for a special issue of abour Economics,.pdf
- Present and Future Electroweak Precision Measurements and the Indirect Determination of the.pdf
- 电子元器件 半导体器件长期贮存 第4部分:贮存 标准立项发展报告.docx
- 电子用增材制造和三维打印工艺的分类 标准立项发展报告.docx
- 电子电气产品中特定物质的测定 第3-1部分:X射线荧光光谱法筛选铅、汞、镉等有害物质含量 标准立项发展报告.docx
- JBT 15030-2025 裸眼立体影像光场微透镜标准立项发展报告.docx
- 电网设备卫星巡检数据处理技术规范 标准立项发展报告.docx
- 电器和电子断路器 第2部分:通用标准 标准立项发展报告.docx
- 电压监测仪使用技术条件 标准立项发展报告.docx
- 电气绝缘液体与结构材料相容性试验方法 标准立项发展报告.docx
- 电阻器和电容器引出线的优选直径 标准立项发展报告.docx
- 电子和通信设备用变压器和电感器测试方法和试验程序 标准立项发展报告.docx
原创力文档

文档评论(0)