社区
Web 开发
帖子详情
关于request的一个函数???
ggyy
2002-03-14 03:42:41
A.jsp中:(A的表单请求B.jsp)
request.setAttribute()
设置的属性再什么地方能得到???
(二)
如果在A.jsp中
不通过表单
通过response.sendRedirect();怎么传递参数???
...全文
23
3
打赏
收藏
关于request的一个函数???
A.jsp中:(A的表单请求B.jsp) request.setAttribute() 设置的属性再什么地方能得到??? (二) 如果在A.jsp中 不通过表单 通过response.sendRedirect();怎么传递参数???
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
ggyy
2002-03-14
打赏
举报
回复
感谢回答!
第2问已经解决!
ggyy
2002-03-14
打赏
举报
回复
(一):
A.jsp:
<%@ page contentType="text/html; charset=EUC-JP" %>
<html>
<head>
<title>
Jsp1
</title>
</head>
<body>
<h1>
JBuilder Generated JSP
</h1>
<form action="aa.jsp"method="post">
<%
request.setAttribute("shibushi","dsfds");
%>
<input type="submit"value="dfds">
</form>
</body>
</html>
aa.jsp:
<%@ page contentType="text/html; charset=EUC-JP" %>
<html>
<head>
<title>
aa
</title>
</head>
<body>
<h1>
JBuilder Generated JSP
</h1>
<%
String name=null;
if(request.getAttribute("shibushi")!=null)
name=request.getAttribute("shibushi").toString();
%>
<%=name%>
</body>
</html>
结果为:null呀!
southline
2002-03-14
打赏
举报
回复
Answer:
(1)request.setAttribute()'s value can get in the next page only,not like session can get in all page.
(2)you can do like this:
response.sendRedirect("B.jsp?para=theValue")
Java Web核心技术-
Request
和Response
你能获得: 理解
Request
请求是什么、
Request
相关的常用方法、Response常用方法。本课程是JavaWeb开发的重要课程,
Request
请求表达了整个Web开发的核心,而Response代表服务响应给前端的数据,对数据的处理,返回格式...
解决scrapy不执行
Request
回调
函数
callback
那个
函数
没有任何结果返回,可能这就是
一个
测试
函数
或是没写完的
函数
,因此只需要在这个
函数
结尾加
一个
yield就可以了,回调另
一个
空的
函数
就不会有任何影响: # -*- coding: gbk -*- def parse(self, response): #...
request
_irq
函数
介绍
在Linux内核中,
request
_irq()
函数
是注册中断服务
函数
,
函数
的原型如下: int
request
_irq (unsigned int irq, irqreturn_t (*handler)(int, void *), unsigned long irqfrag, const char *devname, void *dev_id); ...
html 获取
request
的值,js
函数
中怎么获取
request
中值的属性?
什么是
request
对象
Request
对象的作用是与客户端交互,收集客户端的Form、Cookies、超链接,或者收集服务器端的环境变量。
request
对象是从客户端向服务器发出请求,包括用户提交的信息以及客户端的一些信息。客户端可...
gpio_
request
()
函数
其原型为 int gpio_
request
...先说说其参数,gpio则为你要申请的哪
一个
管脚,label则是为其取
一个
名字。其具体实现如下: int gpio_
request
(unsigned gpio, const char *label) { struct gpio_desc *desc;//
Web 开发
81,091
社区成员
341,719
社区内容
发帖
与我相关
我的任务
Web 开发
Java Web 开发
复制链接
扫一扫
分享
社区描述
Java Web 开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章