setting a session variable in javascript
window.open('http://localhost:8080/workbook/jsp/concatViewJsp.jsp?subsessionid=null' ,winName,features)
it works fine and I am able to get the session values in concatViewJ开发者_运维技巧sp.jsp
But when:
window.open('http://localhost:8080/workbook/jsp/concatViewJsp.jsp' , winName,features)
it doesnt work. I am passing the paramter subsession id as hidden parameter and i m submitting the form as "post" because my application should not allow "get" requests. I am unable to access the session paramters in the concatViewJsp.jsp.
I have tried a lot . But I am unable to find the answer. Can anyone please help me in this? your help will be greatly appreciated.
What you are doing when in your first one is that you are sending it as a "GET" that being said, when you want to "POST" like you suggested, you need to set "POST" to be correct as well. This means that for "POST", the following should be set:
"Content-type" should be set as "application/x-www-form-urlencoded"
"Content-length" to your content length and
"Connection" to be "close"
Hope it helped :)
精彩评论