GroovyScriptEngine find resources in a web container

I am considering using groovy scripting in an existing web application and am in the process of setting up and configuring GroovyScriptEngine

.

What are the "best practices" for managing scripts in a container?

  • Should I store them in the database? and then serve them up to engine via urls?
  • I could store them on the file system on the server - however what seems to be problematic in Tomcat / JBoss?

Any suggestions are appreciated :)

+1


source to share


1 answer


You can instantiate GroovyScriptEngine with your own ResourceConnector implementation. This can use java.lang.Class.getResource to get the script you insert into the war file.



If you need to change your script dynamically, then a database might be a good idea.

+1


source







All Articles