开发者

How to bookmark a page which got parameters from one jsp page and generated output?

开发者 https://www.devze.com 2023-01-08 09:11 出处:网络
I have one jsp which accepts avlue from textbox and passes it to another jsp page when button is clicked. Then by getting this value I have written one query which 开发者_Go百科works perfectly.

I have one jsp which accepts avlue from textbox and passes it to another jsp page when button is clicked. Then by getting this value I have written one query which 开发者_Go百科works perfectly. Gives the output and generates the proper report. But now i wants to bookmark this generated report. Can anyone tell me what i have to do for this thing?


If the second page is invoked via a GET, then you simply have to use your browser to save the URL to your favourites - if it's invoked via a POST, then this isn't directly possible.

There are some workarounds, but using GET is the simplest option.

EDIT: Also, if the operation is 'read-only' - i.e. it simply requests data and doesn't affect any long-term data storage values, the the HTTP spec reccomends using GET anyway.


While you generate the asynchronous content, you should change the hash, the part of the url after the # mark. Then you can bookmark this page. On page load, check the hash, and load the proper content if it is necessary.

0

精彩评论

暂无评论...
验证码 换一张
取 消