[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-users] JSP using Java 1.7?
|
John,
change webdefaults to add this initParam to the jsp servlet:
<init-param>
<param-name>compilerTargetVM</param-name>
<param-value>1.7</param-value>
</init-param>
Don't forget that if you edit $JETTY_HOME/etc/webdefaults.xml that you
will need to ensure that your webapp is using that file, and not the
one embedded inside jetty-webapp.jar (the default).
Jan
On 10 July 2012 21:40, John English <john.foreign@xxxxxxxxx> wrote:
> I'm trying to use try-with-resources in a JSP page and have made
> some progress. I've now got Jetty to use the 1.7 compiler, but
> now I get this error, which I don't understand:
>
>
> HTTP ERROR 500
>
> Problem accessing /times.jsp. Reason:
>
> PWC6033: Error in Javac compilation for JSP
>
>
> PWC6197: An error occurred at line: 6 in the jsp file: /times.jsp
> PWC6199: Generated servlet error:
> try-with-resources is not supported in -source 1.5
> (use -source 7 or higher to enable try-with-resources)
>
> Where do I need to specify "-source 7"?
>
>
> TIA,
> --
> John English
>
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com – Developer advice, services and support
from the Jetty & CometD experts.