Juan, Indeed, it is strange that the default on TOMCAT 8.x is the compile the JSP with 1.7. Anyway, ok to move the recommendation up to TOMCAT 9.X ; possillbly adding the information on the extra config lines needed to run jspwiki on TOMCAT 8.x.
It took some time to diagnose, as indeed all tests were running successfully. I was not aware that we have no page-edit yet in the integration tests ? dirk On Thu, Mar 5, 2020 at 1:50 PM Juan Pablo Santos Rodríguez < juanpablo.san...@gmail.com> wrote: > Hi Dirk, > > also running with JDK-8, and ran into the same problem. Seems extremely > weird to me, as we're enforcing/building/running with JDK-8, > but according to https://stackoverflow.com/a/47461590 it's the expected > behaviour: tomcat 8 by default uses JDK-7 level to compile and > run the JSPs (tomcat 9 uses JDK-8 for the same thing). > > Our README.md file simply states that the following prerequisites are > needed (textually): > > - A JSP engine that supports Servlet API 3.1. We recommend Tomcat from > http://tomcat.apache.org/ for a really easy installation. > Tomcat 8.x or later is supported. > > - JDK 8+ > > I'd rather update that doc to state that Tomcat 9 is recommended, although > Tomcat 8 is supported, with a link to a new entry to > > https://jspwiki-wiki.apache.org/Wiki.jsp?page=Common%20problems%20when%20building%20JSPWiki > describing how to run JSPWiki > with Tomcat 8.x. > > That way the expected installation should be as smooth as ever.. We should > also update the cargo maven plugin configuration to use > tomcat 9, but that should be trivial. > > Thoughts? > > Also related to this, I ran the integration tests before last push (there > were a lot of changes), and they were ok, as they right now just > perform a login / logout + an anonymous view test. I still have pending > adding an integration test to verify a page edit which would have caught > this problem on the first place :-/ > > > best regards, > juan pablo > > On Thu, Mar 5, 2020 at 1:22 PM Dirk Frederickx <dirk.frederi...@gmail.com> > wrote: > > > Following additions to the tomcat/conf/web.xml fixed the problem. > > We probably need to make a note of this on the jspwiki docs (min > > requirement tomcat 8.5; + ... ) ? > > > > <init-param> > > <param-name>compilerSourceVM</param-name> > > <param-value>1.8</param-value> > > </init-param> > > <init-param> > > <param-name>compilerTargetVM</param-name> > > <param-value>1.8</param-value> > > </init-param> > > > > > > dirk > > > > On Wed, Mar 4, 2020 at 10:38 PM Dirk Frederickx < > dirk.frederi...@gmail.com > > > > > wrote: > > > > > I'm getting following error after installing the latest version. It > > occurs when trying to edit a page. Seems a problem with the latest > version > > of the EditorManager class. Any clue? > > > > > > (running tomcat 8.5.37; with jdk 1.8) > > > > > > > > > >>>> > > > > > > org.apache.jasper.JasperException: Unable to compile class for JSP: > > > > > > An error occurred at line: [72] in the jsp file: [/Edit.jsp] > > > References to interface static methods are allowed only at source level > > 1.8 or above > > > > > > 69: String edit = request.getParameter("edit"); > > > 70: String author = TextUtil.replaceEntities( findParam( > > pageContext, "author" ) ); > > > 71: String changenote = findParam( pageContext, "changenote" ); > > > 72: String text = EditorManager.getEditedText( pageContext ); > > > 73: String link = TextUtil.replaceEntities( findParam( > > pageContext, "link") ); > > > 74: String spamhash = findParam( pageContext, > > SpamFilter.getHashFieldName(request) ); > > > 75: String captcha = (String)session.getAttribute("captcha"); > > > > > > > > > > > > dirk > > > > > > > > >