Re: Problem: JSP runtime compilation error after upgrade from 7.0.70 to 7.0.72
Ok, editing conf/web.xml and adding compiler=modern does not change anything. "modern" is extracted from tomcat 7 & ant documentation https://tomcat.apache.org/tomcat-7.0-doc/jasper-howto.html#Introduction https://ant.apache.org/manual/Tasks/javac.html (extract from vanilla conf/web.xml, see compiler init param) jsp org.apache.jasper.servlet.JspServlet fork false xpoweredBy false mappedfile true *** ** compiler** ** modern** *** 3 At runtime, i still have jsp 65k limit error, no changes. Seems that "compiler" option did not effects Meanwhile, i've reworked ant script to bypass any possibile "jasper tag" pre definitions under netbeans, and simplified the task. location="/home/agharta/netbeans-8.1/apache-tomcat-7.0.72/lib"/> dir="/home/agharta/netbeans-8.1/apache-tomcat-7.0.72/lib"> dir="/home/agharta/netbeans-8.1/apache-tomcat-7.0.72/bin"> classpath="${xx}"/> Classpath is: ${xx} org.apache.jasper.JspC has taken from default tomcat's ant/catalina.tasks file. So, compilation works fine. The flag compile="true" in customjasper tag means to invoke java to class compilation. And effectively i can see both .java and .class files in my dir tree. Now, when ant jasper compiles files, what compiler type use it? JDT or something like ant default "modern"? (note: Tomcat 7) If JDT, why compilation works fine? If not JDT, how to force JDTCompiler? Thanks again, Agharta On 09/27/2016 12:10 PM, Mark Thomas wrote: On 27/09/2016 10:50, agharta wrote: Hi, Thanks for reply. This could be a nice test to do. And i do it :-) Sorry my poor skill, how to set Jasper to use javac? And vice-versa, how to set ant to use Eclipse? Jasper to use javac: - set the compiler init parameter in $CATALINA_BASE/conf/web.xml - see http://tomcat.apache.org/tomcat-9.0-doc/jasper-howto.html It has been a while since I've done this but the docs for the compiler attribute should tell you everything you need. Mark Thanks a lot, Best regards, Agharta On 09/27/2016 11:45 AM, Mark Thomas wrote: On 27/09/2016 09:58, agharta wrote: So, errors comes up only at runtime compilation. Why? Compiler differences. Pre-compilation uses Javac. Runtime compilation uses the compiler from Eclipse (by default). Another option to consider would be to run Tomcat on a JDK and configure Jasper to compile with javac. Mark - 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: Problem: JSP runtime compilation error after upgrade from 7.0.70 to 7.0.72
Hi, Thanks for reply. This could be a nice test to do. And i do it :-) Sorry my poor skill, how to set Jasper to use javac? And vice-versa, how to set ant to use Eclipse? Thanks a lot, Best regards, Agharta On 09/27/2016 11:45 AM, Mark Thomas wrote: On 27/09/2016 09:58, agharta wrote: So, errors comes up only at runtime compilation. Why? Compiler differences. Pre-compilation uses Javac. Runtime compilation uses the compiler from Eclipse (by default). Another option to consider would be to run Tomcat on a JDK and configure Jasper to compile with javac. Mark - 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: Problem: JSP runtime compilation error after upgrade from 7.0.70 to 7.0.72
Another take, Doing a pre jsp compilation via ant task, jasper2 gives me no jsp error (only warnings). Here the netbeans integration (adapted from https://tomcat.apache.org/tomcat-7.0-doc/jasper-howto.html#Web_Application_Compilation ). Forced absolute tomcat path. file="/home/agharta/netbeans-8.1/apache-tomcat-7.0.72/bin/catalina-tasks.xml"/> depends="pre-compile-jsps-jasper2" > location="/home/agharta/netbeans-8.1/apache-tomcat-7.0.72/lib"/> Now, outpput of compile-jsps-jasper2: compile-jsps-jasper2: Compiling 494 source files to /home/agharta/NetBeansProjects/bookingApp/build/web/WEB-INF/classes Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. BUILD SUCCESSFUL (total time: 14 seconds) Building ok! Looking inside my generated sources i can see the full generated path ... WEB-INF/classes/org/apache/jsp/WEB_002dINF/pages Inside, my non runtime working file: dishBooking/dishBooking_jsp.class The result of pre-compile-jsps-jasper2 generate right dishBooking/dishBooking_jsp.java A difference with old .70 jsp pre compilation is about 1200 new rows added by .72 in .java file. (about 13000 rows totals) Trying to compile at startup time, via load-on-startup gives me errors. So, errors comes up only at runtime compilation. Why? Thanks again, Agharta On 09/26/2016 05:37 PM, Mark Thomas wrote: On 26/09/2016 16:32, agharta wrote: I've searched cause on tomcat official changelog between .70 and .72 but without success. So the question is: why? https://bz.apache.org/bugzilla/show_bug.cgi?id=60126 The same error handling changes are in 7.0.72. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Problem: JSP runtime compilation error after upgrade from 7.0.70 to 7.0.72
Hi all. I have an application with some jsp files. Everything works ok until 7.0.70 version. After upgrade to 7.0.72 (NOTE: same war file, no recompilation or repackaging), at runtime, on jsp page loading, server throws this SEVERE error: Sep 26, 2016 4:49:01 PM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: [206] in the generated java file: [/home/agharta/netbeans-8.1/apache-tomcat-7.0.72/work/Catalina/localhost/bookingApp/org/apache/jsp/WEB_002dINF/pages/dishBooking/dishBooking_jsp.java] The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit Stacktrace: at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366) at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:490) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:379) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:341) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:662) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:747) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:410) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:747) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:410) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at
Re: Can i use Tomcat 7 catalina-ws.jar in Tomcat 8???
On 06/25/2015 04:45 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Agharta, On 6/25/15 10:30 AM, agharta wrote: On 06/25/2015 03:51 PM, Christopher Schultz wrote: Agharta, On 6/25/15 2:39 AM, agharta wrote: On 06/24/2015 06:04 PM, Christopher Schultz wrote: Agharta, On 6/24/15 11:17 AM, agharta wrote: Hi all, A rapid question: colud i place the tomcat 7 catalina-ws.jar inside a new tomcat 8 installation ? Why would you want to do something like that? Because i have many customers, with many different versions of tomcat 7/8 and i'm trying to keep libs update method most simple as possible. Having no per-tomcat-version-libs solves me that problem. Why not just use the libraries that Tomcat already provides? Are you using a Tomcat-specific API for something? If so, what is that API you are using? I'm not using any particular tomcat-specific api (except catalina-ws, needed by jax-ws web services). Simple, catalina-ws.jar is not provided with default tomcat installation, but should be placed manually. To do that, i should: 1) Detect tomcat version (7.x, 8.x) 2) Get the right catalina-ws.jar 3) Place (replace in case of upgrade) the catalina-ws.jar 4) Keep tomcat<->catalina-ws track version for future upgrades. Do you have an installer process of any kind, or are all upgrades done by hand? Detecting the version of Tomcat should be easy, and then you just have to make sure the various catalina-ws.jar files are available. Since you can always pull-down the distro from the ASF, they should always be available (unless you are on a server that does not allow outgoing HTTP connections to the outside world). You could also package all of the catalina-ws.jar versions necessary in your installer... No installer, all upgrades are by hand :( Some customers have a public internet access, others are in a restricted lan :((( I have about 80 customers with about 20 different versions of tomcat (7.x & 8.x.too much, i known.) and i'm searching a quick update method. Something like stop > copy/replace jars and wars > cleanup > start. If you are willing to package one version of catalina-ws.jar, you could package other versions as well. Are you managing the Tomcat installation for your customers? If so, why not upgrade them to a common version? If not, why not just tell your customer that a prerequisite of your product is that catalina-ws.jar is installed and up-to-date? I'm the maintainer, but the company upgrade policy is "upgrade only if it necessary". So, the facts are: 1) Some "old" customers, upgraded years ago with old tomcat version and old war version... 2) A bit of new customers with new tomcat version and wars 3) A lot of "keep updated" customers, with quite recent tomcat and fresh wars The "keep tomcat/webapps upgraded" policy can not be applied because: 1) Company policy (too much spent time to upgrade, customer is already satisfied, etci known, it's not a good policy, but i'm in italysorry ..) 2) Customers are in the National Health System category, so they have 24*7 uptime, cluster, etc, so a stop & restart should be done with care/speed and should be scheduled I hope I have been clear, sorry if not. An offtopic question: do you known why catalina-ws.jar is an optional lib?? Because it's not a part of the main supported APIs: Servlet, JSP, EL, and Websocket. I'm not entirely sure if catalina-ws.jar contains anything Tomcat-version-specific. You could test your own web application against that kind of thing if you wanted to be sure. I'm sorry, but I don't know the answer. You could always use another JSR109 implementation -- one that wasn't sensitive to the Tomcat version. Or use something like Apache Axis2 which, while not being JSR-109-compliant (I think), still supports web services. It's a bit old, though. There is also Apache CXF, which is under active development and probably supports all of the new-fangled things web-services types expect from a support library. Thanks so much for your suggestions, Best regards, Agharta - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJVjBQmAAoJEBzwKT+lPKRYB1YQAMKv85SrgjnIpl9ScB0GRpW1 1oE8EjIVXSzrQFDKlex7ewyc4qTreVAELBcCUAM/uGTYllekXN94mMdmYUwvLi4b /yOovNnsbMnY7qPqrkzEgOJnSJKv77VSadWa9UIoomviZTA9k2dS5D5+GkkBATxf WqmfMesFsfBVqGAkgKAT4iq4nhQloDUmDwfIs6a8IozjPq2UG2tJDidqTpJWBaQw g8WdPByb1a6vj+S/OUKv0cXMn95fi7f3RpJVFGgnxKQ4OfsldrZH72K6w9u3BeFd 36qPUP4OwFcX4xh+4oBZABE03e6sGitPouKn0xTaprqsWOPydcz4Ly4Ap81PdKa5 lcqY/fPSOOQB+p/+/x4E1FDj3kvMxXEMXuN9tedcPbIxjWjhpzEcwrl4SSljOHQl 5AUha8Tqd14l/1lK2QOwDwLrr7cxDQXNcJEgRdUK0y47td8nDz/I2uYWHTuRbcaa XY6Db3ZK4PZUeWkR9MvYhHphVtX6sPthUD4UNsIywJq1DTpq3ZrMF3ccSnRVwSuC icphIAg0TyYgTBz6SUJ6xjT7NjajyQirMazHvJ/xmfVVkU
Re: Can i use Tomcat 7 catalina-ws.jar in Tomcat 8???
On 06/25/2015 03:51 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Agharta, On 6/25/15 2:39 AM, agharta wrote: On 06/24/2015 06:04 PM, Christopher Schultz wrote: Agharta, On 6/24/15 11:17 AM, agharta wrote: Hi all, A rapid question: colud i place the tomcat 7 catalina-ws.jar inside a new tomcat 8 installation ? Why would you want to do something like that? Because i have many customers, with many different versions of tomcat 7/8 and i'm trying to keep libs update method most simple as possible. Having no per-tomcat-version-libs solves me that problem. Why not just use the libraries that Tomcat already provides? Are you using a Tomcat-specific API for something? If so, what is that API you are using? I'm not using any particular tomcat-specific api (except catalina-ws, needed by jax-ws web services). Simple, catalina-ws.jar is not provided with default tomcat installation, but should be placed manually. To do that, i should: 1) Detect tomcat version (7.x, 8.x) 2) Get the right catalina-ws.jar 3) Place (replace in case of upgrade) the catalina-ws.jar 4) Keep tomcat<->catalina-ws track version for future upgrades. I have about 80 customers with about 20 different versions of tomcat (7.x & 8.x.too much, i known.) and i'm searching a quick update method. Something like stop > copy/replace jars and wars > cleanup > start. I hope I have been clear, sorry if not. An offtopic question: do you known why catalina-ws.jar is an optional lib?? Thanks a lot, Best regards, Agharta - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJVjAd/AAoJEBzwKT+lPKRYs1MQAJI0RGajVD/uSi36KIh3GySb Yn2Sz7+zpZ+p0IjYpcayd/2SxIBLVjgl6GtIK2IreHO+8lON7P4tGAMPXnEFYMYl zVsNYQqsJVhp6Bl7THU7Qemypden22A7YgdfN1+X6t79oT587XNLKy/146m/Yaqm V4aJIsjKBFU29hVpmFiKDOdLMNn/+sWpZ0R2kDa1L7rDEVWlekYolqza5XO987fm H/KW55IYuWGjpISLPueXpsotkKcS/VDXOTMWiBVxH4wu+BXYqJNoj2Zieh4fPNkF kwUhxgk7oU6c633e5HZ11RGEitp8nSYZs7mw4icAl74K/YuFGDu2WQfkQggCUk/G u3o+hvANZyBuqL8kDlUHl1/sFNTbXkXOa0GwlXgIxUEND3VPwPqcRoOhorAPFynD pgDUlBqVVTS9wUAdSj42sJcqeJPKm6p3ZPgDdYOAKmSqqYHDeP7TS3+wn54ihWer YOrKeC5njOVyYcZEpnVHjEgDzN68JW49Vzwvl9HQV+ZYWcxi60LyI6yhuoHuboxv cXLVNLm87D7y32N36VQBQiPCyci/VZGcK+sQpyfYVgRvP2FpnnUWZwcQ3fzzTpwO TWWbOFW1Kk1x4qHCUQLlRV9e9ifzvSkODyQTsCbrCKitzUHMRACc/6EkmYYGcEQG 18zpzmV9wrmyZFzvNlaW =d+Fy -END PGP SIGNATURE- - 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: Can i use Tomcat 7 catalina-ws.jar in Tomcat 8???
On 06/24/2015 06:04 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Agharta, On 6/24/15 11:17 AM, agharta wrote: Hi all, A rapid question: colud i place the tomcat 7 catalina-ws.jar inside a new tomcat 8 installation ? Why would you want to do something like that? Because i have many customers, with many different versions of tomcat 7/8 and i'm trying to keep libs update method most simple as possible. Having no per-tomcat-version-libs solves me that problem. Is it compatibile? Probably not. I supposed thatdoh! I've not found any topic about it. Probably nobody ever thought about doing it. you're right again If this qestion was already made, give me the link and sorry for my bad search. - -chris Thank you again, Best regards, Agharta -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJVitT9AAoJEBzwKT+lPKRYHrIP/ROx8an/64gWsexbfZk4nIVV e/7GFcLFNJYy1Lty0WujxkdPvRBie6a6PKRZN/trCPjK5GU7IVaORzh12jK6T+Mx GmFT+WRsLKI6y2DcApgb1SRyk6whQdxeuaUdVTgOW2vgZKUgj2tlKvGJWpffHFa9 sALVSTCfYexEpSY8Q6f9ZjeHP6ZIhZpoLz7Q0mNRi9POJlLobYe8l3Co7KRr0xqJ ky1aWZCtBxbehooHh6aFgv9lA53pp/o6sXm62jprpA299uSiEeVXrKhZmckRtaFs 0U+Yr9J4zCqwGlW0rfueQmh7hn4ws9U/s8v9Vn4zsF1+5HGAl+rEBzRx96dx4cvQ oHQXjEeBRukLvmoYAEUfY5/3DvLbdoerhLV/xBDaYis3+QrAGHwJxk3E8CMIDt2q 8szro10Z6hxAiNgJ98H1gen2oZxy+q00lIouMzlghMNcjSc0ryTmCDOQgxbjyUXv O96IiTilJ3ZcBsaexcXFQLjyjuv9VyCy7jcHHizazEnsJ2wvtqpbpNOVX5vTIVzY aQGl5fo4pANcc7axjShO+JAZPfqR73XJ9VOrt34XlcsCGq4GTh8f4a2lEPyxifIW RuZtqDrVERBv+k2opo3FQ+CDWqpcWoba/aD/FPrYL0NqZ7xbztNVFaMsQA6pN6ps 6wIB2+Ai+dum17X3CuRl =jFu1 -END PGP SIGNATURE- - 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
Can i use Tomcat 7 catalina-ws.jar in Tomcat 8???
Hi all, A rapid question: colud i place the tomcat 7 catalina-ws.jar inside a new tomcat 8 installation ? Is it compatibile? I' ve not found any topic about it. If this qestion was already made, give me the link and sorry for my bad search. Thanks a lot, Agharta - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org