[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-users] JSP using Java 1.7?
|
John,
Ooops, you may need to set the init parram "compilerSourceVM" instead (to 1.7).
Although, re-reading your initial email, it seems like you are using
an old version of jetty-7, so this may not work with the version of
jsp engine in that. If you can upgrade to 7.6.4 I think you should
find that the init param(s) will work.
cheers
Jan
On 12 July 2012 04:21, John English <john.foreign@xxxxxxxxx> wrote:
> On 11/07/2012 03:21, Jan Bartel wrote:
>>
>> 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>
>
>
> Jan,
> Many thanks for this. Googling "compilerTargetVM" took me to your
> "Configuring JSP" how-to, and this gave me a few more hints:
>
> "There are several options for modifying the Jasper JSP servlet
> configuration... Another option is to add an entry for the Jasper
> JSP servlet to the web.xml file of your webapp."
>
> Accordingly I modified web.xml to include the following:
>
>
> <servlet id="jsp">
> <servlet-name>jsp</servlet-name>
> <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
> <init-param>
> <param-name>compilerTargetVM</param-name>
> <param-value>1.7</param-value>
> </init-param>
> <init-param>
> <param-name>fork</param-name>
> <param-value>false</param-value>
> </init-param>
> <init-param>
> <param-name>reload-interval</param-name>
> <param-value>-1</param-value>
>
> </init-param>
> <load-on-startup>0</load-on-startup>
> </servlet>
>
> ... with the usual JSP <servlet-mapping>.
>
> This didn't seem to work. Then I noticed this warning in the how-to:
>
> "For all of the parameters below, if the value you set doesn't take
> effect, try using all lower case instead of camel case, as JSP is
> inconsistent in its parameter naming strategy."
>
> So I tried "compilertargetvm", and again, no luck. I then tried both
> with 7 as the value instead of 1.7, as the error message says "try-
>
> with-resources is not supported in -source 1.5 (use -source 7 or higher
> to enable try-with-resources)", and still no luck.
>
> (That error message is amazingly unhelpful, BTW!)
>
> So, I'm still baffled. Is there anything else you can suggest? Any
> obvious mistakes I'm making?
>
>
> 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.