Can anyone tell me why the first script is returning None for request.get('argClsRecId')? Script: request = container.REQUEST response = request.RESPONSE print request.QUERY_STRING print request.get('argClsRecId') return printed Request URL: http://localhost:8080/scripts/actAddSubjectReport?argClsRecId=159&argStuRecI... Output: argClsRecId=159&argStuRecId=2288 None But if you try this script: request = container.REQUEST response = request.RESPONSE for x in request.items(): print x[0], x[1] return printed argClsRecId and argStuRecId are there (along with all the other things). Thanks, J _________________________________________________________________ Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger
Justin Robertson wrote:
Can anyone tell me why the first script is returning None for request.get('argClsRecId')?
Script: request = container.REQUEST response = request.RESPONSE print request.QUERY_STRING print request.get('argClsRecId') return printed
Request URL: http://localhost:8080/scripts/actAddSubjectReport?argClsRecId=159&argStuRecI...
Output: argClsRecId=159&argStuRecId=2288 None
I cannot. In fact, it works for me just fine, the only difference being the script name and location. What are your versions? --jcc -- "My point and period will be throughly wrought, Or well or ill, as this day's battle's fought."
Justin Robertson wrote at 2004-1-26 14:05 +0000:
Can anyone tell me why the first script is returning None for request.get('argClsRecId')?
Script: request = container.REQUEST response = request.RESPONSE print request.QUERY_STRING print request.get('argClsRecId') return printed
Request URL: http://localhost:8080/scripts/actAddSubjectReport?argClsRecId=159&argStuRecI...
Output: argClsRecId=159&argStuRecId=2288 None
That's really interesting... "request.get" actually looks in "request.others" (a dict). Maybe, you print it as well. -- Dieter
Hi Justin, Justin Robertson wrote:
Can anyone tell me why the first script is returning None for request.get('argClsRecId')?
Script: request = container.REQUEST response = request.RESPONSE print request.QUERY_STRING print request.get('argClsRecId') return printed
Request URL: http://localhost:8080/scripts/actAddSubjectReport?argClsRecId=159&argStuRecI...
Output: argClsRecId=159&argStuRecId=2288 None
But if you try this script:
request = container.REQUEST response = request.RESPONSE for x in request.items(): print x[0], x[1] return printed
argClsRecId and argStuRecId are there (along with all the other things).
Looks like you call the first script via POST form method. If sent with POST, only form values are respected, the QUERY_STRING arguments are not. You would have to parse yourself (there is support for parsing in the libs, however) Regards Tino Wildenhain
participants (4)
-
Dieter Maurer -
J. Cameron Cooper -
Justin Robertson -
Tino Wildenhain