Being interested in analyzing what is needed to enable Tomcat JSP's to be
deployable with any Java
scripting languages (i.e. with javax.script.ScriptEngines) instead of Java.
Motivation: there are programmers who are not able to program in Java, but have
broad expertise in
programming with other languages like Javascript, PHP, Rexx, Python, etc. If
such programmers could
devise JSPs using their programming language of choice instead of (or in
addition to) Java, they
would become able to take advantage of Tomcat.
Idea: since Java 6 the javax.script package defines a Java scripting framework
which can be used to
generically create the Java program necessary to deploy the code in JSPs. E.g.
the 'request' and
'response' objects could be supplied as arguments via the
ScriptContext.ENGINGE_SCOPE Bindings in a
Java array named ScriptEngine.ARGV, but also objects like 'out' could be made
available to all Java
scripting languages. This in essence should allow any (JVM) langugage
implementing a
javax.script.ScriptEngine to be used as a programming language in a JSP by
merely denoting its name
in "<%@ page language="LANGUAGE" contentType="text/html"%>, where LANGUAGE
could then be e.g.
"javascript", "jython", "netrexx", "rexx", ... instead of "java".
The question(s):
* Where would one find a document/tutorial with a conceptual overview of
processing a JSP file?
* Which class(es) are used to process JSPs with the language attribute set to
"java" in the
current implementation of Tomcat, assuming that it would be feasible to
subclass (or create
alternatives of) those class(es) to add generic support for JSR223
(javax.script.ScriptEngine)?
Any hints, warnings, pointers highly appreciated!
---rony