jsp页面到servlet常用传值方法
2017-01-22 10:48
375 查看
1、session传值
<%...
session.setAttribute("testSession","Hello session");
reqeust.setAttribute("testRequest","Hello request");
%>
2、url href传值
<a href="JspServlet?action=toServlet">click me</a>
3、form表单提交
<form action="JspServlet?action=toServlet" method="post" name="form">
<input name="username" type="test" />
<input type="submit" value="submit">
</form>
<%...
session.setAttribute("testSession","Hello session");
reqeust.setAttribute("testRequest","Hello request");
%>
2、url href传值
<a href="JspServlet?action=toServlet">click me</a>
3、form表单提交
<form action="JspServlet?action=toServlet" method="post" name="form">
<input name="username" type="test" />
<input type="submit" value="submit">
</form>
相关文章推荐
- 如何在JSP页面快速输出从Servlet接收的数据_看JSTL常用C标签的威力
- question:applet与浏览器通信,同页面内applet之间通信,jsp控制applet异步运行,servlet启动applet方法 jsp获取applet返回值
- Servlet跳转到jsp页面的几种方法
- Tomcat运行Servlet,JSP页面请求转发报错解决方法
- JSP在页面加载时调用servlet的方法
- jsp/servlet跳转页面的几种方法
- 如何在加载JSP页面时,同时调用servlet中的方法
- jsp页面常用的查询及显示方法分析
- JSP清除页面缓存常用方法小结
- jsp页面提示The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path解决方法
- 通过JSP 页面调用servlet方法?
- JSP页面显示list的常用方法
- Html/Jsp常用的页面跳转方法
- jsp页面常用的查询及显示方法分析
- 5种常用的jsp页面跳转方法
- jsp页面跳转常用方法,原谅我是菜鸟
- Html/Jsp常用的页面跳转方法
- servlet的forward方法是跳向的jsp页面格式错乱
- JSP在页面加载时调用servlet的方法
- Servlet跳转到jsp页面的几种方法