New IDE for Lucee

Hi Lucee Devs

I am the developer of Solvent (codesolvent.com), it is a web app platform for JVM dynamic languages (Closure, Groovy,Javascript,Ruby,Python…etc) via JSR223.

There is a demo system @ http://demo.codesolvent.com:7000/
login: developer/developer

I have uploaded a new version of Solvent that has Lucee enabled. Sample URLs below.

The code for the below URLs can be found under /com/codesolvent/Solvent/web

http://demo.codesolvent.com:7000/lucee.ste
http://demo.codesolvent.com:7000/cfml.ste
http://demo.codesolvent.com:7000/lucee-tag.ste
http://demo.codesolvent.com:7000/cfml-tag.ste

One thing I couldn’t figure out is how to get the output from cfoutput tags, the only thing that gets outputted seems to be the last initialized variable (ie the date object), I can see from the log that the cfoutput is correctly evaluated but the output is not returned.

Also the Lucee engine complains about tags (TemplateException), this happens it seems when using the LuceeTagEngineFactoryImpl…this seems to have happened rather sporadically since I believe I had previous tests where it was behaving similar to CFMLTagEngineFactoryImpl (ie just swallowing the cfoutput instead of returning it but not complaining as it is doing now), I am not sure what might have changed.

I tracked the lack of output to this file (Line 65):

Basically it is not returning the result object which provides access to the output, I think.

I had to massage the Lucee.jar bundle to make it export all 4 scripting factory classes and also work embedded within another OSGi framework (in other words double OSGi embed since Lucee itself is using OSGi).

Anyway I am excited about the prospect of Solvent being something that Lucee users might find useful, it allows Lucee to be used in a polyglot environment (see the lucee-portal.ste file which calls Lucee from Groovy).

Do you think Lucee could benefit from being integrated into a platform such as Solvent? Basically you get an IDE out of the box but also a powerful platform that can be easily extended to support specific Lucee features.

1 Like

I’m not sure if I understand you correctly, but… cfoutput generally writes to the output stream, so whatever you write within cfoutput tags is returned to the client.

If you want to “capture” the output and set it to a variable, then you can wrap that portion with a custom tag, or use the cfsavecontent tag. e.g.

<cfsavecontent variable="someOutput">
  anything here will be set to a variable named someOutput.

  <cfoutput>
    including variable evaluation like #Server.lucee.version#.
  </cfoutput>
</cfsavecontent>

<cfset modifiedOutput = replace(someOutput, "variable", "expression")>
<cfset echo(modifiedOutput)>

If I’m completely off with understanding what you’re trying to do (and upon reading the rest of your message it’s seems like that may be the case) then please post some code snippets that can help clarify.

You’re right, what I want is to get the output so I can pass it on as the HttpServletResponse output to the browser.

The way Solvent uses the JSR-223 engine looks something like this:

Object cfoutput = jsr223Engine.eval(cfCode,context);
httpResponse.getOutPutStream().write(cfoutput.toString());

The Lucee implementation doesn’t return the output, it is clearly writing it to an output stream but it isn’t the correct output stream for this usage pattern.

1 Like

@micstriit Can you help @solver out with his JSR-223 issues above?