I see some mistakes in the example :
I the 3) JSR223, you use vars.get("response") this is OK but the log.war you use the ${userdata} and the cache compile is set. That is not correct.
I need to use vars.get("userdata") or ${userdata} with no cache compile.
https://jmeter.apache.org/usermanual/component_reference.html#JSR223_Sampler
"When using this feature, ensure your script code does not use JMeter variables or JMeter function calls directly in script code as caching would only cache first replacement. Instead use script parameters."
https://jmeter.apache.org/usermanual/component_reference.html#BeanShell_Sampler
Migration to JSR223 Sampler+Groovy is highly recommended for performance, support of new Java features and limited maintenance of the BeanShell library.
It is better to use groovy and not beanshell
${__groovy(import org.apache.jmeter.services.FileServer; FileServer.getFileServer().getBaseDir();)}${__groovy(File.separator)}
Regards.
Vincent DAB.