由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - A Servlet query string question
相关主题
一个servlet问题How to make php and servlet work togethe
求助!Tomcat下设置servlets的问题help: 如何用servlet实现zip文件下载?
Tomcat Servlet: synchronized vs non-synchronized methods【跪求】java applet下怎么执行系统的一个程序?
不明白servlet, applet到底啥区别,还有jspparameters to main????
大家都是怎么自学J2EE的How do I send cookies from a servlet?
Servlet如何Stream mp3文件?理解Java Servlets [fwd]
servlet的精华到底是啥?Another Servlet Problem:Browser Caching
servlet是否可以在doGet里面返回304need your comments
相关话题的讨论汇总
话题: query话题: servlet话题: http话题: limitation
进入Java版参与讨论
1 (共1页)
s********r
发帖数: 176
1
Parameters are passed in the query string sent to the server side,
such as
http://localhost:9086/AppOn/order.do?OrderId=10000&custId=90000
It calls doGet() method to process the http request.
My question is there any disadvantage of doing that except that the length has the limitation of 250 characters-long and no confidential information?
Thanks a lot for your reply.
m******t
发帖数: 2416
2
There aren't any big disadvantages except for the ones you already mentioned.
One thing you might want to be careful though is to make sure none of
these urls-with-side-effects get picked up by a crawler (e.g. being
explicitly
referenced on a public web page).

has the limitation of 250
characters-long and no confidential information?

【在 s********r 的大作中提到】
: Parameters are passed in the query string sent to the server side,
: such as
: http://localhost:9086/AppOn/order.do?OrderId=10000&custId=90000
: It calls doGet() method to process the http request.
: My question is there any disadvantage of doing that except that the length has the limitation of 250 characters-long and no confidential information?
: Thanks a lot for your reply.

k***r
发帖数: 4260
3
Get is so easy to happen that you can just copy the URL
and paste in another browser window to make it happen.
For a "write" action such as making a purchase, I'd make
it harder by using a post.

has the limitation of 250 characters-long and no confidential information?

【在 s********r 的大作中提到】
: Parameters are passed in the query string sent to the server side,
: such as
: http://localhost:9086/AppOn/order.do?OrderId=10000&custId=90000
: It calls doGet() method to process the http request.
: My question is there any disadvantage of doing that except that the length has the limitation of 250 characters-long and no confidential information?
: Thanks a lot for your reply.

A**o
发帖数: 1550
4
i hate http protocol. period.

has the limitation of 250 characters-long and no confidential information?

【在 s********r 的大作中提到】
: Parameters are passed in the query string sent to the server side,
: such as
: http://localhost:9086/AppOn/order.do?OrderId=10000&custId=90000
: It calls doGet() method to process the http request.
: My question is there any disadvantage of doing that except that the length has the limitation of 250 characters-long and no confidential information?
: Thanks a lot for your reply.

a****i
发帖数: 13
5
though an advantage of it is to integrate easily with other system.
g*****g
发帖数: 34805
6
There's this famous post&redirect pattern.
Basically if you want to write, you want to post
then redirect to a get. That way, you can prevent duplicate
submission with some care.
s********r
发帖数: 176
7
I agree with this. If there is a (write action)transaction happened, use
post method always.
If the action is just read only, get is a good choice, simple to handle.
ex, in a page, there is a list of items, click one item(ID) to go to the
detail page.
Even use get method, the system needs to check the http session is invalid
or not for some credential user access permit.

【在 k***r 的大作中提到】
: Get is so easy to happen that you can just copy the URL
: and paste in another browser window to make it happen.
: For a "write" action such as making a purchase, I'd make
: it harder by using a post.
:
: has the limitation of 250 characters-long and no confidential information?

s********r
发帖数: 176
8
good point.

【在 g*****g 的大作中提到】
: There's this famous post&redirect pattern.
: Basically if you want to write, you want to post
: then redirect to a get. That way, you can prevent duplicate
: submission with some care.

1 (共1页)
进入Java版参与讨论
相关主题
need your comments大家都是怎么自学J2EE的
请推荐servlet还有jsp的书Servlet如何Stream mp3文件?
servlet读取directory的基本问题servlet的精华到底是啥?
运行servlet时出现的http status 404问题servlet是否可以在doGet里面返回304
一个servlet问题How to make php and servlet work togethe
求助!Tomcat下设置servlets的问题help: 如何用servlet实现zip文件下载?
Tomcat Servlet: synchronized vs non-synchronized methods【跪求】java applet下怎么执行系统的一个程序?
不明白servlet, applet到底啥区别,还有jspparameters to main????
相关话题的讨论汇总
话题: query话题: servlet话题: http话题: limitation