request.getParameter("target");是什么意思

Ryoko7 2012-04-17 03:06:21
下面这段中,request.getParameter("target");是什么意思,target参数是什么,什么时候被写入的。
String target = request.getParameter("target");
if (StringUtils.isEmpty(target)) {
response.getWriter().println("parameter target required.");
return;
}

...

if (StringUtils.equals(target, "put")) {
sessionPut(request, response);
} else if (StringUtils.equals(target, "delete")) {
sessionDelete(request, response);
} else if (StringUtils.equals(target, "invalidate")) {
request.getSession(true).invalidate();
} else {
response.getWriter().println("illegal target.");
return;
}
...全文
557 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
licip 2012-04-18
  • 打赏
  • 举报
回复
url中带用的参数,或者是form表单中提供的组件的值。
码无边 2012-04-18
  • 打赏
  • 举报
回复
参数名称
linshb85 2012-04-17
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 的回复:]
想知道楼主现在编程属于什么阶段,为什么回问这种问题
[/Quote]
大家都是从小白来的,互相理解下
m540920181 2012-04-17
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 的回复:]

一般是从jsp页面传递到action中的。
jsp页面一般通过javascript来设置传递,下面的val就是要传递的target值
function edit(val){
var strHref = "action.do?method=***method&target=" + val;
window.location.href = strHref;
}
action……
[/Quote]
还有就是form中的input中name="traget",或者就是超链接后面跟的参数
-AJ- 2012-04-17
  • 打赏
  • 举报
回复
url 中附带的参数
lxpandsq 2012-04-17
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 的回复:]
想知道楼主现在编程属于什么阶段,为什么回问这种问题
[/Quote]


+1
吸尘器 2012-04-17
  • 打赏
  • 举报
回复
想知道楼主现在编程属于什么阶段,为什么回问这种问题
  • 打赏
  • 举报
回复
http://127.0.0.1:8080/xxx/yyy.jsp?target=zzz
sunbingqiang 2012-04-17
  • 打赏
  • 举报
回复
一般是从jsp页面传递到action中的。
jsp页面一般通过javascript来设置传递,下面的val就是要传递的target值
function edit(val){
var strHref = "action.do?method=***method&target=" + val;
window.location.href = strHref;
}
action中通过request即可得到其值
String target = request.getParameter("target");
宏Lee 2012-04-17
  • 打赏
  • 举报
回复
你form中input的name属性,还有就是超链接?号后面的值
zhang_zhi_lai 2012-04-17
  • 打赏
  • 举报
回复
jsp(或html)页面的<input type="text" name="target"> name的值
ypchen_chjs 2012-04-17
  • 打赏
  • 举报
回复
是你上一个请求页面,传递来的参数,一般在form中,也要用?XX=??来传递

81,094

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧