GlideTransaction.get().response.sendRedirect broken in Jakarta / sendRedirect

jean-lucchatton
Kilo Guru

Hello,

Our instance uses a couple of GlideTransaction.get().response.sendRedirect() calls. It was ok on Helskinki version but is broken on Jakarta.

We receive the following error message "Attempted script access to inaccessible member denied - com.glide.sys.Transaction:getResponse:()Ljavax/servlet/http/HttpServletResponse;

Evaluator: java.lang.SecurityException: Illegal access to method getResponse in class com.glide.sys.Transaction".

I've looked in the community forum and find that this API was not documented. Therefore ServiceNow has certainly decided to change something or decided to restrict his usage.

Any idea how to get the same functionality ?

Thanks and regards

Jean-Luc

15 REPLIES 15

Surendra Raika1
Kilo Guru

Please try Xplore; see if that helps (GitHub - thewhitespace/Xplore: Xplore: Developer Toolkit for ServiceNow )





TypeJavaClass
Value[JavaClass com.glide.sys.Transaction]


NameTypeValue
addACLTime ()Function
addBRTime ()Function
addDBTime ()Function
addNetworkTime ()Function
appScopeundefinedundefined
businessRuleundefinedundefined
cancelExceptionundefinedundefined
cancelIfNecessary ()Function
cancelled ()Function
clearCancelled ()Function
create ()Function
get ()Function
getLastStatementTime ()Function
getTotalCancelledTransactions()Function
getTotalProcessorTransactions()Function
incrementEventCount ()Function
incrementJobCount ()Function
incrementRowBlockFilesRead ()Function
incrementRowBlockFilesWritten()Function
isCancelException ()Function
lastStatementTime__unknown__
operationundefinedundefined
popState ()Function
pushState ()Function
setAppScope ()Function
setBusinessRule ()Function
setOperation ()Function
setSQL ()Function
shouldCancel ()Function
totalCancelledTransactions__unknown__
totalProcessorTransactions__unknown__

I am on Kingston PDI.


Hi Surendra,


Thanks for your input but it doesn't help. The function   is protected


Regards,


Jean-Luc


Hey Jean,



Will you be using gs.setRedirect ?


maybe get the url using transaction API and set the redirecction using the gs ?



Regards


Surendra


Hichem
Mega Expert

Hello jean-lucchatton,



I have the same issue here.


I guess you are having a (pink) partner pack that is using this method, am I right ?



Anyway did you find a solution on how to replace "GlideTransaction.get().response.sendRedirect()" in Jakarta version ?



Thanks