Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #28594

Re: JDK 1.8 Power not Available for the Web, Yes or No?

From Jan Burse <janburse@fastmail.fm>
Newsgroups comp.lang.java.programmer
Subject Re: JDK 1.8 Power not Available for the Web, Yes or No?
Date 2014-05-29 10:50 +0200
Organization albasani.net
Message-ID <lm6sda$hh5$1@news.albasani.net> (permalink)
References <lm5lkl$j95$1@news.albasani.net>

Show all headers | View raw


Jan Burse schrieb:

> Comments welcome

Assume I configure tomcat to use JDK 1.8, and
it will run with JDK 1.8, there are still
problems with continuation.

If I remember well some weeks ago, I tryed
JDK 1.8 for tomcat, and it didn't work. And
it seems that tomcat primarily goes for JDK 1.7,
see also:

    Does Tomcat 8 support Java 8?
    http://stackoverflow.com/questions/18208805/does-tomcat-8-support-java-8

But the issue is not whether I can plug-in
a JDK 1.7 or JDK 1.8 into tomcat. The issue
is whether JSP spec supports inner classes
to a certain degree, so that some java features
can be used.

I don't know whether in tomcat 8 they changed
the variable out to final, if this is at at
all possible. So that I would be able to use
it in an inner class.

When I can use out in an inner class, then
I will probably also be able to use it in the
JDK 1.8 lambda notation.

Inner classes are already a feature from the
beginning of JDK 1.1. But I never checked how
their support in JSP is. One finds the following
article about inner classes and JSP:

     JSP: How to Declare Methods and Inner Class in JSP
 
http://www.snippetit.com/2009/05/jsp-how-to-declare-methods-and-inner-class-in-jsp/

But the example above doesn't show the case of an
inner annonymous class which is local to a method.
I don't know whether local classes were also already
introduced with JDK 1.1. But according to some
sources the local classes came with nested classes
in JDK 1.1 together with a greater application area
for the final modifier:

     In Java 1.0, only fields, methods, and classes can be declared 
final. The addition of local classes in Java 1.1 has required a 
liberalization in the use of the final modifier. It can now be applied 
to local variables, method parameters, and even the exception parameter 
of a catch statement. The meaning of the final modifier remains the same 
in these new uses: once the local variable or parameter has been 
assigned a value, that value cannot be changed.

But I really feel ashamed that I never checked before
whether JSP can use local classes. My testing so
far shows that this JDK 1.1 doesn't work, and subsequently
I guess JDK 1.8 lambdas will also not work. Except
if there isn't only a new tomcat 8, but also a new
JSP spec.

It is really driving me towards the functional
programming camp, and trying some of the fancy
functional web solutions. Including some Scala
web frameworks. Since I have a couple of programming
cases that could profit from JSP continuations.

Bye



Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

JDK 1.8 Power not Available for the Web, Yes or No? Jan Burse <janburse@fastmail.fm> - 2014-05-28 23:49 +0200
  Re: JDK 1.8 Power not Available for the Web, Yes or No? Arne Vajhøj <arne@vajhoej.dk> - 2014-05-28 18:15 -0400
    Re: JDK 1.8 Power not Available for the Web, Yes or No? MilkoB <mbrbc111@cogeco.ca> - 2014-05-28 19:27 -0400
  Re: JDK 1.8 Power not Available for the Web, Yes or No? Joerg Meier <joergmmeier@arcor.de> - 2014-05-29 01:03 +0200
    Re: JDK 1.8 Power not Available for the Web, Yes or No? Jan Burse <janburse@fastmail.fm> - 2014-05-29 11:58 +0200
  Re: JDK 1.8 Power not Available for the Web, Yes or No? Jan Burse <janburse@fastmail.fm> - 2014-05-29 10:50 +0200
    Re: JDK 1.8 Power not Available for the Web, Yes or No? Jan Burse <janburse@fastmail.fm> - 2014-05-29 10:59 +0200

csiph-web