Re: Strange JSP compilation issues in tomcat 7 and 8
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Paul, On 7/7/15 5:21 AM, p...@kuruma.co.uk wrote: > Hi Christopher, > > I can confirm that in tomcat 8.0.23 the application does not work > with or without ##'s in the file name, however in tomcat 8.0.15 it > works without the hashes. > > I compiled a list of my tests and the exceptions that occurred, > they are different in tomcat 7 and tomcat 8: > > I have them in an excel spreadsheet if they are of any use to you > but I dont know if attachments are allowed on these emails? > > I have managed to get this working now though thankfully and it > was actually down to something quite simple... > > I deployed a standard JSP file and this compiled ok so I narrowed > it down to just being a Tiles issue. > > My pom used to have version 3.0.3 defined and when I upgraded this > to 3.0.5 the issues have gone away in both tomcat 7 and tomcat 8 > using java 7 or java 8 and it also work without issue in tomcat > 8.0.23. > > If only I had tried that first! > > Thanks to everyone who replied offering help. I'm glad to see that (a) Tomcat doesn't have a bug and (b) there is an update to Tiles that works correctly with Tomcat. I suspect the underlying problem was an edge-case conflict with Tomcat's new "resources" implementation, which is based upon URLs instead of the old-style "DirContext" which looked more like a standard filesystem API. This change can make weird things happen if the library isn't consistent about the way it loads resources. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJVnSgHAAoJEBzwKT+lPKRYtFsP/0RCzuSYiyeML3E+foDjkVkF 9pnCfG8NSxX20lf9bxyhFE/OOAYiB3M33CnL5XS5unprBeYOiBdRPlqdgsPucf59 SjDlvFwmePKsJlI7BgW3qLNXQYyVss1MA8mxrSDMbsqKUAcFN2F5mwc84n0em9D7 t2X4eHL01empG8DTHB1xFYrq2PHzHtTL9sU5beajE0araF158gMC6LKqusYGzKcf 9e7iLY1mqfJiFIefp0nPIvfNKeddKaoowr2QoXzkQaxxIX1dsusVux665QeSoIWt MR62GRKSa8/Avk3TyVkZ6ydCcfK0jY9emi9ZJaN7E5WvIVfGmu2IH7vYbYig0k/a m4pVM0Ush8VclMWD+GXOgjseHZm0nKC+mGTb8PHGuBABt850TB7M2btm2OOBVq42 H0IKQtaaMLhmUZKHukjiRZl8KVtDT3p63aPTcmMUhHfT7ZB9EDAredXJxp/jCLZ7 fNoPn9hlBLbfndHFNUq3xyuiaZF7CytJ7iJOWEQKyTVr+mTqlDcDMvp87Qp+0Fau 3ToOsv/7GYoySrwbpPyJShiRlJMZJd/frSB7BHVDIXbtheBXRzJgQGk+X53S9Wrq FS6KL6bPAqujX98wcWCxkQggf9BnLaH2jRgGr62yf0bYeH/E3QLQSehKR2e/cvQZ JLTwfbSsnpyqLiOQSiFX =SDPy -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Strange JSP compilation issues in tomcat 7 and 8
Hi Christopher, I can confirm that in tomcat 8.0.23 the application does not work with or without ##'s in the file name, however in tomcat 8.0.15 it works without the hashes. I compiled a list of my tests and the exceptions that occurred, they are different in tomcat 7 and tomcat 8: I have them in an excel spreadsheet if they are of any use to you but I dont know if attachments are allowed on these emails? I have managed to get this working now though thankfully and it was actually down to something quite simple... I deployed a standard JSP file and this compiled ok so I narrowed it down to just being a Tiles issue. My pom used to have version 3.0.3 defined and when I upgraded this to 3.0.5 the issues have gone away in both tomcat 7 and tomcat 8 using java 7 or java 8 and it also work without issue in tomcat 8.0.23. If only I had tried that first! Thanks to everyone who replied offering help. Paul On Mon, July 6, 2015 8:18 am, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > > Paul, > > > On 7/6/15 9:20 AM, p...@kuruma.co.uk wrote: > >> I was really hoping that there would be something tomcat related in >> the WEB-INF\lib folder but nothing, they are all marked as provided in >> the pom file. >> >> There was a mistake in my original post, in tomcat 8.0.23 my >> application does not work with jdk's 1.7.0_09 or 1.8.0_11 so basically it >> doesnt work at all in 8.023 with or without the ## in the war file name. >> >> >> It seems like tomcat is just unable to compile jsp files in this >> version. >> >> Is there anything else I can check or do? I have seen some people >> say they edited the conf/web.xml for the jsp servlet entry, I tried >> setting the params to 1.7 for compilerSourceVM and compilerTargetVM but >> this had no effect. >> >> I am pretty stuck as the tomcat page >> http://tomcat.apache.org/whichversion.html seems to imply >> everything is compatible?? > > I've seen problems with libraries that use URIs to load files instead > of using the ClassLoader. The problem is that the WAR filename contains "#" > which is an illegal character in a URL. Due to various escaping, > unescaping, re-escaping, etc. it's possible that a certain combination can > result in a file that can't be loaded due to the illegal character issue. > > Can you confirm that your web application otherwise works properly > without the "##" in the filename? > > - -chris > > >> On Mon, July 6, 2015 1:44 am, Felix Schumacher wrote: >> >> >>> Am 4. Juli 2015 11:04:13 MESZ, schrieb p...@kuruma.co.uk: >>> >>> I am working on a spring\tiles application which I have been deploying to tomcat7 (7.0.32 and 7.0.53) and tomcat8 (8.2.0.23) and my war files are built with maven using jdk1.7.0_09. In my pom file I declare the final name using the ## syntax that I was told before on this mailing list would ensure that when deploying to tomcat that I would not get the version name as part of the context and so could just use the web app name in the url and in the past this has worked ok for me. ${finalName}##${project.version} So my war file build with a name like mywebapp##0.0.0.war, I deploy this with tomcat manager or manually and it deploys ok, no errors I can see on deployment. However when I try to access any pages I get jsp compilation issues, in both versions of tomcat 7 I get this error: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.tiles.request.render.CannotRenderException: ServletException including path '/WEB-INF/tiles/layout.jsp'. org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 1 in the generated java file The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files >>> >>> I have seen similar errors on maven based projects, when the jsp >>> api lib was put into WEB-INF/lib/. Check your libs in that location. >>> Remove any servlet specific libs from there. >>> >>> >>> Regards, Felix >>> >>> And when deploying to tomcat8 I get this error: javax.servlet.ServletException: Could not resolve view with name 'base/dashboard/view' in servlet with name 'appServlet' If I deploy the war files without the ## in the name so just like mywebapp.war then they deploy and run fine in both versions of tomcat7 and tomcat8. Does anybody have any idea what could be the problem? I have in the past deployed war files with the ## in the web app name without any issues and whilst they didnt use Spring and Apache Tiles they did use a lot of jsp's and this didnt cause any issues. I should also point out that the web app with the problems contains all the display\front end but t
Re: Strange JSP compilation issues in tomcat 7 and 8
Hi, 2015-07-06 16:20 GMT+03:00 : > > I was really hoping that there would be something tomcat related in the > WEB-INF\lib folder but nothing, they are all marked as provided in the pom > file. Another thing that you can check is that you do not pack ECJ library or in the Tomcat lib you do not have two versions for ECJ library. Regards, Violeta > There was a mistake in my original post, in tomcat 8.0.23 my application > does not work with jdk's 1.7.0_09 or 1.8.0_11 so basically it doesnt work > at all in 8.023 with or without the ## in the war file name. > > It seems like tomcat is just unable to compile jsp files in this version. > > Is there anything else I can check or do? I have seen some people say they > edited the conf/web.xml for the jsp servlet entry, I tried setting the > params to 1.7 for compilerSourceVM and compilerTargetVM but this had no > effect. > > I am pretty stuck as the tomcat page > http://tomcat.apache.org/whichversion.html seems to imply everything is > compatible?? > > On Mon, July 6, 2015 1:44 am, Felix Schumacher wrote: > > > Am 4. Juli 2015 11:04:13 MESZ, schrieb p...@kuruma.co.uk: > > > >> I am working on a spring\tiles application which I have been deploying > >> to tomcat7 (7.0.32 and 7.0.53) and tomcat8 (8.2.0.23) and my war files > >> are built with maven using jdk1.7.0_09. > >> > >> In my pom file I declare the final name using the ## syntax that I was > >> told before on this mailing list would ensure that when deploying to > >> tomcat that I would not get the version name as part of the context and > >> so could just use the web app name in the url and in the past this has > >> worked ok for me. > >> > >> ${finalName}##${project.version} > >> > >> > >> So my war file build with a name like mywebapp##0.0.0.war, I deploy > >> this with tomcat manager or manually and it deploys ok, no errors I can > >> see on deployment. > >> > >> However when I try to access any pages I get jsp compilation issues, in > >> both versions of tomcat 7 I get this error: > >> > >> org.springframework.web.util.NestedServletException: Request processing > >> failed; nested exception is > >> org.apache.tiles.request.render.CannotRenderException: ServletException > >> including path '/WEB-INF/tiles/layout.jsp'. > >> > >> org.apache.jasper.JasperException: Unable to compile class for JSP: > >> > >> > >> An error occurred at line: 1 in the generated java file > >> The type java.util.Map$Entry cannot be resolved. It is indirectly > >> referenced from required .class files > > > > I have seen similar errors on maven based projects, when the jsp api lib > > was put into WEB-INF/lib/. Check your libs in that location. Remove any > > servlet specific libs from there. > > > > Regards, > > Felix > > > >> > >> And when deploying to tomcat8 I get this error: > >> > >> > >> javax.servlet.ServletException: Could not resolve view with name > >> 'base/dashboard/view' in servlet with name 'appServlet' > >> > >> > >> If I deploy the war files without the ## in the name so just like > >> mywebapp.war then they deploy and run fine in both versions of tomcat7 > >> and tomcat8. > >> > >> Does anybody have any idea what could be the problem? > >> > >> > >> I have in the past deployed war files with the ## in the web app name > >> without any issues and whilst they didnt use Spring and Apache Tiles they > >> did use a lot of jsp's and this didnt cause any issues. > >> > >> I should also point out that the web app with the problems contains all > >> the display\front end but the back end which has no jsps or tiles but > >> is still a spring web app but only provides rest apis for the web front > >> end to call does not have any issues with the ## in the war file name > >> and I have not had to change this wars name at all whilst doing this > >> testing. > >> > >> Its odd in that I can start tomcat with the ## and get an error, stop > >> it, clean down the work directory and then remove rhe ## from the war > >> name and restart tomcat and it works now. > >> > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > >> For additional commands, e-mail: users-h...@tomcat.apache.org > >> > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org >
Re: Strange JSP compilation issues in tomcat 7 and 8
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Paul, On 7/6/15 9:20 AM, p...@kuruma.co.uk wrote: > I was really hoping that there would be something tomcat related in > the WEB-INF\lib folder but nothing, they are all marked as provided > in the pom file. > > There was a mistake in my original post, in tomcat 8.0.23 my > application does not work with jdk's 1.7.0_09 or 1.8.0_11 so > basically it doesnt work at all in 8.023 with or without the ## in > the war file name. > > It seems like tomcat is just unable to compile jsp files in this > version. > > Is there anything else I can check or do? I have seen some people > say they edited the conf/web.xml for the jsp servlet entry, I tried > setting the params to 1.7 for compilerSourceVM and compilerTargetVM > but this had no effect. > > I am pretty stuck as the tomcat page > http://tomcat.apache.org/whichversion.html seems to imply > everything is compatible?? I've seen problems with libraries that use URIs to load files instead of using the ClassLoader. The problem is that the WAR filename contains "#" which is an illegal character in a URL. Due to various escaping, unescaping, re-escaping, etc. it's possible that a certain combination can result in a file that can't be loaded due to the illegal character issue. Can you confirm that your web application otherwise works properly without the "##" in the filename? - -chris > On Mon, July 6, 2015 1:44 am, Felix Schumacher wrote: > >> Am 4. Juli 2015 11:04:13 MESZ, schrieb p...@kuruma.co.uk: >> >>> I am working on a spring\tiles application which I have been >>> deploying to tomcat7 (7.0.32 and 7.0.53) and tomcat8 (8.2.0.23) >>> and my war files are built with maven using jdk1.7.0_09. >>> >>> In my pom file I declare the final name using the ## syntax >>> that I was told before on this mailing list would ensure that >>> when deploying to tomcat that I would not get the version name >>> as part of the context and so could just use the web app name >>> in the url and in the past this has worked ok for me. >>> >>> ${finalName}##${project.version} >>> >>> >>> So my war file build with a name like mywebapp##0.0.0.war, I >>> deploy this with tomcat manager or manually and it deploys ok, >>> no errors I can see on deployment. >>> >>> However when I try to access any pages I get jsp compilation >>> issues, in both versions of tomcat 7 I get this error: >>> >>> org.springframework.web.util.NestedServletException: Request >>> processing failed; nested exception is >>> org.apache.tiles.request.render.CannotRenderException: >>> ServletException including path '/WEB-INF/tiles/layout.jsp'. >>> >>> org.apache.jasper.JasperException: Unable to compile class for >>> JSP: >>> >>> >>> An error occurred at line: 1 in the generated java file The >>> type java.util.Map$Entry cannot be resolved. It is indirectly >>> referenced from required .class files >> >> I have seen similar errors on maven based projects, when the jsp >> api lib was put into WEB-INF/lib/. Check your libs in that >> location. Remove any servlet specific libs from there. >> >> Regards, Felix >> >>> >>> And when deploying to tomcat8 I get this error: >>> >>> >>> javax.servlet.ServletException: Could not resolve view with >>> name 'base/dashboard/view' in servlet with name 'appServlet' >>> >>> >>> If I deploy the war files without the ## in the name so just >>> like mywebapp.war then they deploy and run fine in both >>> versions of tomcat7 and tomcat8. >>> >>> Does anybody have any idea what could be the problem? >>> >>> >>> I have in the past deployed war files with the ## in the web >>> app name without any issues and whilst they didnt use Spring >>> and Apache Tiles they did use a lot of jsp's and this didnt >>> cause any issues. >>> >>> I should also point out that the web app with the problems >>> contains all the display\front end but the back end which has >>> no jsps or tiles but is still a spring web app but only >>> provides rest apis for the web front end to call does not have >>> any issues with the ## in the war file name and I have not had >>> to change this wars name at all whilst doing this testing. >>> >>> Its odd in that I can start tomcat with the ## and get an >>> error, stop it, clean down the work directory and then remove >>> rhe ## from the war name and restart tomcat and it works now. >>> >>> >>> - - >>> >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>> For additional commands, e-mail: users-h...@tomcat.apache.org >>> >> >> >> - >> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@to
Re: Strange JSP compilation issues in tomcat 7 and 8
I was really hoping that there would be something tomcat related in the WEB-INF\lib folder but nothing, they are all marked as provided in the pom file. There was a mistake in my original post, in tomcat 8.0.23 my application does not work with jdk's 1.7.0_09 or 1.8.0_11 so basically it doesnt work at all in 8.023 with or without the ## in the war file name. It seems like tomcat is just unable to compile jsp files in this version. Is there anything else I can check or do? I have seen some people say they edited the conf/web.xml for the jsp servlet entry, I tried setting the params to 1.7 for compilerSourceVM and compilerTargetVM but this had no effect. I am pretty stuck as the tomcat page http://tomcat.apache.org/whichversion.html seems to imply everything is compatible?? On Mon, July 6, 2015 1:44 am, Felix Schumacher wrote: > Am 4. Juli 2015 11:04:13 MESZ, schrieb p...@kuruma.co.uk: > >> I am working on a spring\tiles application which I have been deploying >> to tomcat7 (7.0.32 and 7.0.53) and tomcat8 (8.2.0.23) and my war files >> are built with maven using jdk1.7.0_09. >> >> In my pom file I declare the final name using the ## syntax that I was >> told before on this mailing list would ensure that when deploying to >> tomcat that I would not get the version name as part of the context and >> so could just use the web app name in the url and in the past this has >> worked ok for me. >> >> ${finalName}##${project.version} >> >> >> So my war file build with a name like mywebapp##0.0.0.war, I deploy >> this with tomcat manager or manually and it deploys ok, no errors I can >> see on deployment. >> >> However when I try to access any pages I get jsp compilation issues, in >> both versions of tomcat 7 I get this error: >> >> org.springframework.web.util.NestedServletException: Request processing >> failed; nested exception is >> org.apache.tiles.request.render.CannotRenderException: ServletException >> including path '/WEB-INF/tiles/layout.jsp'. >> >> org.apache.jasper.JasperException: Unable to compile class for JSP: >> >> >> An error occurred at line: 1 in the generated java file >> The type java.util.Map$Entry cannot be resolved. It is indirectly >> referenced from required .class files > > I have seen similar errors on maven based projects, when the jsp api lib > was put into WEB-INF/lib/. Check your libs in that location. Remove any > servlet specific libs from there. > > Regards, > Felix > >> >> And when deploying to tomcat8 I get this error: >> >> >> javax.servlet.ServletException: Could not resolve view with name >> 'base/dashboard/view' in servlet with name 'appServlet' >> >> >> If I deploy the war files without the ## in the name so just like >> mywebapp.war then they deploy and run fine in both versions of tomcat7 >> and tomcat8. >> >> Does anybody have any idea what could be the problem? >> >> >> I have in the past deployed war files with the ## in the web app name >> without any issues and whilst they didnt use Spring and Apache Tiles they >> did use a lot of jsp's and this didnt cause any issues. >> >> I should also point out that the web app with the problems contains all >> the display\front end but the back end which has no jsps or tiles but >> is still a spring web app but only provides rest apis for the web front >> end to call does not have any issues with the ## in the war file name >> and I have not had to change this wars name at all whilst doing this >> testing. >> >> Its odd in that I can start tomcat with the ## and get an error, stop >> it, clean down the work directory and then remove rhe ## from the war >> name and restart tomcat and it works now. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Strange JSP compilation issues in tomcat 7 and 8
Am 4. Juli 2015 11:04:13 MESZ, schrieb p...@kuruma.co.uk: >I am working on a spring\tiles application which I have been deploying >to >tomcat7 (7.0.32 and 7.0.53) and tomcat8 (8.2.0.23) and my war files are >built with maven using jdk1.7.0_09. > >In my pom file I declare the final name using the ## syntax that I was >told before on this mailing list would ensure that when deploying to >tomcat that I would not get the version name as part of the context and >so >could just use the web app name in the url and in the past this has >worked >ok for me. > >${finalName}##${project.version} > >So my war file build with a name like mywebapp##0.0.0.war, I deploy >this >with tomcat manager or manually and it deploys ok, no errors I can see >on >deployment. > >However when I try to access any pages I get jsp compilation issues, in >both versions of tomcat 7 I get this error: > >org.springframework.web.util.NestedServletException: Request processing >failed; nested exception is >org.apache.tiles.request.render.CannotRenderException: ServletException >including path '/WEB-INF/tiles/layout.jsp'. > >org.apache.jasper.JasperException: Unable to compile class for JSP: > >An error occurred at line: 1 in the generated java file >The type java.util.Map$Entry cannot be resolved. It is indirectly >referenced from required .class files I have seen similar errors on maven based projects, when the jsp api lib was put into WEB-INF/lib/. Check your libs in that location. Remove any servlet specific libs from there. Regards, Felix > >And when deploying to tomcat8 I get this error: > >javax.servlet.ServletException: Could not resolve view with name >'base/dashboard/view' in servlet with name 'appServlet' > >If I deploy the war files without the ## in the name so just like >mywebapp.war then they deploy and run fine in both versions of tomcat7 >and >tomcat8. > >Does anybody have any idea what could be the problem? > >I have in the past deployed war files with the ## in the web app name >without any issues and whilst they didnt use Spring and Apache Tiles >they >did use a lot of jsp's and this didnt cause any issues. > >I should also point out that the web app with the problems contains all >the display\front end but the back end which has no jsps or tiles but >is >still a spring web app but only provides rest apis for the web front >end >to call does not have any issues with the ## in the war file name and I >have not had to change this wars name at all whilst doing this testing. > >Its odd in that I can start tomcat with the ## and get an error, stop >it, >clean down the work directory and then remove rhe ## from the war name >and >restart tomcat and it works now. > > >- >To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Strange JSP compilation issues in tomcat 7 and 8
I am working on a spring\tiles application which I have been deploying to tomcat7 (7.0.32 and 7.0.53) and tomcat8 (8.2.0.23) and my war files are built with maven using jdk1.7.0_09. In my pom file I declare the final name using the ## syntax that I was told before on this mailing list would ensure that when deploying to tomcat that I would not get the version name as part of the context and so could just use the web app name in the url and in the past this has worked ok for me. ${finalName}##${project.version} So my war file build with a name like mywebapp##0.0.0.war, I deploy this with tomcat manager or manually and it deploys ok, no errors I can see on deployment. However when I try to access any pages I get jsp compilation issues, in both versions of tomcat 7 I get this error: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.tiles.request.render.CannotRenderException: ServletException including path '/WEB-INF/tiles/layout.jsp'. org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 1 in the generated java file The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files And when deploying to tomcat8 I get this error: javax.servlet.ServletException: Could not resolve view with name 'base/dashboard/view' in servlet with name 'appServlet' If I deploy the war files without the ## in the name so just like mywebapp.war then they deploy and run fine in both versions of tomcat7 and tomcat8. Does anybody have any idea what could be the problem? I have in the past deployed war files with the ## in the web app name without any issues and whilst they didnt use Spring and Apache Tiles they did use a lot of jsp's and this didnt cause any issues. I should also point out that the web app with the problems contains all the display\front end but the back end which has no jsps or tiles but is still a spring web app but only provides rest apis for the web front end to call does not have any issues with the ## in the war file name and I have not had to change this wars name at all whilst doing this testing. Its odd in that I can start tomcat with the ## and get an error, stop it, clean down the work directory and then remove rhe ## from the war name and restart tomcat and it works now. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org