scope variables do not exist for tempates compiled using JSR223

Description

Edit:

I have a process of packaging projects into LARs using Maven + Lucee 5's JSR223 engine. However, the problem is that when compiling this way, request-oriented scopes such as CGI, FORM, and URL do not seem to be available in the compiled templates. There needs to be a flag for the JSR223 engine that tells it to recognize these scopes.

Original Description:

I have a component in a .lucee file that is compiled and loaded from a .lar file, with the following function:

Calling that function, however, results in:

That error is not present if I am using the component in source form, not loaded from a .lar file.

Environment

Windows 7 Pro 64bit
Tomcat 8
Java 8 64bit

Attachments

2

Activity

Jesse Shaffer 
26 April 2016 at 17:34

, curious as to whether you had found a workaround or not?

Michael Offner 
18 March 2016 at 20:29

the compiler does not care for that runtime setting...
let me see if i have a woraround...

Jesse Shaffer 
18 March 2016 at 17:21
(edited)

Is there any flags or options I could tell the compiler to assume that the CGI scope is available even in jsr223?

I tried calling getPageContext().setIgnoreScopes(false); to the script that builds the lar file, but that does not seem to have helped.

Jesse Shaffer 
18 March 2016 at 17:15

Actually I just figured it out, don't know why it took me this long. While I'm not executing the code via JSR223 at runtime, I am creating the lar using JSR223/Maven, thus the compiler assumes CGI scope is unavailable.

Jesse Shaffer 
18 March 2016 at 15:20

I attached a WAR file that contains a reproduction.

You will need to add the lucee 219-RC jar into WEB-INF/lib for it to work (couldn't upload it with it prepackaged as there is a 10MB limit on uploads), or load it into a tomcat environment already configured to run 219-RC.

Once the webapp launches, you will need to wait until Lucee deploys the repro lar file in WEB-INF/lucee/deploy

Details

Assignee

Reporter

Priority

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 18 March 2016 at 13:41
Updated 28 April 2022 at 02:28