You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Eduardo Pelegri-Llopart <pe...@eng.sun.com> on 1999/10/20 01:28:02 UTC

multiple languages...

| re: where?

We (in the Server side of the Java Platform group at Sun) are tying down
a few details related to J2EE 1.2 (in my case I am helping with the test
suite) but in a few days we are going to be more focused in the post
JSP1.1/Servlet2.2 future.  I suspect the right way to evolve this
specific point will be to do it in a JSR (Java Specification Request);
just give us a bit more time; I will get back to you.  In addition to
the Jakarta group there are several other groups that are interested; I
do not see a particularly tricky process but a bit of extra thinking at
the beginning may make things easier later on.


| re: what?

When we designed JSP 1.0/1.1 we spent special effort to enable different
scripting languages.  In particular we were very careful with the tag
extension mechanism so that all tag libraries will work in all pages,
with minimal assumptions about the semantics and implementation of the
scripting language.  We think that JSP 1.1 can be extended so that it
can use other scripting languages, like the ones mentioned.

We did not pursue other languages initially due to several reasons,
including that they complicate the portability story, but if there is
real interest, I'll be very happy to help with the effort.  I personally
find that I am writing more and more tag libraries and not using as many
scripting elements (also using more nesting for action communication,
rather than scripting variables).  Note that a tag library essentially
defines a specialized language.

The spec work requires clear semantics so that pages can be moved from
one container to another, assuming the container implements the desired
scripting language.  And, of course, the spec should give as much
freedom to the implementation as possible, be backward compatible and
not conflict with the future specs... (and taste well and not fatten 
:-]).


| re: details?

I am not convinced that we can easily mix-and-match multiple scripting
languages within a page.  The problem is that each language has its own
syntax and semantics, and the scriptlets in JSP are not even fully
formed statements, they can be anything (as long as... see the spec for
details), so defining what is a well-formed page in the presence of
multiple program fragments of multiple languages is going to be
"interesting".  Specially without imposing unwanted constraints on the
implementation.  One can probably do better by restricting what can be
used in the scriptlets, but note that some people really like to say
things like:

	<% for (int i=0; i<34; i++) { %>
	stuff....
	<% } %>

or even more convoluted things...  But lets' see....


| re: details (2)?

Going through an XML rep seems reasonable, although we will need to
coordinate it with the JSP.next effort when that gets moving (see
above).  I would not worry too much about things like the att="<%=
...%>" stuff in the current syntax; we have a lot of freedom in the XML
mapping - the JSP 1.1 and JSP 1.0 specs explicitly (and for this very
reason) indicate that the mapping indicated there may change.

And yes, we want to use XSL and to feed to XSL (and other
transformations).  Some of the latter can already be done in JSP 1.1
although nowhere as nicely and/or efficiently as I want.


Hope this helps,  It is great to see all this interest and energy.  I
think we are headed for a few very "fun" months.

	- eduard/o