Re: JasperException: Unable to compile class for JSP
Put it in a package ... http://jakarta.apache.org/tomcat/faq/classnotfound.html -Tim Goo GGooo wrote: On 10/4/05, Wendy Smoak wrote: From: Goo GGooo [EMAIL PROTECTED] An error occurred at line: 1 in the jsp file: /name.jsp Generated servlet error: UserData cannot be resolved or is not a type === Files webapps/tut/name.jsp and webapps/tut/WEB-INF/classes/UserData.java are attached. Try putting UserData in a package. That works, cool! What's the reason for that? Can I make it running without packages? (just interested, not that I'm unhappy with having it in a package :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JasperException: Unable to compile class for JSP
Hi all, I've got Tomcat 5.5.9 running on SUSE Linux 9.2, followed tutorial at http://www.coreservlets.com/Apache-Tomcat-Tutorial/ and got it up and running, can see the Tomcat mainpage and run all bundled examples. However when I try a trivial example with HTML forms Tomcat barfs: === org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 1 in the jsp file: /name.jsp Generated servlet error: UserData cannot be resolved or is not a type === Files webapps/tut/name.jsp and webapps/tut/WEB-INF/classes/UserData.java are attached. Of course I've got UserData.java compiled into .class at the same directory and everything is readable for Tomcat. What can be a reason for this error? Do I need to configure something to let Tomcat know about this class? I'm sorry for this newbie question - I'm sure it's something trivial but I have experience with neither Tomcat nor JSP/servlets and am basically stuck. Thanks! Goo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JasperException: Unable to compile class for JSP
On 10/4/05, Wendy Smoak wrote: From: Goo GGooo [EMAIL PROTECTED] An error occurred at line: 1 in the jsp file: /name.jsp Generated servlet error: UserData cannot be resolved or is not a type === Files webapps/tut/name.jsp and webapps/tut/WEB-INF/classes/UserData.java are attached. Try putting UserData in a package. That works, cool! What's the reason for that? Can I make it running without packages? (just interested, not that I'm unhappy with having it in a package :-) Thanks Goo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
compile precompile jsps at runtime
Hi all, Is there a way to compile precompiled jsp at runtime? i.e., I want to precompiled my jsp before deployment, but after they are deployed I still want to make changes to the jsps that will take effect immediately. I want to be able to change jsp and see the changes immediately although they are precompiled Does anyone knows how to do it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: compile precompile jsps at runtime
Can't with tomcat out of the box. -Tim Zachi Hazan wrote: Hi all, Is there a way to compile precompiled jsp at runtime? i.e., I want to precompiled my jsp before deployment, but after they are deployed I still want to make changes to the jsps that will take effect immediately. I want to be able to change jsp and see the changes immediately although they are precompiled Does anyone knows how to do it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: compile precompile jsps at runtime
So, how can I do it with tomcat not out of the box? Tim Funk wrote: Can't with tomcat out of the box. -Tim Zachi Hazan wrote: Hi all, Is there a way to compile precompiled jsp at runtime? i.e., I want to precompiled my jsp before deployment, but after they are deployed I still want to make changes to the jsps that will take effect immediately. I want to be able to change jsp and see the changes immediately although they are precompiled Does anyone knows how to do it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: compile precompile jsps at runtime
A lot of custom coding on your own. You'd need a filter which traps all your precompiled servlet mappings and then checks to see of the jsp the file was mapped to has changed. Then you'd need to somehow manage compiling the JSP and loading the class file while ignoring the existing mapping. In a nutshell ... not pretty. Or you can have tomcat run in production mode (for the jsp servlet) and all the jsp's get compiled in the background when they are changed. But this relies on jsps NOT being precompiled. -Tim Zachi Hazan wrote: So, how can I do it with tomcat not out of the box? Tim Funk wrote: Can't with tomcat out of the box. -Tim Zachi Hazan wrote: Hi all, Is there a way to compile precompiled jsp at runtime? i.e., I want to precompiled my jsp before deployment, but after they are deployed I still want to make changes to the jsps that will take effect immediately. I want to be able to change jsp and see the changes immediately although they are precompiled Does anyone knows how to do it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: compile precompile jsps at runtime
From: Zachi Hazan [mailto:[EMAIL PROTECTED] Subject: Re: compile precompile jsps at runtime So, how can I do it with tomcat not out of the box? One approach would be to cheat! Tomcat compiles the page when the page is first invoked. So, you could for example define a special parameter as part of the query string (such as 'precompile=true') and modify the code for each page so that if the parameter is found, the page does nothing. However, Tomcat has still compiled it. Then all you need is some kind of script (using cURL or a similar tool) that fetches each page and adds a '?precompile=true' suffix. Deploy, run the script, and all your pages are precompiled. Low-tech, I agree, and I suspect others on the list will be able to come up with a better approach. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: JspC compile exception in tomcat-deployer 5.5.10
Hi Richard, the problem is that your classpath for the jasper path is not correct. So this Null Pointer exception actually means that some class was not found. Note that you need all the tomcat libraries in your jaser classpath, as well as your libs as well. I post you my script, which is working Ok (on Tomcat 5.5.7). Cheers Bernhard taskdef classname=org.apache.jasper.JspC name=jasper2 classpath id=jspc.classpath pathelement location=${java.home}/../lib/tools.jar/ fileset dir=${tomcat.home}/bin include name=*.jar/ /fileset fileset dir=${tomcat.home}/server/lib include name=*.jar/ /fileset fileset dir=${tomcat.home}/common/lib include name=*.jar/ /fileset fileset dir=${webapproot}${webappname}/WEB-INF/lib include name=*.jar/ /fileset /classpath /taskdef -Ursprüngliche Nachricht- Von: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Gesendet: Montag, 15. August 2005 23:58 An: tomcat-user@jakarta.apache.org Betreff: JspC compile exception in tomcat-deployer 5.5.10 Hello, I am using the jakarta-tomcat-5.5.10-deployer to deploy my customized war file to tomcat. When I have it do the compile target so it pre-compiles the JSP's I get the exception below (its sort of long). I've got the source and can see that it is happening as it processes the JSPs. But it gives no clue as to which JSP is causing the problem. Is there a way to turn on a trace that would list each file as it is processed? I've also looked in the output directory - but there are not class files at all. And the generated_web.xml is completely empty at this point. Here is how I've got the jasper2 task defined in my build.xml: jasper2 validateXml=false uriroot=${webapp.path} webXmlFragment=${webapp.path}/WEB-INF/generated_web.xml addWebXmlMappings=true outputDir=${webapp.path}/WEB-INF/classes / Notice that I turned validateXml to false - otherwise I get the following message: [jasper2] org.xml.sax.SAXParseException: Document is invalid: no grammar found. I have compared and compared my web.xml to the spec and it seems to be OK. It complains about position 9 in the 3rd line. Line 3 follows, position 9 is the start of the xmlns= attribute: web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 ... which appears to be fine. Any ideas or help is appreciated. I have tried this a few months back in 5.5.7 but got the same results (worked fine in 5.0.19). I imagine its a problem either in one of my JSPs or in the web.xml - but cannot figure it out. Thanks in advance for any ideas. - Richard Exception from running ant compile: Loaded from C:\jakarta-tomcat-5.5.10-deployer\lib\jasper-compiler.jar org/apache/jasper/compiler/AntCompiler.class Class org.apache.jasper.compiler.AntCompiler loaded from ant loader (parentFirst) Class org.apache.tools.ant.BuildListener loaded from parent loader (parentFirst) Couldn't load Resource commons-logging.properties Couldn't load Resource META-INF/services/org.apache.commons.logging.LogFactory Finding class org.apache.log4j.Logger Finding class org.apache.log4j.Category Finding class org.apache.log4j.spi.AppenderAttachable Finding class org.apache.commons.logging.impl.Log4JLogger Loaded from C:\jakarta-tomcat-5.5.10-deployer\lib\commons-logging.jar org/apache/commons/logging/impl/Log4JLogger.class Class org.apache.commons.logging.impl.Log4JLogger loaded from ant loader (parentFirst) Finding class org.apache.log4j.Category Finding class org.apache.log4j.Category [jasper2] java.lang.NullPointerException [jasper2] at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext .java:220) [jasper2] at org.apache.jasper.JspC.processFile(JspC.java:913) [jasper2] at org.apache.jasper.JspC.execute(JspC.java:1061) [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) [jasper2] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) [jasper2] at java.lang.reflect.Method.invoke(Method.java:585) [jasper2] at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123) [jasper2] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [jasper2] at org.apache.tools.ant.Task.perform(Task.java:364) [jasper2] at org.apache.tools.ant.Target.execute(Target.java:341) [jasper2] at org.apache.tools.ant.Target.performTasks(Target.java:369) [jasper2
Re: JspC compile exception in tomcat-deployer 5.5.10
On 8/16/05, Bernhard Slominski [EMAIL PROTECTED] wrote: Hi Richard, the problem is that your classpath for the jasper path is not correct. So this Null Pointer exception actually means that some class was not found. Note that you need all the tomcat libraries in your jaser classpath, as well as your libs as well. I post you my script, which is working Ok (on Tomcat 5.5.7). Yes, the problem is indeed that the task definition had been mistakingly removed in this build from the catalina.tasks properties file. -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JspC compile exception in tomcat-deployer 5.5.10
Hello, I am using the jakarta-tomcat-5.5.10-deployer to deploy my customized war file to tomcat. When I have it do the "compile" target so it pre-compiles the JSP's I get theexception below (its sort of long). I've got the source and can see that it is happening as it processes the JSPs. But it givesno clue as to which JSP is causing the problem. Is there a way to turn on a trace that would list each file as it is processed? I've also looked in the output directory - but there are not class files at all. And the generated_web.xml is completely empty at this point. Here is how I've got the jasper2 task defined in my build.xml: jasper2 validateXml="false" uriroot="${webapp.path}" webXmlFragment="${webapp.path}/WEB-INF/generated_web.xml" addWebXmlMappings="true" outputDir="${webapp.path}/WEB-INF/classes" / Notice that I turned validateXml to false - otherwise I get the following message: [jasper2] org.xml.sax.SAXParseException: Document is invalid: no grammar found. I have compared and compared my web.xml to the spec and it seems to be OK. It complains about position 9 in the 3rd line. Line 3 follows, position 9 is the start of the "xmlns=" attribute: web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"... which appears to be fine. Any ideas or help is appreciated. I have tried this a few months back in 5.5.7 but got the same results (worked fine in 5.0.19). I imagine its a problem either in one of my JSPs or in the web.xml - but cannot figure it out. Thanks in advance for any ideas. - Richard Exception from running "ant compile": Loaded from C:\jakarta-tomcat-5.5.10-deployer\lib\jasper-compiler.jar org/apache/jasper/compiler/AntCompiler.classClass org.apache.jasper.compiler.AntCompiler loaded from ant loader (parentFirst)Class org.apache.tools.ant.BuildListener loaded from parent loader (parentFirst)Couldn't load Resource commons-logging.propertiesCouldn't load Resource META-INF/services/org.apache.commons.logging.LogFactoryFinding class org.apache.log4j.LoggerFinding class org.apache.log4j.CategoryFinding class org.apache.log4j.spi.AppenderAttachableFinding class org.apache.commons.logging.impl.Log4JLoggerLoaded from C:\jakarta-tomcat-5.5.10-deployer\lib\commons-logging.jar org/apache/commons/logging/impl/Log4JLogger.classClass org.apache.commons.logging.impl.Log4JLogger loaded from ant loader (parentFirst)Finding class org.apache.log4j.CategoryFinding class org.apache.log4j.Category [jasper2] java.lang.NullPointerException [jasper2] at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:220) [jasper2] at org.apache.jasper.JspC.processFile(JspC.java:913) [jasper2] at org.apache.jasper.JspC.execute(JspC.java:1061) [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [jasper2] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [jasper2] at java.lang.reflect.Method.invoke(Method.java:585) [jasper2] at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123) [jasper2] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [jasper2] at org.apache.tools.ant.Task.perform(Task.java:364) [jasper2] at org.apache.tools.ant.Target.execute(Target.java:341) [jasper2] at org.apache.tools.ant.Target.performTasks(Target.java:369) [jasper2] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [jasper2] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [jasper2] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [jasper2] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [jasper2] at org.apache.tools.ant.Main.runBuild(Main.java:668) [jasper2] at org.apache.tools.ant.Main.startAnt(Main.java:187) [jasper2] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [jasper2] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67) [jasper2] Error in class org.apache.jasper.JspC BUILD FAILEDC:\jakarta-tomcat-5.5.10-deployer\build.xml:49: org.apache.jasper.JasperException at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:131) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:341) at org.apache.tools.ant.Target.performTasks(Target.java:369) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) at org.apache.tools.ant.Project.executeTarget(Project.java:1185) at org.apache.tools.ant.help
Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9
Hi all, I am having difficulties to figure out the solution for this issue. Jsp pages with log4j logging statements that worked perfect on Tomcat 4.1.30 could not compile on Tomcat 5.5.9. I commented out the log4j statements for these problematic pages, then, tomcat 5.5.9 could compile them. Except commenting out all the log4j statements for the jsp pages in order to run on Tomcat 5.5.9, does anyone have any other solutions? Below is the JasperException message when attempting to compile JSP pages with log4j statements: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 39 in the jsp file: /sysco/agent_report_all_in.jsp Generated servlet error: agent_report_all_in_jsp cannot be resolved or is not a type org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHa ndler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.ja va:328) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:39 7) org.apache.jasper.compiler.Compiler.compile(Compiler.java:288) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja va:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Thanks Gary
RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9
Can you post the JSP directives, and the scriplet that calls log4j? Also, you have been given a line number 39 .. can you work out which line this is in the work directory. Allistair. -Original Message- From: Gary Zhu [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 16:17 To: Tomcat Users List Subject: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Hi all, I am having difficulties to figure out the solution for this issue. Jsp pages with log4j logging statements that worked perfect on Tomcat 4.1.30 could not compile on Tomcat 5.5.9. I commented out the log4j statements for these problematic pages, then, tomcat 5.5.9 could compile them. Except commenting out all the log4j statements for the jsp pages in order to run on Tomcat 5.5.9, does anyone have any other solutions? Below is the JasperException message when attempting to compile JSP pages with log4j statements: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 39 in the jsp file: /sysco/agent_report_all_in.jsp Generated servlet error: agent_report_all_in_jsp cannot be resolved or is not a type org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa ultErrorHa ndler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis patcher.ja va:328) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil er.java:39 7) org.apache.jasper.compiler.Compiler.compile(Compiler.java:288) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilation Context.ja va:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServlet Wrapper.ja va:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet .java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Thanks Gary FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9
Thanks Allistair. Below is the snippet of the code, I indicated line 39 as well. %@ page import=javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.io.File, java.io.FileOutputStream, java.io.IOException, java.io.BufferedReader, java.io.FileInputStream, java.util.StringTokenizer, java.util.ArrayList, java.io.InputStreamReader, java.io.InputStream, java.io.OutputStream, com.timeicr.sysco.web.bean.AgentBean, com.timeicr.util.web.session.*, org.apache.log4j.* % % response.setHeader(Cache-Control,no-cache); //HTTP 1.1 response.setHeader(Pragma,no-cache); //HTTP 1.0 response.setDateHeader(Expires, 0); //prevents caching at the proxy server % (Line 39)%! static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(agent_report_all_in_jsp.class); % Gary -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: August 12, 2005 11:20 AM To: Tomcat Users List Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Can you post the JSP directives, and the scriplet that calls log4j? Also, you have been given a line number 39 .. can you work out which line this is in the work directory. Allistair. -Original Message- From: Gary Zhu [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 16:17 To: Tomcat Users List Subject: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Hi all, I am having difficulties to figure out the solution for this issue. Jsp pages with log4j logging statements that worked perfect on Tomcat 4.1.30 could not compile on Tomcat 5.5.9. I commented out the log4j statements for these problematic pages, then, tomcat 5.5.9 could compile them. Except commenting out all the log4j statements for the jsp pages in order to run on Tomcat 5.5.9, does anyone have any other solutions? Below is the JasperException message when attempting to compile JSP pages with log4j statements: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 39 in the jsp file: /sysco/agent_report_all_in.jsp Generated servlet error: agent_report_all_in_jsp cannot be resolved or is not a type org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa ultErrorHa ndler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis patcher.ja va:328) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil er.java:39 7) org.apache.jasper.compiler.Compiler.compile(Compiler.java:288) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilation Context.ja va:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServlet Wrapper.ja va:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet .java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Thanks Gary FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9
It doesn't like the agent_report_all_in_jsp classname. I'm guessing that's supposed to be the name of the servlet class generated from the jsp. Are you sure it's correct? If it is then you may have to use a String argument instead of a class when calling the Logger factory method. Gary Zhu wrote: Thanks Allistair. Below is the snippet of the code, I indicated line 39 as well. %@ page import=javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.io.File, java.io.FileOutputStream, java.io.IOException, java.io.BufferedReader, java.io.FileInputStream, java.util.StringTokenizer, java.util.ArrayList, java.io.InputStreamReader, java.io.InputStream, java.io.OutputStream, com.timeicr.sysco.web.bean.AgentBean, com.timeicr.util.web.session.*, org.apache.log4j.* % % response.setHeader(Cache-Control,no-cache); //HTTP 1.1 response.setHeader(Pragma,no-cache); //HTTP 1.0 response.setDateHeader(Expires, 0); //prevents caching at the proxy server % (Line 39)%! static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(agent_report_all_in_jsp.class); % Gary -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: August 12, 2005 11:20 AM To: Tomcat Users List Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Can you post the JSP directives, and the scriplet that calls log4j? Also, you have been given a line number 39 .. can you work out which line this is in the work directory. Allistair. -Original Message- From: Gary Zhu [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 16:17 To: Tomcat Users List Subject: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Hi all, I am having difficulties to figure out the solution for this issue. Jsp pages with log4j logging statements that worked perfect on Tomcat 4.1.30 could not compile on Tomcat 5.5.9. I commented out the log4j statements for these problematic pages, then, tomcat 5.5.9 could compile them. Except commenting out all the log4j statements for the jsp pages in order to run on Tomcat 5.5.9, does anyone have any other solutions? Below is the JasperException message when attempting to compile JSP pages with log4j statements: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 39 in the jsp file: /sysco/agent_report_all_in.jsp Generated servlet error: agent_report_all_in_jsp cannot be resolved or is not a type org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa ultErrorHa ndler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis patcher.ja va:328) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil er.java:39 7) org.apache.jasper.compiler.Compiler.compile(Compiler.java:288) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilation Context.ja va:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServlet Wrapper.ja va:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet .java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9
I think Jon maybe onto something ... to use agent_report_all_in_jsp.class your JSP would need to be called agent_report_all_in.jsp Is that the case? Allistair/ -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 16:44 To: Tomcat Users List Subject: Re: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 It doesn't like the agent_report_all_in_jsp classname. I'm guessing that's supposed to be the name of the servlet class generated from the jsp. Are you sure it's correct? If it is then you may have to use a String argument instead of a class when calling the Logger factory method. Gary Zhu wrote: Thanks Allistair. Below is the snippet of the code, I indicated line 39 as well. %@ page import=javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.io.File, java.io.FileOutputStream, java.io.IOException, java.io.BufferedReader, java.io.FileInputStream, java.util.StringTokenizer, java.util.ArrayList, java.io.InputStreamReader, java.io.InputStream, java.io.OutputStream, com.timeicr.sysco.web.bean.AgentBean, com.timeicr.util.web.session.*, org.apache.log4j.* % % response.setHeader(Cache-Control,no-cache); //HTTP 1.1 response.setHeader(Pragma,no-cache); //HTTP 1.0 response.setDateHeader(Expires, 0); //prevents caching at the proxy server % (Line 39)%! static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(agent_report_all_in_jsp.class); % Gary -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: August 12, 2005 11:20 AM To: Tomcat Users List Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Can you post the JSP directives, and the scriplet that calls log4j? Also, you have been given a line number 39 .. can you work out which line this is in the work directory. Allistair. -Original Message- From: Gary Zhu [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 16:17 To: Tomcat Users List Subject: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Hi all, I am having difficulties to figure out the solution for this issue. Jsp pages with log4j logging statements that worked perfect on Tomcat 4.1.30 could not compile on Tomcat 5.5.9. I commented out the log4j statements for these problematic pages, then, tomcat 5.5.9 could compile them. Except commenting out all the log4j statements for the jsp pages in order to run on Tomcat 5.5.9, does anyone have any other solutions? Below is the JasperException message when attempting to compile JSP pages with log4j statements: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 39 in the jsp file: /sysco/agent_report_all_in.jsp Generated servlet error: agent_report_all_in_jsp cannot be resolved or is not a type org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa ultErrorHa ndler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis patcher.ja va:328) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil er.java:39 7) org.apache.jasper.compiler.Compiler.compile(Compiler.java:288) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilation Context.ja va:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServlet Wrapper.ja va:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet .java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9
First of all, I am not the one who did this app. Second, it is the case that the JSP file is called agent_report_all_in.jsp. The question is: Why it runs perfect on Tomcat 4.1.30, and has issues with Tomcat 5.5.9? The JasperCompiler on Tomcat5.5.9 has introduced some bugs that JasperCompiler on Tomcat 4.1.30 does not have? Thanks. Gary -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: August 12, 2005 11:46 AM To: Tomcat Users List Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 I think Jon maybe onto something ... to use agent_report_all_in_jsp.class your JSP would need to be called agent_report_all_in.jsp Is that the case? Allistair/ -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 16:44 To: Tomcat Users List Subject: Re: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 It doesn't like the agent_report_all_in_jsp classname. I'm guessing that's supposed to be the name of the servlet class generated from the jsp. Are you sure it's correct? If it is then you may have to use a String argument instead of a class when calling the Logger factory method. Gary Zhu wrote: Thanks Allistair. Below is the snippet of the code, I indicated line 39 as well. %@ page import=javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.io.File, java.io.FileOutputStream, java.io.IOException, java.io.BufferedReader, java.io.FileInputStream, java.util.StringTokenizer, java.util.ArrayList, java.io.InputStreamReader, java.io.InputStream, java.io.OutputStream, com.timeicr.sysco.web.bean.AgentBean, com.timeicr.util.web.session.*, org.apache.log4j.* % % response.setHeader(Cache-Control,no-cache); //HTTP 1.1 response.setHeader(Pragma,no-cache); //HTTP 1.0 response.setDateHeader(Expires, 0); //prevents caching at the proxy server % (Line 39)%! static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(agent_report_all_in_jsp.class); % Gary -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: August 12, 2005 11:20 AM To: Tomcat Users List Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Can you post the JSP directives, and the scriplet that calls log4j? Also, you have been given a line number 39 .. can you work out which line this is in the work directory. Allistair. -Original Message- From: Gary Zhu [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 16:17 To: Tomcat Users List Subject: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Hi all, I am having difficulties to figure out the solution for this issue. Jsp pages with log4j logging statements that worked perfect on Tomcat 4.1.30 could not compile on Tomcat 5.5.9. I commented out the log4j statements for these problematic pages, then, tomcat 5.5.9 could compile them. Except commenting out all the log4j statements for the jsp pages in order to run on Tomcat 5.5.9, does anyone have any other solutions? Below is the JasperException message when attempting to compile JSP pages with log4j statements: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 39 in the jsp file: /sysco/agent_report_all_in.jsp Generated servlet error: agent_report_all_in_jsp cannot be resolved or is not a type org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa ultErrorHa ndler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis patcher.ja va:328) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil er.java:39 7) org.apache.jasper.compiler.Compiler.compile(Compiler.java:288) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilation Context.ja va:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServlet Wrapper.ja va:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet .java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE
RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9
Hi, It doesn't really matter if you did the app or not, it's irrelevant to this conversation and you asked a question. Anyway, yes an awful lot has changed between 4.1 and 5.5 including the Jasper compiler, see the change logs. However, I have tested your declaration on 5.5.9 and do not get this error therefore I think we can rule out the Jasper compiler. %! static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(_5_jsp.class); % Have you definately cross-checked the class filename in the tomcat_home/work/Catalina/localhost/_/org/apache/jsp location? Allistair. -Original Message- From: Gary Zhu [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 17:08 To: Tomcat Users List Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 First of all, I am not the one who did this app. Second, it is the case that the JSP file is called agent_report_all_in.jsp. The question is: Why it runs perfect on Tomcat 4.1.30, and has issues with Tomcat 5.5.9? The JasperCompiler on Tomcat5.5.9 has introduced some bugs that JasperCompiler on Tomcat 4.1.30 does not have? Thanks. Gary -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: August 12, 2005 11:46 AM To: Tomcat Users List Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 I think Jon maybe onto something ... to use agent_report_all_in_jsp.class your JSP would need to be called agent_report_all_in.jsp Is that the case? Allistair/ -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 16:44 To: Tomcat Users List Subject: Re: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 It doesn't like the agent_report_all_in_jsp classname. I'm guessing that's supposed to be the name of the servlet class generated from the jsp. Are you sure it's correct? If it is then you may have to use a String argument instead of a class when calling the Logger factory method. Gary Zhu wrote: Thanks Allistair. Below is the snippet of the code, I indicated line 39 as well. %@ page import=javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.io.File, java.io.FileOutputStream, java.io.IOException, java.io.BufferedReader, java.io.FileInputStream, java.util.StringTokenizer, java.util.ArrayList, java.io.InputStreamReader, java.io.InputStream, java.io.OutputStream, com.timeicr.sysco.web.bean.AgentBean, com.timeicr.util.web.session.*, org.apache.log4j.* % % response.setHeader(Cache-Control,no-cache); //HTTP 1.1 response.setHeader(Pragma,no-cache); //HTTP 1.0 response.setDateHeader(Expires, 0); //prevents caching at the proxy server % (Line 39)%! static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(agent_report_all_in_jsp.class); % Gary -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: August 12, 2005 11:20 AM To: Tomcat Users List Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Can you post the JSP directives, and the scriplet that calls log4j? Also, you have been given a line number 39 .. can you work out which line this is in the work directory. Allistair. -Original Message- From: Gary Zhu [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 16:17 To: Tomcat Users List Subject: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Hi all, I am having difficulties to figure out the solution for this issue. Jsp pages with log4j logging statements that worked perfect on Tomcat 4.1.30 could not compile on Tomcat 5.5.9. I commented out the log4j statements for these problematic pages, then, tomcat 5.5.9 could compile them. Except commenting out all the log4j statements for the jsp pages in order to run on Tomcat 5.5.9, does anyone have any other solutions? Below is the JasperException message when attempting to compile JSP pages with log4j statements: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 39 in the jsp file: /sysco/agent_report_all_in.jsp Generated servlet error: agent_report_all_in_jsp cannot be resolved or is not a type org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa ultErrorHa ndler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError
Re: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9
One major change between the 4.1.x branch and the 5.x.x branch is packages in generated servlets. In tc4.1.x all the jsps were in the org.apache.jsp package irrespective of the structure of the site. From 5 onwards the jsp directory structure is also part of the package name. So, my guess is agent_report_all_in.jsp is in a different directory from the one that fails to compile. It works in 4.1 but needs to be imported in 5.x.x. Allistair Crossley wrote: Hi, It doesn't really matter if you did the app or not, it's irrelevant to this conversation and you asked a question. Anyway, yes an awful lot has changed between 4.1 and 5.5 including the Jasper compiler, see the change logs. However, I have tested your declaration on 5.5.9 and do not get this error therefore I think we can rule out the Jasper compiler. %! static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(_5_jsp.class); % Have you definately cross-checked the class filename in the tomcat_home/work/Catalina/localhost/_/org/apache/jsp location? Allistair. -Original Message- From: Gary Zhu [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 17:08 To: Tomcat Users List Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 First of all, I am not the one who did this app. Second, it is the case that the JSP file is called agent_report_all_in.jsp. The question is: Why it runs perfect on Tomcat 4.1.30, and has issues with Tomcat 5.5.9? The JasperCompiler on Tomcat5.5.9 has introduced some bugs that JasperCompiler on Tomcat 4.1.30 does not have? Thanks. Gary -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: August 12, 2005 11:46 AM To: Tomcat Users List Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 I think Jon maybe onto something ... to use agent_report_all_in_jsp.class your JSP would need to be called agent_report_all_in.jsp Is that the case? Allistair/ -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 16:44 To: Tomcat Users List Subject: Re: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 It doesn't like the agent_report_all_in_jsp classname. I'm guessing that's supposed to be the name of the servlet class generated from the jsp. Are you sure it's correct? If it is then you may have to use a String argument instead of a class when calling the Logger factory method. Gary Zhu wrote: Thanks Allistair. Below is the snippet of the code, I indicated line 39 as well. %@ page import=javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.io.File, java.io.FileOutputStream, java.io.IOException, java.io.BufferedReader, java.io.FileInputStream, java.util.StringTokenizer, java.util.ArrayList, java.io.InputStreamReader, java.io.InputStream, java.io.OutputStream, com.timeicr.sysco.web.bean.AgentBean, com.timeicr.util.web.session.*, org.apache.log4j.* % % response.setHeader(Cache-Control,no-cache); //HTTP 1.1 response.setHeader(Pragma,no-cache); //HTTP 1.0 response.setDateHeader(Expires, 0); //prevents caching at the proxy server % (Line 39)%! static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(agent_report_all_in_jsp.class); % Gary -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: August 12, 2005 11:20 AM To: Tomcat Users List Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Can you post the JSP directives, and the scriplet that calls log4j? Also, you have been given a line number 39 .. can you work out which line this is in the work directory. Allistair. -Original Message- From: Gary Zhu [mailto:[EMAIL PROTECTED] Sent: 12 August 2005 16:17 To: Tomcat Users List Subject: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Hi all, I am having difficulties to figure out the solution for this issue. Jsp pages with log4j logging statements that worked perfect on Tomcat 4.1.30 could not compile on Tomcat 5.5.9. I commented out the log4j statements for these problematic pages, then, tomcat 5.5.9 could compile them. Except commenting out all the log4j statements for the jsp pages in order to run on Tomcat 5.5.9, does anyone have any other solutions? Below is the JasperException message when attempting to compile JSP pages with log4j statements: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 39 in the jsp file: /sysco/agent_report_all_in.jsp Generated servlet error: agent_report_all_in_jsp
Compile error in v5 but not v4
Hello; An application I'm trying to support runs without error on Tomcat 4.1.24 on Windows and Tomcat 4.0.3 on HPUX. When attempting to have it run on Tomcat 5.0.28 on Windows one of the very large JSP pages fails to compile: Jul 27, 2005 3:02:46 PM org.apache.jasper.compiler.Compiler generateClass SEVERE: Javac exception Compile failed; see the compiler error output for details. jsp.java:9924: code too large for try statement } catch (Throwable t) { The code is large because of LOT of include statements. No doubt 9924 lines is excessive. But, is there a setting that will allow this to run in Tomcat 5 or am I faced with refactoring this application? Thanks, Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Compile error in v5 but not v4
Tomcat5 uses jasper 2 which does much better optimizations of handlng custom tags. If you ahve a page with a lot of custom tags - it might not compile in tomcat 4. One alternative (but with a performance penalty) is to split some of the JSP file into a run-time include (jsp:include). -Tim Tom Willson wrote: Hello; An application I'm trying to support runs without error on Tomcat 4.1.24 on Windows and Tomcat 4.0.3 on HPUX. When attempting to have it run on Tomcat 5.0.28 on Windows one of the very large JSP pages fails to compile: Jul 27, 2005 3:02:46 PM org.apache.jasper.compiler.Compiler generateClass SEVERE: Javac exception Compile failed; see the compiler error output for details. jsp.java:9924: code too large for try statement } catch (Throwable t) { The code is large because of LOT of include statements. No doubt 9924 lines is excessive. But, is there a setting that will allow this to run in Tomcat 5 or am I faced with refactoring this application? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jasper/Orion] compile JSP servlets
I'm trying to write an ant task to pre-compile JSP pages, but I have the following problem. Here is a piece of page : # form:input type=hidden name=idy value=%= itlBean.getIdy() %/ (itlBean.getIdy() returns a Long.) Then I try to transform the JSP page into a servlet with the jasper task, which gives the following java code : # _jspx_th_form_input_0.setParent(null); # _jspx_th_form_input_0.setType(hidden); # _jspx_th_form_input_0.setName(idy); # _jspx_th_form_input_0.setValue( itlBean.getIdy() ); But the value field in the tag handler is a String and so the setter is void setValue(String value), therefore javac refuses to compile the corresponding servlet. Unlike jasper, Orion (the server I'm using) generate the following java code for the same page : #__tag1.setParent(null); #__tag1.setName(idy); #__tag1.setType(hidden); #__tag1.setValue(com.orionserver.util.ObjectUtils.toString( itlBean.getIdy() )); Great ! Orion recognized the problem and convert the Long to a String. And now my question : Is jasper able to do that ? How ? If not, does this way of proceeding conforms exactly to JSP spec. ? Can my problem be solved ? Thanks for your help. Romain Thouvenin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
1.2.10 JK compile issue on AIX 5L
After 800 tries at getting APache compiled with the AIX C compiler xlc_r, I now need to compile mod_k. I downloaded the sources for connector 1.2.10. I am trying to compile it on AIX 5L with uname -a AIX hostname 2 5 00C04A2E4C00. I am using AIX's cc_r compiler per instructions from http://people.apache.org/~trawick/tomcataix.html#mod_jk_gcc. I think the compile is in some sort of loop. Here is the output from truss that repeats over and over: statx(/usr/bin/ln, 0x2FF211B8, 76, 0) = 0 link(/tmp/sh3686418.1, /tmp/sh3686418.3671) = 0 kfork() = 3850378 _sigaction(20, 0x, 0x2FF21210) = 0 _sigaction(20, 0x2FF21210, 0x2FF21220) = 0 kwaitpid(0x2FF21280, -1, 6, 0x, 0x) = 3850378 _sigaction(20, 0x, 0x2FF21210) = 0 _sigaction(20, 0x2FF21210, 0x2FF21220) = 0 statx(/usr/bin/sleep, 0x2FF20F18, 76, 0) = 0 It creates a link in /tmp, does that kfork stuff, and then sleeps until the next symlink. The numbers on the tmp file keep going up (i.e., the 3671 in the /tmp/sh3686418.foo). Here is the make it is hanging on: /bin/sh /sys_apps_01/apache/server20Cent/versions/server2.0.47/build/libtool --silent --mode=compile cc_r -I/sys_apps_01/apache/server20Cent/versions/server2.0.47/include -g -g -qHALT=E -DHAVE_APR -I/apps_01/webapps/apache_compile/httpd-2.0.47/srclib/apr/include -g -U__STR__ -D_THREAD_SAFE -D_USE_IRS -I /include -I /include/ -c jk_ajp12_worker.c My config was: CC=cc_r ./configure --with-apxs=/path/to/apache/bin/apxs I also tried to use Gcc and it hung just the same as cc_r did. -- Ben Ricker He's just this guy, you know? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP pre-compile and Apache
I have the precompiled JSP's working with Apache now. Thanks. Apart from the first-time-hit compilation penalty on a normal jsp (as apposed to a precompiled one), why would you choose one option above the other? Standard jsp is easier to do updates if you work in an unpacked war setup - you just change the file and it is updated. Precompiled you have to acctually precompile the file. But how about performance and other issues? I guess it depends on your application, but is there somewhere a good checklist to determine when to choose the one option over the other? --- Terence M. Bandoian [EMAIL PROTECTED] wrote: Have you granted the site accessClassInPackage runtime permission? -Terence M. Bandoian [EMAIL PROTECTED] I used to precompile my JSP's (which worked great and was a big time saver in testing), but since running Tomcat 4.1.31 together with Apache, all sorts of weird errors occurred. I remember reading somewhere that Apache expected the actual jsp file, not the compiled version. So I reverted back to *not* precompiling JSP's and everything worked as expected. Question now, obviously there is a first-time-compile penalty per jsp, but once compiled, should performance be the same? How about the overhead to check if the .jsp file indeed matches the compiled version? Has someone managed to get precompiled JSP's running in combination with Apache? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: JSP pre-compile and Apache
Well there is one big advantage when using precompiled JSPs: You're sure that all JSPs are compilable, so you don't get any compile errors on your live site. That gives your application more stability. Bernhard -Ursprngliche Nachricht- Von: Charl Gerber [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 17. Juni 2005 08:07 An: Tomcat Users List Betreff: Re: JSP pre-compile and Apache I have the precompiled JSP's working with Apache now. Thanks. Apart from the first-time-hit compilation penalty on a normal jsp (as apposed to a precompiled one), why would you choose one option above the other? Standard jsp is easier to do updates if you work in an unpacked war setup - you just change the file and it is updated. Precompiled you have to acctually precompile the file. But how about performance and other issues? I guess it depends on your application, but is there somewhere a good checklist to determine when to choose the one option over the other? --- Terence M. Bandoian [EMAIL PROTECTED] wrote: Have you granted the site accessClassInPackage runtime permission? -Terence M. Bandoian [EMAIL PROTECTED] I used to precompile my JSP's (which worked great and was a big time saver in testing), but since running Tomcat 4.1.31 together with Apache, all sorts of weird errors occurred. I remember reading somewhere that Apache expected the actual jsp file, not the compiled version. So I reverted back to *not* precompiling JSP's and everything worked as expected. Question now, obviously there is a first-time-compile penalty per jsp, but once compiled, should performance be the same? How about the overhead to check if the .jsp file indeed matches the compiled version? Has someone managed to get precompiled JSP's running in combination with Apache? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: JSP pre-compile and Apache
With all due respect, I find that a weak argument. Its pretty dangerous to deploy anything to production without testing it on another (local) environment first. I would never change a jsp on production without checking it on another environment first. Well there is one big advantage when using precompiled JSPs: You're sure that all JSPs are compilable, so you don't get any compile errors on your live site. That gives your application more stability. Bernhard -Ursprngliche Nachricht- Von: Charl Gerber [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 17. Juni 2005 08:07 An: Tomcat Users List Betreff: Re: JSP pre-compile and Apache I have the precompiled JSP's working with Apache now. Thanks. Apart from the first-time-hit compilation penalty on a normal jsp (as apposed to a precompiled one), why would you choose one option above the other? Standard jsp is easier to do updates if you work in an unpacked war setup - you just change the file and it is updated. Precompiled you have to acctually precompile the file. But how about performance and other issues? I guess it depends on your application, but is there somewhere a good checklist to determine when to choose the one option over the other? --- Terence M. Bandoian [EMAIL PROTECTED] wrote: Have you granted the site accessClassInPackage runtime permission? -Terence M. Bandoian [EMAIL PROTECTED] I used to precompile my JSP's (which worked great and was a big time saver in testing), but since running Tomcat 4.1.31 together with Apache, all sorts of weird errors occurred. I remember reading somewhere that Apache expected the actual jsp file, not the compiled version. So I reverted back to *not* precompiling JSP's and everything worked as expected. Question now, obviously there is a first-time-compile penalty per jsp, but once compiled, should performance be the same? How about the overhead to check if the .jsp file indeed matches the compiled version? Has someone managed to get precompiled JSP's running in combination with Apache? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: JSP pre-compile and Apache
It's not that it's not tested. It can happen very easiliy, when you just forgot to check something in the version control: You added a method to a bean, change the JSP, it's working fine in you test environment, you check in the JSP, but forget the bean, do the release and you get the compile error on the live site. That can't happen with precompliation. -Ursprngliche Nachricht- Von: Charl Gerber [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 17. Juni 2005 10:28 An: Tomcat Users List Betreff: Re: AW: JSP pre-compile and Apache With all due respect, I find that a weak argument. Its pretty dangerous to deploy anything to production without testing it on another (local) environment first. I would never change a jsp on production without checking it on another environment first. Well there is one big advantage when using precompiled JSPs: You're sure that all JSPs are compilable, so you don't get any compile errors on your live site. That gives your application more stability. Bernhard -Ursprngliche Nachricht- Von: Charl Gerber [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 17. Juni 2005 08:07 An: Tomcat Users List Betreff: Re: JSP pre-compile and Apache I have the precompiled JSP's working with Apache now. Thanks. Apart from the first-time-hit compilation penalty on a normal jsp (as apposed to a precompiled one), why would you choose one option above the other? Standard jsp is easier to do updates if you work in an unpacked war setup - you just change the file and it is updated. Precompiled you have to acctually precompile the file. But how about performance and other issues? I guess it depends on your application, but is there somewhere a good checklist to determine when to choose the one option over the other? --- Terence M. Bandoian [EMAIL PROTECTED] wrote: Have you granted the site accessClassInPackage runtime permission? -Terence M. Bandoian [EMAIL PROTECTED] I used to precompile my JSP's (which worked great and was a big time saver in testing), but since running Tomcat 4.1.31 together with Apache, all sorts of weird errors occurred. I remember reading somewhere that Apache expected the actual jsp file, not the compiled version. So I reverted back to *not* precompiling JSP's and everything worked as expected. Question now, obviously there is a first-time-compile penalty per jsp, but once compiled, should performance be the same? How about the overhead to check if the .jsp file indeed matches the compiled version? Has someone managed to get precompiled JSP's running in combination with Apache? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How can I using Jasper 2 JSP Engine back-compile the java file to jsp file?
I deleted all my project files by misoperation. Using the FinalDate+GoogleDesktop makes all java and xml files back. But some jsp ... ;-( Thanks In Advance
JSP pre-compile and Apache
I used to precompile my JSP's (which worked great and was a big time saver in testing), but since running Tomcat 4.1.31 together with Apache, all sorts of weird errors occurred. I remember reading somewhere that Apache expected the actual jsp file, not the compiled version. So I reverted back to *not* precompiling JSP's and everything worked as expected. Question now, obviously there is a first-time-compile penalty per jsp, but once compiled, should performance be the same? How about the overhead to check if the .jsp file indeed matches the compiled version? Has someone managed to get precompiled JSP's running in combination with Apache? Thanks Charl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP pre-compile and Apache
Apache doesn't care about the existence of a jsp. There is one exception - default pages when / (or /stuff/) is requested. In that case - apache will look for index.jsp (Assuming that is a default page to be served) and then on seeing the existence of that file - pass the request onto tomcat. I have had webapps where *.html is served by tomcat, so I had to create dummy index.html files so trcik apache into forwarding the request to tomcat. But there is also a JK option to forward the serving of directory requests to tomcat (but I'm too lazy to look it up at the moment) -Tim Charl Gerber wrote: I used to precompile my JSP's (which worked great and was a big time saver in testing), but since running Tomcat 4.1.31 together with Apache, all sorts of weird errors occurred. I remember reading somewhere that Apache expected the actual jsp file, not the compiled version. So I reverted back to *not* precompiling JSP's and everything worked as expected. Question now, obviously there is a first-time-compile penalty per jsp, but once compiled, should performance be the same? How about the overhead to check if the .jsp file indeed matches the compiled version? Has someone managed to get precompiled JSP's running in combination with Apache? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP pre-compile and Apache
OK, so it migth be well worth my while to look into the issue again and see if I can get the precompiled JSP's running with Apache. (I originally did this a year ago). Charl --- Tim Funk [EMAIL PROTECTED] wrote: Apache doesn't care about the existence of a jsp. There is one exception - default pages when / (or /stuff/) is requested. In that case - apache will look for index.jsp (Assuming that is a default page to be served) and then on seeing the existence of that file - pass the request onto tomcat. I have had webapps where *.html is served by tomcat, so I had to create dummy index.html files so trcik apache into forwarding the request to tomcat. But there is also a JK option to forward the serving of directory requests to tomcat (but I'm too lazy to look it up at the moment) -Tim Charl Gerber wrote: I used to precompile my JSP's (which worked great and was a big time saver in testing), but since running Tomcat 4.1.31 together with Apache, all sorts of weird errors occurred. I remember reading somewhere that Apache expected the actual jsp file, not the compiled version. So I reverted back to *not* precompiling JSP's and everything worked as expected. Question now, obviously there is a first-time-compile penalty per jsp, but once compiled, should performance be the same? How about the overhead to check if the .jsp file indeed matches the compiled version? Has someone managed to get precompiled JSP's running in combination with Apache? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP pre-compile and Apache
Have you granted the site accessClassInPackage runtime permission? -Terence M. Bandoian [EMAIL PROTECTED] I used to precompile my JSP's (which worked great and was a big time saver in testing), but since running Tomcat 4.1.31 together with Apache, all sorts of weird errors occurred. I remember reading somewhere that Apache expected the actual jsp file, not the compiled version. So I reverted back to *not* precompiling JSP's and everything worked as expected. Question now, obviously there is a first-time-compile penalty per jsp, but once compiled, should performance be the same? How about the overhead to check if the .jsp file indeed matches the compiled version? Has someone managed to get precompiled JSP's running in combination with Apache? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP too big to compile?
We have a web page that contains many business documents laid out one after the other so a user can just click print and have all of them print together (with a stylesheet that starts each contract on its own printed page). But we seem to be having an error that the generated servlet code is too big because of service method's try block is too long. Is there anything I can tweak to allow this to be bigger for the java compiler, or is this just a limit of Java in general? Thanks, David Generated servlet error: [javac] Compiling 1 source file [javac] /home/tomcat/jakarta-tomcat-4.1.30/work/Standalone/localhost/app/application_jsp.java:8946: compiler message file broken: key=compiler.err.compiler.err.limit.code.too.large.for.try.stmt arguments=null, null, null, null, null, null, null [javac] } catch (Throwable t) { [javac] ^ [javac] /home/tomcat/jakarta-tomcat-4.1.30/work/Standalone/localhost/app/application_jsp.java:1118: compiler message file broken: key=compiler.err.compiler.err.limit.code.too.large.for.try.stmt arguments=null, null, null, null, null, null, null [javac] try { [javac] ^
RE: JSP too big to compile?
It's a global java limitation. You'are limited to around 10 000 lines of code in a try catch block. Try to use dynamic includes instead of static includes. Pascal Gehl -Original Message- From: David Wall [mailto:[EMAIL PROTECTED] Sent: Friday, June 03, 2005 16:31 To: tomcat-user@jakarta.apache.org Subject: JSP too big to compile? We have a web page that contains many business documents laid out one after the other so a user can just click print and have all of them print together (with a stylesheet that starts each contract on its own printed page). But we seem to be having an error that the generated servlet code is too big because of service method's try block is too long. Is there anything I can tweak to allow this to be bigger for the java compiler, or is this just a limit of Java in general? Thanks, David Generated servlet error: [javac] Compiling 1 source file [javac] /home/tomcat/jakarta-tomcat-4.1.30/work/Standalone/localhost/app/application _jsp.java:8946: compiler message file broken: key=compiler.err.compiler.err.limit.code.too.large.for.try.stmt arguments=null, null, null, null, null, null, null [javac] } catch (Throwable t) { [javac] ^ [javac] /home/tomcat/jakarta-tomcat-4.1.30/work/Standalone/localhost/app/application _jsp.java:1118: compiler message file broken: key=compiler.err.compiler.err.limit.code.too.large.for.try.stmt arguments=null, null, null, null, null, null, null [javac] try { [javac] ^ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP too big to compile?
You are actually limited by Java. I can't recall the actual size off hand, but a method can only be so big. From what I remember, it has something to do with server side includes vs jsp includes. We ended up doing some pretty nasty stuff by conditionally doing a server side include. I can't really remember much more than that it was several years ago. David Wall wrote: We have a web page that contains many business documents laid out one after the other so a user can just click print and have all of them print together (with a stylesheet that starts each contract on its own printed page). But we seem to be having an error that the generated servlet code is too big because of service method's try block is too long. Is there anything I can tweak to allow this to be bigger for the java compiler, or is this just a limit of Java in general? Thanks, David Generated servlet error: [javac] Compiling 1 source file [javac] /home/tomcat/jakarta-tomcat-4.1.30/work/Standalone/localhost/app/application_jsp.java:8946: compiler message file broken: key=compiler.err.compiler.err.limit.code.too.large.for.try.stmt arguments=null, null, null, null, null, null, null [javac] } catch (Throwable t) { [javac] ^ [javac] /home/tomcat/jakarta-tomcat-4.1.30/work/Standalone/localhost/app/application_jsp.java:1118: compiler message file broken: key=compiler.err.compiler.err.limit.code.too.large.for.try.stmt arguments=null, null, null, null, null, null, null [javac] try { [javac] ^ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP too big to compile?
The jsp:include is coming very close for us, but we're doing some tricks on these JSP pages that are causing us a problem with this approach. In the main JSP, we are creating a class inside that has the data elements for that page as well as a bunch of custom routines that act on the bean data. In this case, we use a construct like: %! public class BeanData { public String field1; public String field2; public void method1() { } } void doSomething(BeanData bean) {} % This has worked well. Normally, we'd create a regular bean and use jsp:useBean to access it, but we did this so we could just upload the JSP and the bean would go together for ease of update without restarting, etc. These JSP pages are bit special in that they are customer-defined pages that need to be changeable without having to upload a new JAR/WAR/.class file and have the application reload. Of course, a jsp:include page cannot access the BeanData defined in the other page because the BeanData class is nested inside the servlet class created from the JSP (even if we pass it as a parameter, the receiving end will get a security access exception). First, is there a better way for a JSP to define a class that could be accessed outside of it rather than using the %! % mechanism to declare the code? If not, are there any thoughts on how to pass such a private bean instance to the jsp:include page so it can also use it? Thanks, David Pascal Gehl wrote: It's a global java limitation. You'are limited to around 10 000 lines of code in a try catch block. Try to use dynamic includes instead of static includes. Pascal Gehl -Original Message- From: David Wall [mailto:[EMAIL PROTECTED] Sent: Friday, June 03, 2005 16:31 To: tomcat-user@jakarta.apache.org Subject: JSP too big to compile? We have a web page that contains many business documents laid out one after the other so a user can just click print and have all of them print together (with a stylesheet that starts each contract on its own printed page). But we seem to be having an error that the generated servlet code is too big because of service method's try block is too long. Is there anything I can tweak to allow this to be bigger for the java compiler, or is this just a limit of Java in general? Thanks, David Generated servlet error: [javac] Compiling 1 source file [javac] /home/tomcat/jakarta-tomcat-4.1.30/work/Standalone/localhost/app/application _jsp.java:8946: compiler message file broken: key=compiler.err.compiler.err.limit.code.too.large.for.try.stmt arguments=null, null, null, null, null, null, null [javac] } catch (Throwable t) { [javac] ^ [javac] /home/tomcat/jakarta-tomcat-4.1.30/work/Standalone/localhost/app/application _jsp.java:1118: compiler message file broken: key=compiler.err.compiler.err.limit.code.too.large.for.try.stmt arguments=null, null, null, null, null, null, null [javac] try { [javac] ^ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSP too big to compile?
you can us includes and then delete the compiled file in the work directory. So split page up by using %@ include file=checklogin.jsp % for each block of general code coded in a include jsp. After upload delete the file in the work directory, so compilation is done at runtime of tomcat. And its working..for me it do. Maarten -Oorspronkelijk bericht- Van: David Wall [mailto:[EMAIL PROTECTED] Verzonden: zaterdag 4 juni 2005 0:18 Aan: Tomcat Users List Onderwerp: Re: JSP too big to compile? The jsp:include is coming very close for us, but we're doing some tricks on these JSP pages that are causing us a problem with this approach. In the main JSP, we are creating a class inside that has the data elements for that page as well as a bunch of custom routines that act on the bean data. In this case, we use a construct like: %! public class BeanData { public String field1; public String field2; public void method1() { } } void doSomething(BeanData bean) {} % This has worked well. Normally, we'd create a regular bean and use jsp:useBean to access it, but we did this so we could just upload the JSP and the bean would go together for ease of update without restarting, etc. These JSP pages are bit special in that they are customer-defined pages that need to be changeable without having to upload a new JAR/WAR/.class file and have the application reload. Of course, a jsp:include page cannot access the BeanData defined in the other page because the BeanData class is nested inside the servlet class created from the JSP (even if we pass it as a parameter, the receiving end will get a security access exception). First, is there a better way for a JSP to define a class that could be accessed outside of it rather than using the %! % mechanism to declare the code? If not, are there any thoughts on how to pass such a private bean instance to the jsp:include page so it can also use it? Thanks, David Pascal Gehl wrote: It's a global java limitation. You'are limited to around 10 000 lines of code in a try catch block. Try to use dynamic includes instead of static includes. Pascal Gehl -Original Message- From: David Wall [mailto:[EMAIL PROTECTED] Sent: Friday, June 03, 2005 16:31 To: tomcat-user@jakarta.apache.org Subject: JSP too big to compile? We have a web page that contains many business documents laid out one after the other so a user can just click print and have all of them print together (with a stylesheet that starts each contract on its own printed page). But we seem to be having an error that the generated servlet code is too big because of service method's try block is too long. Is there anything I can tweak to allow this to be bigger for the java compiler, or is this just a limit of Java in general? Thanks, David Generated servlet error: [javac] Compiling 1 source file [javac] /home/tomcat/jakarta-tomcat-4.1.30/work/Standalone/localhost/app/applicatio n _jsp.java:8946: compiler message file broken: key=compiler.err.compiler.err.limit.code.too.large.for.try.stmt arguments=null, null, null, null, null, null, null [javac] } catch (Throwable t) { [javac] ^ [javac] /home/tomcat/jakarta-tomcat-4.1.30/work/Standalone/localhost/app/applicatio n _jsp.java:1118: compiler message file broken: key=compiler.err.compiler.err.limit.code.too.large.for.try.stmt arguments=null, null, null, null, null, null, null [javac] try { [javac] ^ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.322 / Virus Database: 267.5.1 - Release Date: 2-6-2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.322 / Virus Database: 267.5.1 - Release Date: 2-6-2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat optimization... saving internal strings with character encoding at compile time.
Another area that I'm noticing that Tomcat is spending a LOT of time in is with character encoding. Its not a ton of time but its really showing up as one of the top 20 areas of our webapp. Internally its either storing text as a java.lang.String or with genStrAsCharArray ... a char array Most people are probably using a fixed character encoding. For example we use UTF8. I doubt they're changing charset on the fly. Its a waste of CPU to continually encode these strings. This isn't just theoretical as I'm seeing our webapp do this internally via JProfiler. Why not have strings fixed to a character coding at runtime? While this would yield inflexibility it would increase performance. This could be a new feature called genStrAsEncodedByteArray... which would just store the string as a byte[] and output it directly. The only thing that would need to be encoded in this setup would be dynamic strings from EL. It would also save more memory for English text since strings no longer are stored in 32bit but just UTF8 encoded 8 bit values. It would slow down compile time though because Jasper would now need to call toByteArray() on all your strings. Thoughts? Kevin -- Use Rojo (RSS/Atom aggregator)! - visit http://rojo.com. See irc.freenode.net #rojo if you want to chat. Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html Kevin A. Burton, Location - San Francisco, CA AIM/YIM - sfburtonator, Web - http://peerfear.org/ GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat optimization... saving internal strings with character encoding at compile time.
On 5/29/05, Kevin Burton [EMAIL PROTECTED] wrote: Another area that I'm noticing that Tomcat is spending a LOT of time in is with character encoding. Its not a ton of time but its really showing up as one of the top 20 areas of our webapp. Internally its either storing text as a java.lang.String or with genStrAsCharArray ... a char array Most people are probably using a fixed character encoding. For example we use UTF8. I doubt they're changing charset on the fly. Its a waste of CPU to continually encode these strings. This isn't just theoretical as I'm seeing our webapp do this internally via JProfiler. Why not have strings fixed to a character coding at runtime? While this would yield inflexibility it would increase performance. This could be a new feature called genStrAsEncodedByteArray... which would just store the string as a byte[] and output it directly. The only thing that would need to be encoded in this setup would be dynamic strings from EL. It would also save more memory for English text since strings no longer are stored in 32bit but just UTF8 encoded 8 bit values. It would slow down compile time though because Jasper would now need to call toByteArray() on all your strings. Thoughts? This is obvious. This is not an implementable optimization idea, as you cannot use both a writer and an out stream in a servlet. If this was doable, then obviously constant strings would be cached as byte arrays. -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
5.5.9 jasper ant compile options
I want to compile my jsps before depolying my war, so I'm using the standalone deployer build.xml. In the web.xml (for the jsp servlet) I can set some options eg. genStrAsCharArray or trimSpaces. How can I set these compile options in the ant task? Thx Gernot - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unable to pre-compile JSP with jspC ant task
Hello, I'm trying to precompile jsp pages with Ant before deploying a Web Archive. The ant task I'm using is : !-- definition of jspc task === -- taskdef classname=org.apache.jasper.JspC name=jasper2 classpath path id=jspc.classpath pathelement location=${java.home}/../lib/tools.jar / !-- My Jars, commented = -- !-- fileset dir=${source.libs.dir} include name=*.jar / /fileset -- !-- End of My Jars = -- fileset dir=${tomcat.home.dir}/server/lib include name=*.jar / /fileset fileset dir=${tomcat.home.dir}/common/lib include name=*.jar / /fileset fileset dir=${tomcat.home.dir}/bin include name=commons-logging-api.jar / /fileset /path /classpath /taskdef Notice I commented the reference to the library directory. The task is then used by: !-- = -- !-- Compiles the jsp pages-- !-- = -- target name=jspc depends= description=Compile jsp pages with jasper2 mkdir dir=${jspc.src.dir} / jasper2 verbose=1 validateXml=false uriroot=${eclipse.my-app.dir}/web webXmlFragment=build/WEB-INF outputDir=build/WEB-INF/src / javac destdir=${deploy.class.dir} classpathref=jspc.classpath src path=${jspc.src.dir} /src /javac /target When I launch the task, I got the following error on a jsp file: org.apache.jasper.JasperException: file:C:/eclipse/workspace/MyWebApp/web/jsp/login/index.jsp(18,0) The value for the useBean class attribute myapp.jspbean.IndexJspBean is invalid. The error in the index.jsp file come from the line: jsp:useBean id=indexJspBean scope=session class= myapp.jspbean.IndexJspBean / As I thought that I should give to jspC a reference to the Bean, I tried to package the Bean in a jar file, put it in library directory and then uncommenting the reference to the libray directory in the previous ant file sample, but I got then the following error: [jasper2] java.lang.NullPointerException [jasper2] at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationCon text.java:220) [jasper2] at org.apache.jasper.JspC.processFile(JspC.java:809) [jasper2] at org.apache.jasper.JspC.execute(JspC.java:945) [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [jasper2] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [jasper2] at java.lang.reflect.Method.invoke(Unknown Source) [jasper2] at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123) [jasper2] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [jasper2] at org.apache.tools.ant.Task.perform(Task.java:364) [jasper2] at org.apache.tools.ant.Target.execute(Target.java:341) [jasper2] at org.apache.tools.ant.Target.performTasks(Target.java:369) [jasper2] at org.apache.tools.ant.Project.executeTarget(Project.java:1214) [jasper2] at org.apache.tools.ant.Project.executeTargets(Project.java:1062) [jasper2] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunne r.java:633) [jasper2] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunne r.java:412) [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [jasper2] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [jasper2] at java.lang.reflect.Method.invoke(Unknown Source) [jasper2] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:350) [jasper2] at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate$1.run (AntLaunchDelegate.java:182) [jasper2] at java.lang.Thread.run(Unknown Source) BUILD FAILED: C:\eclipse\workspace\MywebApp\build.xml:158: org.apache.jasper.JasperException I'm using the task shipped with tomcat 5.5.4. Have anyone an idea about what I'm missing ? Regards, -- Nicolas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
compile against servlet.jar but must run tomcat with servlet-ap1.jar
Hi All, We our new to Tomcat and have a bit of an odd problem. We are developing a getting started project. We have found that we must compile with servlet.jar in our CLASSPATH, but Tomcat will not run with servlet.jar in the CLASSPATH. Tomcat will run with servlet-api.jar, but the test program will not compile with servlet-api.jar in the CLASSPATH. To be more specific we get a: package javax.servlet.http does not exist error when compiling against servlet-api.jar Similar errors ocure when running Tomcat with servlet.jar Changing the CLASSPATH everytime we decide to compile or run isn't much fun. Anybody got an idea on why this is happening, and what the solution is. Tomcat vs 5.5.7 apache vs 2.0.53 RH 8.0 JDK 1.5 -Fred - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: compile against servlet.jar but must run tomcat with servlet-ap1.jar
As a generality, a compilation should set up all required environment setting with each build run. Those settings should be transitory, i.e., should not persists beyond that build. So in your case you would add servlet.jar to the classpath temporarily, compile, and revert the classpath (which may happen automatically depending on how you do your build). If you are using an IDE, it will almost certainly handle this for you via some sort of classpath setup screen. An IDE wouldn't be worth much if it didn't at least handle this for you :) If you are working from a plain command line, you have some choices... First, write a batch file or shell script, depending on your environment, to do your compile. This script would include setting the classpath, your javac command, and possibly restoring the classpath to what it was before. Note that if on Windows you execute a batch file, the change to classpath is only valid for the life of that command line invocation, so there's no need to restore anything (unless you are going to sit at a command prompt in the same window and build a couple of times). Second, use Ant or Maven or some other build tool. I suggest this option if you aren't using an IDE for sure. It sounds like you might be doing some sort of teaching based on the fact that it's a getting started project... If your going to be teaching anyway, or if you are just learning yourself, I suggest taking the dive into Ant right away. I like Ant myself, some prefer Maven... the choice is yours, but I think it's fair to say that Ant is a little more popular at this point... Maven might be king a few months down the road though. In any case, neither is difficult at all once you get the basics down, and it will save you a lot of trouble in the long-run. Frank Fred Cook wrote: Hi All, We our new to Tomcat and have a bit of an odd problem. We are developing a getting started project. We have found that we must compile with servlet.jar in our CLASSPATH, but Tomcat will not run with servlet.jar in the CLASSPATH. Tomcat will run with servlet-api.jar, but the test program will not compile with servlet-api.jar in the CLASSPATH. To be more specific we get a: package javax.servlet.http does not exist error when compiling against servlet-api.jar Similar errors ocure when running Tomcat with servlet.jar Changing the CLASSPATH everytime we decide to compile or run isn't much fun. Anybody got an idea on why this is happening, and what the solution is. Tomcat vs 5.5.7 apache vs 2.0.53 RH 8.0 JDK 1.5 -Fred - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5
It is not possible. I have asked here for months and nothing has worked. The compiler flags than the docs say to use are not passed to the compiler, so you can not use Ant as the docs say. I think it is an IBM conspiricy. It took IBM a year to implement inner classes back in the jdk 1.1 era, so I suspect it will take the same time before that IBM compiler supports Java 5 features. Netbeans will comile them in the IDE with Java 5, but Tomcat won't compile them with Java 5. - Original Message - From: Stefan Parnet [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Subject: Howto configure tomcat to compile JSPs with Sun JDK 1.5 Date: Wed, 27 Apr 2005 15:20:32 +0200 Hello, I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot compile my JSPs. So I want the tomcat to compile the JSP's with the Sun JDK 1.5 compiler. I searched the web, but I did not find any instructions how to configure the tomcat to do so. Can anyone help me? Thanks Stefan This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. E-mail messages are not necessarily secure. Renesas does not accept responsibility for any changes made to this message after it was sent. Please note that this email message has been swept by Renesas for the presence of computer viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ___ Get your free email from http://www.dellmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Please correct docs - Compile JSPs w/ JDK 1.5
Please correct the documentation to reflect that this does not work. It would save a lot of time and lots of emails here about the same issue. Thanks, Milo -- ___ Get your free email from http://www.dellmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Howto configure tomcat to compile JSPs with Sun JDK 1.5
Hello Lutz is right : you may define your JRE under Eclipse Under (sorry for my mistakes : i use a french version and try to translate in english) Window - Preferences - Installed JRE you may use an other JRE that the one installed under Eclipse Hope this will help you Jean-Claude -Message d'origine- De : Stefan Parnet [mailto:[EMAIL PROTECTED] Envoyé : mercredi 27 avril 2005 16:14 À : Tomcat Users List Objet : Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5 Lutz Zetzsche schrieb: Hi Stefan, Am Mittwoch, 27. April 2005 15:20 schrieb Stefan Parnet: Hello, I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot compile my JSPs. So I want the tomcat to compile the JSP's with the Sun JDK 1.5 compiler. I searched the web, but I did not find any instructions how to configure the tomcat to do so. Can anyone help me? Do you integrate the Tomcat 5.5.9 into your Eclipse IDE or do you run it seperately? If you run Tomcat integrated into Eclipse, perhaps you can tell Eclipse which installed Tomcat and which installed JDK to use for your project. This is the way, I can do it with NetBeans IDE. Else, if you run Tomcat independently of the IDE, you must only set the environment variable for the JDK correctly before starting the server. I am running Tomcat 5.5.7 with JDK 1.5.0_02 and have to set the environment variable JRE_HOME so that Tomcat uses the right one of the installed JDKs. I set the JRE_HOME manually before starting Tomcat: export JRE_HOME=/usr/java/jre1.5.0_02/ (you must change the path to the path you use on your system) The environment variable JAVA_HOME could also play a role, although not in my case. :-) I hope, this information does help a little. Best wishes Lutz I have the environment variables JAVA_HOME and JRE_HOME already set to the JDK, but Tomcat still compiles JSPs with its built in Eclipse JDT Java compiler. This fact is mentioned in the Release Notes. There is also mentioned that it is possible to configure Tomcat to use another compiler. But there is no explanation how to configure it. Thanks for your answer. Stefan This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. E-mail messages are not necessarily secure. Renesas does not accept responsibility for any changes made to this message after it was sent. Please note that this email message has been swept by Renesas for the presence of computer viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5
Hello Jean-Claude, I don't use the Eclipse IDE. I do all my developments with the NetBeans IDE. But anyway, the IDE does not matter since Tomcat is running separately in an productive environment under Linux with Apache, mod_jk and Java 1.5_02 Tomcat 5.5 just uses Eclipse JDT compiler classes to compile JSPs. But it should be possible to change the config, so that Tomcat uses another compiler. At least, the releasenotes say so. But there is no useful howto at the tomcat web site or anywhere else. (at least I didn't find one) The problem is: 1. Tomcat 5.5 (without compatibility packages) runs only with Java 1.5 (JRE!) 2. The built in Java compiler to compile JSPs (and only JSPs) is the Eclipse JDT Compiler !!! JAVA 1.4 !!! == So Servlets using Java 1.5 features are runnig without problems because they are already compiled == JSPs with Java 1.5 features cannot be compiled (within tomcat) because the tomcat built-in compiler only knows Java 1.4 Stefan Serlet Jean-Claude schrieb: Hello Lutz is right : you may define your JRE under Eclipse Under (sorry for my mistakes : i use a french version and try to translate in english) Window - Preferences - Installed JRE you may use an other JRE that the one installed under Eclipse Hope this will help you Jean-Claude -Message d'origine- De : Stefan Parnet [mailto:[EMAIL PROTECTED] Envoyé : mercredi 27 avril 2005 16:14 À : Tomcat Users List Objet : Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5 Lutz Zetzsche schrieb: Hi Stefan, Am Mittwoch, 27. April 2005 15:20 schrieb Stefan Parnet: Hello, I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot compile my JSPs. So I want the tomcat to compile the JSP's with the Sun JDK 1.5 compiler. I searched the web, but I did not find any instructions how to configure the tomcat to do so. Can anyone help me? Do you integrate the Tomcat 5.5.9 into your Eclipse IDE or do you run it seperately? If you run Tomcat integrated into Eclipse, perhaps you can tell Eclipse which installed Tomcat and which installed JDK to use for your project. This is the way, I can do it with NetBeans IDE. Else, if you run Tomcat independently of the IDE, you must only set the environment variable for the JDK correctly before starting the server. I am running Tomcat 5.5.7 with JDK 1.5.0_02 and have to set the environment variable JRE_HOME so that Tomcat uses the right one of the installed JDKs. I set the JRE_HOME manually before starting Tomcat: export JRE_HOME=/usr/java/jre1.5.0_02/ (you must change the path to the path you use on your system) The environment variable JAVA_HOME could also play a role, although not in my case. :-) I hope, this information does help a little. Best wishes Lutz This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. E-mail messages are not necessarily secure. Renesas does not accept responsibility for any changes made to this message after it was sent. Please note that this email message has been swept by Renesas for the presence of computer viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5
Hi Stefan, Am Donnerstag, 28. April 2005 09:07 schrieb Stefan Parnet: The problem is: 1. Tomcat 5.5 (without compatibility packages) runs only with Java 1.5 (JRE!) 2. The built in Java compiler to compile JSPs (and only JSPs) is the Eclipse JDT Compiler !!! JAVA 1.4 !!! == So Servlets using Java 1.5 features are runnig without problems because they are already compiled == JSPs with Java 1.5 features cannot be compiled (within tomcat) because the tomcat built-in compiler only knows Java 1.4 Did you have a look at the how-to, which I mentioned yesterday? And if yes, why didn't it solve your problem? - http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html Best wishes Lutz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Howto configure tomcat to compile JSPs with Sun JDK 1.5
Hi Did you have a look at the how-to, which I mentioned yesterday? And if yes, why didn't it solve your problem? - http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html It works.. But there's a problem with compilerSourceVM - What JDK version are the source files compatible with? (Default JDK 1.4) compilerTargetVM - What JDK version are the generated files compatible with? (Default JDK 1.4) If you set those, you'll get a resource unavailable message for every page you try to access (regardless whether you set this to 1.4 or 1.5). I believe it has been fixed in the CSV since (I haven't found time to compile Tomcat on my own and try), and I didn't find anything about this in the 5.5.9 changelog. Regards Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Howto configure tomcat to compile JSPs with Sun JDK 1.5
Hello, I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot compile my JSPs. So I want the tomcat to compile the JSP's with the Sun JDK 1.5 compiler. I searched the web, but I did not find any instructions how to configure the tomcat to do so. Can anyone help me? Thanks Stefan This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. E-mail messages are not necessarily secure. Renesas does not accept responsibility for any changes made to this message after it was sent. Please note that this email message has been swept by Renesas for the presence of computer viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5
Hi Stefan, Am Mittwoch, 27. April 2005 15:20 schrieb Stefan Parnet: Hello, I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot compile my JSPs. So I want the tomcat to compile the JSP's with the Sun JDK 1.5 compiler. I searched the web, but I did not find any instructions how to configure the tomcat to do so. Can anyone help me? Do you integrate the Tomcat 5.5.9 into your Eclipse IDE or do you run it seperately? If you run Tomcat integrated into Eclipse, perhaps you can tell Eclipse which installed Tomcat and which installed JDK to use for your project. This is the way, I can do it with NetBeans IDE. Else, if you run Tomcat independently of the IDE, you must only set the environment variable for the JDK correctly before starting the server. I am running Tomcat 5.5.7 with JDK 1.5.0_02 and have to set the environment variable JRE_HOME so that Tomcat uses the right one of the installed JDKs. I set the JRE_HOME manually before starting Tomcat: export JRE_HOME=/usr/java/jre1.5.0_02/ (you must change the path to the path you use on your system) The environment variable JAVA_HOME could also play a role, although not in my case. :-) I hope, this information does help a little. Best wishes Lutz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5
Lutz Zetzsche schrieb: Hi Stefan, Am Mittwoch, 27. April 2005 15:20 schrieb Stefan Parnet: Hello, I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot compile my JSPs. So I want the tomcat to compile the JSP's with the Sun JDK 1.5 compiler. I searched the web, but I did not find any instructions how to configure the tomcat to do so. Can anyone help me? Do you integrate the Tomcat 5.5.9 into your Eclipse IDE or do you run it seperately? If you run Tomcat integrated into Eclipse, perhaps you can tell Eclipse which installed Tomcat and which installed JDK to use for your project. This is the way, I can do it with NetBeans IDE. Else, if you run Tomcat independently of the IDE, you must only set the environment variable for the JDK correctly before starting the server. I am running Tomcat 5.5.7 with JDK 1.5.0_02 and have to set the environment variable JRE_HOME so that Tomcat uses the right one of the installed JDKs. I set the JRE_HOME manually before starting Tomcat: export JRE_HOME=/usr/java/jre1.5.0_02/ (you must change the path to the path you use on your system) The environment variable JAVA_HOME could also play a role, although not in my case. :-) I hope, this information does help a little. Best wishes Lutz I have the environment variables JAVA_HOME and JRE_HOME already set to the JDK, but Tomcat still compiles JSPs with its built in Eclipse JDT Java compiler. This fact is mentioned in the Release Notes. There is also mentioned that it is possible to configure Tomcat to use another compiler. But there is no explanation how to configure it. Thanks for your answer. Stefan This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. E-mail messages are not necessarily secure. Renesas does not accept responsibility for any changes made to this message after it was sent. Please note that this email message has been swept by Renesas for the presence of computer viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5
Hi Stefan, Am Mittwoch, 27. April 2005 16:14 schrieb Stefan Parnet: I have the environment variables JAVA_HOME and JRE_HOME already set to the JDK, but Tomcat still compiles JSPs with its built in Eclipse JDT Java compiler. This fact is mentioned in the Release Notes. There is also mentioned that it is possible to configure Tomcat to use another compiler. But there is no explanation how to configure it. Perhaps the following how-to contains the information, you missed in the release notes: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html Best wishes Lutz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSPs slow to compile?
I am running Liferay Portal Pro 3.3 under tomcat 5.5.9 on fedora fc3 running on a 1.2ghz p4 w/ 3gb ram. Initial page loads are taking on the order of 30 seconds. After the initial page load, it takes just a second to reload. 30 seconds seems like a long time to initially compile the page and load it. Do I potentially have something misconfigured? Also, I've tried to precompile the pages with the script in the docs on the tomcat website but the script fails with a NullPointerException. Has anyone else successfully precompiled JSPs under 5.5 with the script on this page: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html ? Thanks. -- Bud - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSPs slow to compile?
Hummm... Just changed the jasper init parameter development to false in conf/web.xml and now pages load in a couple of seconds or less. Why the huge difference? Any tips to make it even faster? -- Bud Bud Bach wrote: I am running Liferay Portal Pro 3.3 under tomcat 5.5.9 on fedora fc3 running on a 1.2ghz p4 w/ 3gb ram. Initial page loads are taking on the order of 30 seconds. After the initial page load, it takes just a second to reload. 30 seconds seems like a long time to initially compile the page and load it. Do I potentially have something misconfigured? Also, I've tried to precompile the pages with the script in the docs on the tomcat website but the script fails with a NullPointerException. Has anyone else successfully precompiled JSPs under 5.5 with the script on this page: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html ? Thanks. -- Bud - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Compile JSPs with Java 5 features?
I've followed the directions in the docs to get 5.5.7 to compile JSPs with -source 1.5 features. It stays in -source 1.4 mode. I know the docs say the IBM compiler will be updated to handle Java 5 feature. When inner classes were introduced in jdk 1.1, it took IBM a year to implement inner classes in their compiler and IDE. Has anyone gotten this to work using the compiler flags and ant? Thanks for your help, Milo -- ___ Get your free email from http://www.dellmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP compile with jdk 1.5 in 5.5.7
Tomcat 5.5.7/8 documentation suggest setting 'compilerSourceVM' and 'compilerTargetVM' to enable jdk 1.5 JSP compilation (along with removing |jasper-compiler-jdt.jar and replacing with ant.jar|) However, those 2 parameter names are not in web.xml's commented list of optional flags. I've tried this in 5.5.8 and in the 5.5.7 distributed with net-beans 4.1 beta. init-param param-namecompilerSourceVM/param-name param-value1.5/param-value /init-param init-param param-namecompilerTargetVM/param-name param-value1.5/param-value /init-param I get an error saying that the [java 5 ] features are not supported in source 1.4 Seems like these flags are not being passed to ant. Are these flags still valid? Can JSPs be compile using Java 5 in Tomcat 5.5.x? I know the docs say that the IBM compiler will be updated to support the Java 5 syntax as soon as possible. Thanks, Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cannot compile class in WEB-INF/classes
I have a Simple JSP page in my webapps/myappname. I have a utility class which this page will use. The class file for this should be in webapps/myappname/WEB-INF/classes. So I put the java source file in that directory (webapps/myappname/WEB-INF/classes). Also, a method in this utility class has HttpServletRequest request as an argument. This will be passed when this method is called from the scriplet java code from the JSP page. The Problem is that the utility java file does not compile and gives error- Cannot recognize HttpServletRequest. Shouldn't servlet-api.jar be automatically visible? I am using latest Tomcat 5.5.8 and latest JDK/JRE 1.5. I can avoid the issue by not passing the request object but still is there a way to pass the request object? Thanks! Rahul. __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot compile class in WEB-INF/classes
Did you import javax.servlet.http.* ? -Original Message- From: Rahul Joshi [mailto:[EMAIL PROTECTED] Sent: Thursday, March 10, 2005 1:19 PM To: tomcat-user@jakarta.apache.org Subject: Cannot compile class in WEB-INF/classes I have a Simple JSP page in my webapps/myappname. I have a utility class which this page will use. The class file for this should be in webapps/myappname/WEB-INF/classes. So I put the java source file in that directory (webapps/myappname/WEB-INF/classes). Also, a method in this utility class has HttpServletRequest request as an argument. This will be passed when this method is called from the scriplet java code from the JSP page. The Problem is that the utility java file does not compile and gives error- Cannot recognize HttpServletRequest. Shouldn't servlet-api.jar be automatically visible? I am using latest Tomcat 5.5.8 and latest JDK/JRE 1.5. I can avoid the issue by not passing the request object but still is there a way to pass the request object? Thanks! Rahul. __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot compile class in WEB-INF/classes
Yes, I did. import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; API signature: String expand(HttpServletRequest request) -Rahul. --- Anderson, M. Paul [EMAIL PROTECTED] wrote: Did you import javax.servlet.http.* ? -Original Message- From: Rahul Joshi [mailto:[EMAIL PROTECTED] Sent: Thursday, March 10, 2005 1:19 PM To: tomcat-user@jakarta.apache.org Subject: Cannot compile class in WEB-INF/classes I have a Simple JSP page in my webapps/myappname. I have a utility class which this page will use. The class file for this should be in webapps/myappname/WEB-INF/classes. So I put the java source file in that directory (webapps/myappname/WEB-INF/classes). Also, a method in this utility class has HttpServletRequest request as an argument. This will be passed when this method is called from the scriplet java code from the JSP page. The Problem is that the utility java file does not compile and gives error- Cannot recognize HttpServletRequest. Shouldn't servlet-api.jar be automatically visible? I am using latest Tomcat 5.5.8 and latest JDK/JRE 1.5. I can avoid the issue by not passing the request object but still is there a way to pass the request object? Thanks! Rahul. __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot compile class in WEB-INF/classes
Have you compiled the class previously? The source for the class does not go in the WEB-INF/classes directory - only the class files go here. You also need to pre-compile your classes - Tomcat doesn't do this for you. -Original Message- From: Rahul Joshi [mailto:[EMAIL PROTECTED] Sent: Thursday, March 10, 2005 1:26 PM To: Tomcat Users List Subject: RE: Cannot compile class in WEB-INF/classes Yes, I did. import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; API signature: String expand(HttpServletRequest request) -Rahul. --- Anderson, M. Paul [EMAIL PROTECTED] wrote: Did you import javax.servlet.http.* ? -Original Message- From: Rahul Joshi [mailto:[EMAIL PROTECTED] Sent: Thursday, March 10, 2005 1:19 PM To: tomcat-user@jakarta.apache.org Subject: Cannot compile class in WEB-INF/classes I have a Simple JSP page in my webapps/myappname. I have a utility class which this page will use. The class file for this should be in webapps/myappname/WEB-INF/classes. So I put the java source file in that directory (webapps/myappname/WEB-INF/classes). Also, a method in this utility class has HttpServletRequest request as an argument. This will be passed when this method is called from the scriplet java code from the JSP page. The Problem is that the utility java file does not compile and gives error- Cannot recognize HttpServletRequest. Shouldn't servlet-api.jar be automatically visible? I am using latest Tomcat 5.5.8 and latest JDK/JRE 1.5. I can avoid the issue by not passing the request object but still is there a way to pass the request object? Thanks! Rahul. __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot compile class in WEB-INF/classes
I did not try compiling it at an external location. I thought I would compile it in classes and then delete the source java file later. I will try your suggestion of compiling it outside of tomcat and then copying the class in the classes directory. But does it mean that a java file cannot be compiled in WEB-INF/classes if it is accessing Tomcat's own servlet-api.jar? Thanks, Rahul. --- Anderson, M. Paul [EMAIL PROTECTED] wrote: Have you compiled the class previously? The source for the class does not go in the WEB-INF/classes directory - only the class files go here. You also need to pre-compile your classes - Tomcat doesn't do this for you. -Original Message- From: Rahul Joshi [mailto:[EMAIL PROTECTED] Sent: Thursday, March 10, 2005 1:26 PM To: Tomcat Users List Subject: RE: Cannot compile class in WEB-INF/classes Yes, I did. import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; API signature:String expand(HttpServletRequest request) -Rahul. --- Anderson, M. Paul [EMAIL PROTECTED] wrote: Did you import javax.servlet.http.* ? -Original Message- From: Rahul Joshi [mailto:[EMAIL PROTECTED] Sent: Thursday, March 10, 2005 1:19 PM To: tomcat-user@jakarta.apache.org Subject: Cannot compile class in WEB-INF/classes I have a Simple JSP page in my webapps/myappname. I have a utility class which this page will use. The class file for this should be in webapps/myappname/WEB-INF/classes. So I put the java source file in that directory (webapps/myappname/WEB-INF/classes). Also, a method in this utility class has HttpServletRequest request as an argument. This will be passed when this method is called from the scriplet java code from the JSP page. The Problem is that the utility java file does not compile and gives error- Cannot recognize HttpServletRequest. Shouldn't servlet-api.jar be automatically visible? I am using latest Tomcat 5.5.8 and latest JDK/JRE 1.5. I can avoid the issue by not passing the request object but still is there a way to pass the request object? Thanks! Rahul. __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.x - Is AIX 5.2 a supported O.S.? Unable to compile jsvc-src
I can't find documentation regarding supported Operating Systems or levels for Tomcat 5.x or 5.5.7. The error returned from .configure to indicates AIX 5.2.0 is not a supported operating system. When looking at .configure, I don't see any support for AIX. Is this correct or am I missing something? ( note: I am a Tomcat Newb ). Thank you, Ken Cottrell Unigroup Inc. -- Tech Services/Data Administration (636)349-2561 This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. This footnote also confirms that this email message has been swept for the presence of computer viruses. UniGroup Inc.
Tomcat 5.x - Is AIX 5.2 a supported O.S.? Unable to compile jsvc-src
Subject:Tomcat 5.x - Is AIX 5.2 a supported O.S.? Unable to compile jsvc-src I can't find documentation regarding supported Operating Systems or levels for Tomcat 5.x or 5.5.7. The error returned from .configure to indicates AIX 5.2.0 is not a supported operating system. When looking at .configure, I don't see any support for AIX. Is this correct or am I missing something? ( note: I am a Tomcat Newb ). Thank you, Ken Cottrell Unigroup Inc. -- Tech Services/Data Administration (636)349-2561 This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. This footnote also confirms that this email message has been swept for the presence of computer viruses. UniGroup Inc.
JSP Compile size error.
When trying to run my web app (Tomcat 5.5.6 on RedHat Linux 9) I get the following error:- org.apache.jasper.JasperException: Unable to compile class for JSP Generated servlet error: The code of method _jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) is exceeding the 65535 bytes limit Is this a JSP, tomcat or Linux limit ? Where can I change it ? Thanks in advance, Steve.
Re: JSP Compile size error.
Its a limit of the java compiler. This was once an issue with an older version of jasper then some refactorings made that problem less apparent. Odds are your jsp is *huge* so it will probbaly be painful to debug. Split the jsp into seperate pieces and use jsp:include. If you are using @includes to include source - that could be another reason for such a large file. [Personally .. @includes are evil] -Tim Kelly, Steve wrote: When trying to run my web app (Tomcat 5.5.6 on RedHat Linux 9) I get the following error:- org.apache.jasper.JasperException: Unable to compile class for JSP Generated servlet error: The code of method _jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) is exceeding the 65535 bytes limit Is this a JSP, tomcat or Linux limit ? Where can I change it ? Thanks in advance, Steve. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSP Compile size error.
Thanks Tim. You're right the jsp is pretty huge. Is this limit configurable anywhere? Steve. -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 21 January 2005 11:48 To: Tomcat Users List Subject: Re: JSP Compile size error. Its a limit of the java compiler. This was once an issue with an older version of jasper then some refactorings made that problem less apparent. Odds are your jsp is *huge* so it will probbaly be painful to debug. Split the jsp into seperate pieces and use jsp:include. If you are using @includes to include source - that could be another reason for such a large file. [Personally .. @includes are evil] -Tim Kelly, Steve wrote: When trying to run my web app (Tomcat 5.5.6 on RedHat Linux 9) I get the following error:- org.apache.jasper.JasperException: Unable to compile class for JSP Generated servlet error: The code of method _jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) is exceeding the 65535 bytes limit Is this a JSP, tomcat or Linux limit ? Where can I change it ? Thanks in advance, Steve. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSP Compile size error.
From: Tim Funk [mailto:[EMAIL PROTECTED] Subject: Re: JSP Compile size error. Its a limit of the java compiler. Actually it's a limitation of the Virtual Machine Specification. The method size in a class file is a 16-bit field. (I thought it was supposed to get bigger in 5.0 - I'm still looking for an updated VM Spec). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynamically compile JSPs
So it looks like I need to send in classpath and destination directory configuration stuff to the JspC task (using setClassPath and setOutputDir on antTask I think) Where do I get the proper information from though? (The proper information to me means the same classpath and output directory that tomcats jasper servlet uses) Is there a way to read the jasper servlets configuration variables in my serlvet? Of can I figure it out from the JspC(and related) source code? I haven't seen anything helpful there yet. Hey all - replying to myself yet again. I got this working now, it parses and compiles the JSP file to the proper directory under TOMCAT_HOME/work/ Now - I have another problem - there are 2 types of files that I do this with. They both wind up being Struts/Tiles layout files, just in different directories basically. When I upload/compile to one of the directories, it works perfectly for me - the JSP file is parsed and compiled, and when I view the pages the changes are properly reflected. In the other directory, it parses/compiles the uploaded JSP page, but for some reason Tomcat never displays the updated JSP page until I restart the server. There is nothing special about this directory that I know of, it is just the parent directory of the one that is actually working. Any idea how to fix that little problem? I was looking through the JspC code, and it looks like it reloads the JSP Servlet after a compile is done -but I'm not sure that would fix my problem (and as far as I know, there is no way to set JSPServletWrapper.reload to true from my serlvet.) Any ideas on this last problem would be greatly appreciated. Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't compile mod_jk 1.2.8
At 02:19 AM 1/11/2005, you wrote: Glenn Parsons wrote: Hello All, I know just enough to be dangerous.. not enough to know what is blowing my mod_jk build. I am on a super-fast dual 3.2GHz machine running CentOS (RedHat ES 3.0) with Apache 2.0.46-38, JDK 1.5.0_01, Tomcat 5.5.4 and Ant 1.6.2. The issue was addressed on the list couple of days ago. Take a look at: Mod_JK 1.2.8, gcc 3.4.3 on Linux RH ES3 - compile error thread from Jan. 5th. The solution is to download and compile the latest Apache 2.0.52 version. Mladen. Thank you ALL for your advice on this matter! I found the mod_proxy links, lent by Ben, earlier in the thread, very insightful and will frequently revisit them. I will, however compile the Apache sources as per Mladen, as this was my first instinct. I need mod_jk because I am serving some/little static content on Apache, but use Apache mostly for mod_php4. Tomcat is the real engine here, but there is some php content that will fare better under Apache. Thank All! Glenn Parsons -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. http://www.sng.ecs.soton.ac.uk/mailscanner/ Configuration by Glenn Parsons dnsadmin-at-1bigthink.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynamically compile JSPs
I was messing around with the code a little bit, and tried this: JspC antTask = new JspC(); antTask.setArgs(new String[] { -compile, uploadTileFilePath }); antTask.execute(); but this always gave me an error that javax.servlet package could not be found. Replying to myself here - but I got a bit further with this and need more support if anybody has any ideas. I thought at first that this code would parse/compile the uploaded JSP page using the same paths/classpath/etc. that the Jasper servlet setup in web.xml uses. It turns out I am wrong and it seems like it is using some sort of default for the classpath and output directory. The classpath just has the classes from the jars for my local site (hence no tomcat jars and there error being seen above. It is outputting the jsp file to a .java file under TOMCAT_HOME\org\apache\jsp\WEB_INF\tiles\public_\file_jsp.java (and presumably if I could get compilation to work it would compile to that directory as well.) So it looks like I need to send in classpath and destination directory configuration stuff to the JspC task (using setClassPath and setOutputDir on antTask I think) Where do I get the proper information from though? (The proper information to me means the same classpath and output directory that tomcats jasper servlet uses) Is there a way to read the jasper servlets configuration variables in my serlvet? Of can I figure it out from the JspC(and related) source code? I haven't seen anything helpful there yet. Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unable to compile class for JSP
Hi, This web page displays correctly http://www.dksy.net:8080/examples/jsp/num/numguess.jsp but all of the other examples on this page display the error below: http://www.dksy.net:8080/examples/jsp/index.html org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Compiling 1 source file . Any help would be greatly appreciated
RE: Unable to compile class for JSP
Server Env: Apache Tomcat 4.1.30 JVM 1.4.2_04-b05 Linux - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Unable to compile class for JSP
--- Nested Exception --- java.io.IOException: java.io.IOException: Cannot allocate memory at java.lang.UNIXProcess.init(UNIXProcess.java:143) at java.lang.Runtime.execInternal(Native Method) at java.lang.Runtime.exec(Runtime.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute .java:836) at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:479) at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:490) at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeEx ternalCompile(DefaultCompilerAdapter.java:486) at org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacExter nal.java:81) at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:976) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:799) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:317) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja va:473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator Base.java:492) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:242 2) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa lve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :163) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:82 8) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58 4) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:683) at java.lang.Thread.run(Thread.java:534) -Original Message- From: Dave Kennedy [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 11, 2005 3:25 PM To: tomcat-user@jakarta.apache.org Subject: Unable to compile class for JSP Hi, This web page displays correctly http
Can't compile mod_jk 1.2.8
Hello All, I know just enough to be dangerous.. not enough to know what is blowing my mod_jk build. I am on a super-fast dual 3.2GHz machine running CentOS (RedHat ES 3.0) with Apache 2.0.46-38, JDK 1.5.0_01, Tomcat 5.5.4 and Ant 1.6.2. Neither Apache, nor Tomcat have been fully configured yet, so they aren't running, but all environment variables are in place. I downloaded source and attempted to build from $(Source_dircetory)/jk/native, first with .configure, then make. Configure seems to do okay, except it does not find Apache. I told it to use apxs anyway. Make always breaks, see my output: ./configure --with-apxs=/usr/sbin/apxs --with-java-home=${JAVA_HOME} --with-java-platform=2 -enable-jni checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for style of include used by make... GNU checking dependency style of gcc... none checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking for a sed that does not truncate output... /bin/sed checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking command to parse /usr/bin/nm -B output... ok checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for ranlib... ranlib checking for strip... strip checking for objdir... .libs checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.lo... yes checking if gcc supports -fno-rtti -fno-exceptions... yes checking whether the linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking whether -lc should be explicitly linked in... no creating libtool checking for test... /usr/bin/test checking for rm... /bin/rm checking for grep... /bin/grep checking for echo... /bin/echo checking for sed... /bin/sed checking for cp... /bin/cp checking for mkdir... /bin/mkdir checking for snprintf... yes checking for vsnprintf... yes need to check for Perl first, apxs depends on it... checking for perl... /usr/bin/perl building connector for apache-2.0 checking for target platform... unix no apache given jni enable (need JDK) checking for JDK location (please wait)... /usr/java/jdk1.5.0_01 checking Java platform... forced Java 2 checking os_type directory... linux configure: creating ./config.status config.status: creating Makefile config.status: creating apache-1.3/Makefile config.status: creating apache-1.3/Makefile.apxs config.status: creating apache-2.0/Makefile config.status: creating apache-2.0/Makefile.apxs config.status: creating common/Makefile config.status: creating common/list.mk config.status: creating jni/Makefile config.status: creating common/portable.h config.status: executing depfiles commands [EMAIL PROTECTED] native]# make Making all in common make[1]: Entering directory `/root/jakarta-tomcat-connectors-1.2.8-src/jk/native/common' /bin/sh /usr/bin/libtool --silent --mode=compile gcc -I/usr/include/httpd -g -O2 -DHAVE_JNI -O2 -g -pipe -march=i386 -mcpu=i686 -DSSL_EXPERIMENTAL_ENGINE -I/usr/kerberos/include -pthread -DHAVE_APR -I/rpmbuild/skvidal/rpm/BUILD/httpd-2.0.46/prefork/srclib/apr/include /rpmbuild/skvidal/rpm/BUILD/httpd-2.0.46/srclib/apr/include -g -O2 -DHAVE_JNI -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -I /usr/java/jdk1.5.0_01/include -I /usr/java/jdk1.5.0_01/include
Re: dynamically compile JSPs
[EMAIL PROTECTED] wrote: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper/docs/api/index.html Usage of the JspC class. This should be what you want. I work in Windows 95% of the time, and I'm a simplicity freak, so I tend do do things, most of the time, with batch files called from UltraEdit. Anyway, this is relevant because one of the steps in my typical build process is a compilation of all JSP's. I use this class to do that. I can give you the two lines from my batch file that does this if it would be helpful, but I tend to think the javadocs will get you where you want to go. This is kind of an old thread I'm replying to - but I implemented what I thought would work for this, and haven't been able to get anything working reliably. As a refresher, the scenario is this: - a Tomcat 5.0.x server with Jasper setup in development=false mode - I upload a jsp page through a web interface, and want it to be compiled/usable immediately, instead of waiting for the scheduled jasper compilation - putting ?jsp_compile=true on the page doesn't seem to work - making development=true isn't an option After looking through the JspC documentation a little bit, I tried this code in my class after the JSP file is uploaded: JspC antTask = new JspC(); antTask.setArgs(new String[] { uploadTileFilePath }); antTask.execute(); And this does not seem to compile the file reliably. It does seem like something is happening, because the upload/compile action takes about 25-30 seconds longer to load when the jsp compilation code is included. In my work directory, the .java and .class files are never updated (new time stamp) right away. Sometimes if I wait a bit (5-10 minutes) the files are updated properly, but this seems to be the normal scheduled compilation. Sometimes if I load the page up in a browser after it has been uploaded/compiled, it seems to be compiled on access, but this does not always happen. I was messing around with the code a little bit, and tried this: JspC antTask = new JspC(); antTask.setArgs(new String[] { -compile, uploadTileFilePath }); antTask.execute(); but this always gave me an error that javax.servlet package could not be found. I then tried: JspC antTask = new JspC(); antTask.setArgs(new String[] { uploadTileFilePath }); antTask.execute(); antTask.setArgs(new String[] { -compile, uploadTileFilePath }); antTask.execute(); and this seemed to make it (so far) that the JSP page always gets compiled the next time it is loaded in a browser. This is passable if it must be the solution, but what I would really like is that the file gets completely compiled during the upload/compile action. The reason for this is that I want the person uploading to have to deal with the extra processing time, and not the person loading the page. Any help with solving this problem would be greatly appreciated. Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't compile mod_jk 1.2.8
This is just a guess, but try it without the --with-java-home=... setting. ./configure --with-apxs=/usr/sbin/apxs I'm working with the following on Sun Solaris 8: Tomcat 5.0.28 Apache 2.0.52 mod_jk 1.2.8 I was using Tomcat 5.5.4, but was having problems, so I dropped back to the 5.0.x branch. Good Luck, Troy -- Troy Simpson Applications Analyst/Programmer, OCPDBA, MCSE, SCSA North Carolina State University Libraries Campus Box 7111 | Raleigh | North Carolina ph.919.515.3855 | fax.919.513.3330 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't compile mod_jk 1.2.8
May I ask is there a reason that you need Apache? If yes, then is there any special reason for jk rather than mod_proxy(I think)? Just thought it might save you some headaches, that is unless you like that kind of thing. Doug - Original Message - From: Glenn Parsons [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Monday, January 10, 2005 5:04 PM Subject: Can't compile mod_jk 1.2.8 Hello All, I know just enough to be dangerous.. not enough to know what is blowing my mod_jk build. I am on a super-fast dual 3.2GHz machine running CentOS (RedHat ES 3.0) with Apache 2.0.46-38, JDK 1.5.0_01, Tomcat 5.5.4 and Ant 1.6.2. Neither Apache, nor Tomcat have been fully configured yet, so they aren't running, but all environment variables are in place. I downloaded source and attempted to build from $(Source_dircetory)/jk/native, first with .configure, then make. Configure seems to do okay, except it does not find Apache. I told it to use apxs anyway. Make always breaks, see my output: ./configure --with-apxs=/usr/sbin/apxs --with-java-home=${JAVA_HOME} --with-java-platform=2 -enable-jni checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for style of include used by make... GNU checking dependency style of gcc... none checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking for a sed that does not truncate output... /bin/sed checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking command to parse /usr/bin/nm -B output... ok checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for ranlib... ranlib checking for strip... strip checking for objdir... .libs checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.lo... yes checking if gcc supports -fno-rtti -fno-exceptions... yes checking whether the linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking whether -lc should be explicitly linked in... no creating libtool checking for test... /usr/bin/test checking for rm... /bin/rm checking for grep... /bin/grep checking for echo... /bin/echo checking for sed... /bin/sed checking for cp... /bin/cp checking for mkdir... /bin/mkdir checking for snprintf... yes checking for vsnprintf... yes need to check for Perl first, apxs depends on it... checking for perl... /usr/bin/perl building connector for apache-2.0 checking for target platform... unix no apache given jni enable (need JDK) checking for JDK location (please wait)... /usr/java/jdk1.5.0_01 checking Java platform... forced Java 2 checking os_type directory... linux configure: creating ./config.status config.status: creating Makefile config.status: creating apache-1.3/Makefile config.status: creating apache-1.3/Makefile.apxs config.status: creating apache-2.0/Makefile config.status: creating apache-2.0/Makefile.apxs config.status: creating common/Makefile config.status: creating common/list.mk config.status: creating jni/Makefile config.status: creating common/portable.h config.status: executing depfiles commands [EMAIL PROTECTED] native]# make Making all in common make[1]: Entering directory `/root/jakarta-tomcat-connectors-1.2.8-src/jk/native/common' /bin/sh /usr/bin/libtool --silent --mode=compile gcc -I/usr/include/httpd -g -O2 -DHAVE_JNI -O2 -g -pipe
Re: dynamically compile JSPs
Hey, I remember this thread :) (Mostly because you quoted my comment!) One solution is to shell out to do the compilation. I think I probably gave it to you last time, but here's the two pertinent lines from my compile job that does it: java -classpath %CP% org.apache.jasper.JspC -v3 -die -d %JSPAppDir% -webapp %WebAppDir% javac -classpath %CP% -d %JspDir% %JspDir%\*.java ...where... %CP% is the classpath, inclduing servlet.jar %JSRDir% is the location of the JSP %WebAppDir% is something like c:\tomcat\webapps\myapp (I modified this a tad so it's more applicable to you, but don't shoot me if you have to hack it slightly) Now, what I'm thinking, AND I BY NO MEANS ENDORSE THIS AS A GOOD SOLUTION, is that you could shell out these two commands, and that I think would get the job done. This is a has a Windows skew to it of course, but I can't see any reason it wouldn't work under *nix, if that's your environment, which just some minor changes. I've never tried using JspC from Java code as you did, although I'd think that's the way you'd want to go. I don't know what's wrong with the code you provided however, but if you get to that hair-pulling stage where you feel like your really stuck, I'm relatively sure the above will do it for you, if worse comes to worse. I guess if this isn't something that's going to be happening a lot, it might not be a problem this way. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com Matt Bathje wrote: [EMAIL PROTECTED] wrote: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper/docs/api/index.html Usage of the JspC class. This should be what you want. I work in Windows 95% of the time, and I'm a simplicity freak, so I tend do do things, most of the time, with batch files called from UltraEdit. Anyway, this is relevant because one of the steps in my typical build process is a compilation of all JSP's. I use this class to do that. I can give you the two lines from my batch file that does this if it would be helpful, but I tend to think the javadocs will get you where you want to go. This is kind of an old thread I'm replying to - but I implemented what I thought would work for this, and haven't been able to get anything working reliably. As a refresher, the scenario is this: - a Tomcat 5.0.x server with Jasper setup in development=false mode - I upload a jsp page through a web interface, and want it to be compiled/usable immediately, instead of waiting for the scheduled jasper compilation - putting ?jsp_compile=true on the page doesn't seem to work - making development=true isn't an option After looking through the JspC documentation a little bit, I tried this code in my class after the JSP file is uploaded: JspC antTask = new JspC(); antTask.setArgs(new String[] { uploadTileFilePath }); antTask.execute(); And this does not seem to compile the file reliably. It does seem like something is happening, because the upload/compile action takes about 25-30 seconds longer to load when the jsp compilation code is included. In my work directory, the .java and .class files are never updated (new time stamp) right away. Sometimes if I wait a bit (5-10 minutes) the files are updated properly, but this seems to be the normal scheduled compilation. Sometimes if I load the page up in a browser after it has been uploaded/compiled, it seems to be compiled on access, but this does not always happen. I was messing around with the code a little bit, and tried this: JspC antTask = new JspC(); antTask.setArgs(new String[] { -compile, uploadTileFilePath }); antTask.execute(); but this always gave me an error that javax.servlet package could not be found. I then tried: JspC antTask = new JspC(); antTask.setArgs(new String[] { uploadTileFilePath }); antTask.execute(); antTask.setArgs(new String[] { -compile, uploadTileFilePath }); antTask.execute(); and this seemed to make it (so far) that the JSP page always gets compiled the next time it is loaded in a browser. This is passable if it must be the solution, but what I would really like is that the file gets completely compiled during the upload/compile action. The reason for this is that I want the person uploading to have to deal with the extra processing time, and not the person loading the page. Any help with solving this problem would be greatly appreciated. Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't compile mod_jk 1.2.8
Parsons... How would mod_proxy() work? How is it used? I have not used it. Thanks, Troy -- Troy Simpson Applications Analyst/Programmer, OCPDBA, MCSE, SCSA North Carolina State University Libraries Campus Box 7111 | Raleigh | North Carolina ph.919.515.3855 | fax.919.513.3330 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't compile mod_jk 1.2.8
Basically, the idea is that if you want to serve static content along with dynamic (i.e., Tomcat webapp generated) content, you can server the dynamic through mod_jk/Tomcat and server the static from Apache. Apache tends to be more efficient and finely tunable from the straight http side. Additionally, if you want to cluster Tomcat's, the JK module is essential. So, if you only serve dynamic content and do not need clustering, let Tomcat servr the http connections. If you need to have Tomcat on another server (due to DMZ security, etc), use mod_proxy to pass all requests from Apache to the http connector of Tomcat. Finally, if you have static content and/or need clustering, go with mod_jk. Ben Ricker On Jan 10, 2005, at 5:54 PM, Troy Simpson wrote: Parsons... How would mod_proxy() work? How is it used? I have not used it. Thanks, Troy -- Troy Simpson Applications Analyst/Programmer, OCPDBA, MCSE, SCSA North Carolina State University Libraries Campus Box 7111 | Raleigh | North Carolina ph.919.515.3855 | fax.919.513.3330 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't compile mod_jk 1.2.8
http://httpd.apache.org/docs-2.0/mod/mod_proxy.html http://jakarta.apache.org/tomcat/faq/connectors.html#vs - Original Message - From: Ben Ricker [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Monday, January 10, 2005 7:06 PM Subject: Re: Can't compile mod_jk 1.2.8 Basically, the idea is that if you want to serve static content along with dynamic (i.e., Tomcat webapp generated) content, you can server the dynamic through mod_jk/Tomcat and server the static from Apache. Apache tends to be more efficient and finely tunable from the straight http side. Additionally, if you want to cluster Tomcat's, the JK module is essential. So, if you only serve dynamic content and do not need clustering, let Tomcat servr the http connections. If you need to have Tomcat on another server (due to DMZ security, etc), use mod_proxy to pass all requests from Apache to the http connector of Tomcat. Finally, if you have static content and/or need clustering, go with mod_jk. Ben Ricker On Jan 10, 2005, at 5:54 PM, Troy Simpson wrote: Parsons... How would mod_proxy() work? How is it used? I have not used it. Thanks, Troy -- Troy Simpson Applications Analyst/Programmer, OCPDBA, MCSE, SCSA North Carolina State University Libraries Campus Box 7111 | Raleigh | North Carolina ph.919.515.3855 | fax.919.513.3330 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't compile mod_jk 1.2.8
Glenn Parsons wrote: Hello All, I know just enough to be dangerous.. not enough to know what is blowing my mod_jk build. I am on a super-fast dual 3.2GHz machine running CentOS (RedHat ES 3.0) with Apache 2.0.46-38, JDK 1.5.0_01, Tomcat 5.5.4 and Ant 1.6.2. The issue was addressed on the list couple of days ago. Take a look at: Mod_JK 1.2.8, gcc 3.4.3 on Linux RH ES3 - compile error thread from Jan. 5th. The solution is to download and compile the latest Apache 2.0.52 version. Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [FIXED] Mod_JK 1.2.8, gcc 3.4.3 on Linux RH ES3 - compile error
Thomas Tinnes wrote: Hello, Just a follow up to let you know how this got resolved. First, thanks to all my respondents. It all helped. I tried using ./buildconf.sh, but got the same result. The Rosetta Stone came from Mladden when it was pointed out that the second value of -DHAVE_APR hadn't a -I before the second value string. I traced this back to the config which got these values by querying the apxs: APRINCLUDEDIR=-I`$APXS -q APR_INCLUDEDIR` the value of which is: [EMAIL PROTECTED] /usr/sbin/apxs -q APR_INCLUDEDIR /usr/src/redhat/BUILD/httpd-2.0.46/prefork/srclib/apr/include /usr/src/redhat/BUILD/httpd-2.0.46/srclib/apr/include Yes, seems like Apache 2.0.46 reports two APR_INCLUDEDIRs, instead just one on RHES3. Did you tried the later Apache versions like 2.0.50+? Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [FIXED] Mod_JK 1.2.8, gcc 3.4.3 on Linux RH ES3 - compile error
Hello, Just a brief epilog. Yes, Mladen, that's exactly what I had to do, in the end. I was trying to stay within the client's framework of crumbling, elderly programs and not take apps forward (in version), but in the end it proved impossible. It took four hours to compile the elderly Apache with mod_jk (I had to work through error after error) and when it was finally done the compiled httpd daemon gave seg faults. So, I downloaded 2.0.52 and it's all up to date now. Thanks, again. Yes, seems like Apache 2.0.46 reports two APR_INCLUDEDIRs, instead just one on RHES3. Did you tried the later Apache versions like 2.0.50+? Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mod_JK 1.2.8, gcc 3.4.3 on Linux RH ES3 - compile error
Mladen, No luck, alas. Same error. But thank you for the pointer, all the same. [EMAIL PROTECTED] make Making all in common make[1]: Entering directory `/tmp/jk/jakarta-tomcat-connectors-1.2.8-src/jk/native/common' /bin/sh /usr/bin/libtool --silent --mode=compile gcc -I/usr/include/httpd -g -O2 -O2 -g -pipe -march=i386 -mcpu=i686 -DSSL_EXPERIMENTAL_ENGINE -I/usr/kerberos/include -pthread -DHAVE_APR -I/usr/src/redhat/BUILD/httpd-2.0.46/prefork/srclib/apr/include /usr/src/redhat/BUILD/httpd-2.0.46/srclib/apr/include -g -O2 -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -I /usr/local/java/include -I /usr/local/java/include/ -c jk_ajp12_worker.c gcc: /usr/src/redhat/BUILD/httpd-2.0.46/srclib/apr/include: linker input file unused because linking not done cc1: /usr/src/redhat/BUILD/httpd-2.0.46/srclib/apr/include: No such file or directory make[1]: *** [jk_ajp12_worker.lo] Error 1 make[1]: Leaving directory `/tmp/jk/jakarta-tomcat-connectors-1.2.8-src/jk/native/common' make: *** [all-recursive] Error 1 On Jan 4, 2005, at 11:30 PM, Mladen Turk wrote: Perhaps the error is caused by space between -I and /usr/local/java Have no idea why this happening. I've tested the build on RH9 not on RHE3. Edit the common/Makefile.in and remove the spaces: From: JAVA_INCL=-I @JAVA_HOME@/include -I @JAVA_HOME@/include/@OS@ To: [EMAIL PROTECTED]@/include [EMAIL PROTECTED]@/include/@OS@ Tell me if that helps. Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Mod_JK 1.2.8, gcc 3.4.3 on Linux RH ES3 - compile error
From: Thomas Tinnes [mailto:[EMAIL PROTECTED] Subject: Re: Mod_JK 1.2.8, gcc 3.4.3 on Linux RH ES3 - compile error -I/usr/src/redhat/BUILD/httpd-2.0.46/prefork/srclib/apr/include /usr/src/redhat/BUILD/httpd-2.0.46/srclib/apr/include -g -O2 I think the problem is directly above: there's no -I before the 2nd include file, so the compiler is interpreting it as the target of the compilation. - Chuck P.S. I believe there should be a space before each -I, but it may be optional. THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mod_JK 1.2.8, gcc 3.4.3 on Linux RH ES3 - compile error
Thomas Tinnes wrote: Mladen, No luck, alas. Same error. But thank you for the pointer, all the same. Seems that the space is not a problem, but you have a strange entry: -I/usr/src/redhat/BUILD/httpd-2.0.46/prefork/srclib/apr/include /usr/src/redhat/BUILD/httpd-2.0.46/srclib/apr/include ... Seems like -I is missing from the last line. Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Mod_JK 1.2.8, gcc 3.4.3 on Linux RH ES3 - compile error
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Subject: RE: Mod_JK 1.2.8, gcc 3.4.3 on Linux RH ES3 - compile error P.S. I believe there should be a space before each -I, but it may be optional. Make that AFTER each -I. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mod_JK 1.2.8, gcc 3.4.3 on Linux RH ES3 - compile error
On Wed, 5 Jan 2005, Thomas Tinnes wrote: Mladen, No luck, alas. Same error. But thank you for the pointer, all the same. [EMAIL PROTECTED] make Making all in common make[1]: Entering directory file or directory make[1]: *** [jk_ajp12_worker.lo] Error 1 make[1]: Leaving directory `/tmp/jk/jakarta-tomcat-connectors-1.2.8-src/jk/native/common' make: *** [all-recursive] Error 1 Perhaps the error is caused by space between -I and /usr/local/java Have no idea why this happening. I've tested the build on RH9 not on RHE3. Edit the common/Makefile.in and remove the spaces: From: JAVA_INCL=-I @JAVA_HOME@/include -I @JAVA_HOME@/include/@OS@ To: [EMAIL PROTECTED]@/include [EMAIL PROTECTED]@/include/@OS@ Tell me if that helps. Mladen. Try running the buildconf.sh script to build the configure file. Then run your configure operation. I generally don't have success with the bundled configure file. Mon aéroglisseur est plein d'anguilles John P. Dodge Boeing Shared Services - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[FIXED] Mod_JK 1.2.8, gcc 3.4.3 on Linux RH ES3 - compile error
Hello, Just a follow up to let you know how this got resolved. First, thanks to all my respondents. It all helped. I tried using ./buildconf.sh, but got the same result. The Rosetta Stone came from Mladden when it was pointed out that the second value of -DHAVE_APR hadn't a -I before the second value string. I traced this back to the config which got these values by querying the apxs: APRINCLUDEDIR=-I`$APXS -q APR_INCLUDEDIR` the value of which is: [EMAIL PROTECTED] /usr/sbin/apxs -q APR_INCLUDEDIR /usr/src/redhat/BUILD/httpd-2.0.46/prefork/srclib/apr/include /usr/src/redhat/BUILD/httpd-2.0.46/srclib/apr/include This gave value to APR_INCLUDEDIR, which begat APRINCLUDEDIR, which begat -DHAVE_APR ${APRINCLUDEDIR} which begat the problem: -DHAVE_APR -I/usr/src/redhat/BUILD/httpd-2.0.46/prefork/srclib/apr/include /usr/src/redhat/BUILD/httpd-2.0.46/srclib/apr/include The solution was to go to each Makefile (./common, ./apache-1.3, ./apache-2.0) and just vi and add the missing -I. It seems to have compiled and installed fine. Thanks, again, to all. _tom On Jan 4, 2005, at 9:16 PM, Thomas Tinnes wrote: Hello, Getting a compile error I'm having trouble understanding. Here's my setup: Installing jakarta-tomcat-connectors-1.2.8-src.tar.gz from the Jakarta site. On a Linux Red Hat Enterprise 3 (Taroon) on an i386 arch i686 cpu. I'm using gcc version 3.4.3 20041212 (Red Hat 3.4.3-10). There's Apache 2.0.46-44 running with source objects in /usr/src/redhat/BUILD/httpd-2.0.46. I unzip and untar and cd to jakarta-tomcat-connectors-1.2.8-src/jk/native and do ./configure --with-apxs=/usr/sbin/apxs. The config runs without errors but when I run make, I get an Error 1: make[1]: Entering directory `/tmp/jk/jakarta-tomcat-connectors-1.2.8-src/jk/native/common' /bin/sh /usr/bin/libtool --silent --mode=compile gcc -I/usr/include/httpd -g -O2 -O2 -g -pipe -march=i386 -mcpu=i686 -DSSL_EXPERIMENTAL_ENGINE -I/usr/kerberos/include -pthread -DHAVE_APR -I/usr/src/redhat/BUILD/httpd-2.0.46/prefork/srclib/apr/include /usr/src/redhat/BUILD/httpd-2.0.46/srclib/apr/include -g -O2 -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -I /usr/local/java/include -I /usr/local/java/include/ -c jk_ajp12_worker.c gcc: /usr/src/redhat/BUILD/httpd-2.0.46/srclib/apr/include: linker input file unused because linking not done cc1: /usr/src/redhat/BUILD/httpd-2.0.46/srclib/apr/include: No such file or directory make[1]: *** [jk_ajp12_worker.lo] Error 1 make[1]: Leaving directory `/tmp/jk/jakarta-tomcat-connectors-1.2.8-src/jk/native/common' make: *** [all-recursive] Error 1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mod_JK 1.2.8, gcc 3.4.3 on Linux RH ES3 - compile error
Hello, Getting a compile error I'm having trouble understanding. Here's my setup: Installing jakarta-tomcat-connectors-1.2.8-src.tar.gz from the Jakarta site. On a Linux Red Hat Enterprise 3 (Taroon) on an i386 arch i686 cpu. I'm using gcc version 3.4.3 20041212 (Red Hat 3.4.3-10). There's Apache 2.0.46-44 running with source objects in /usr/src/redhat/BUILD/httpd-2.0.46. I unzip and untar and cd to jakarta-tomcat-connectors-1.2.8-src/jk/native and do ./configure --with-apxs=/usr/sbin/apxs. The config runs without errors but when I run make, I get an Error 1: make[1]: Entering directory `/tmp/jk/jakarta-tomcat-connectors-1.2.8-src/jk/native/common' /bin/sh /usr/bin/libtool --silent --mode=compile gcc -I/usr/include/httpd -g -O2 -O2 -g -pipe -march=i386 -mcpu=i686 -DSSL_EXPERIMENTAL_ENGINE -I/usr/kerberos/include -pthread -DHAVE_APR -I/usr/src/redhat/BUILD/httpd-2.0.46/prefork/srclib/apr/include /usr/src/redhat/BUILD/httpd-2.0.46/srclib/apr/include -g -O2 -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -I /usr/local/java/include -I /usr/local/java/include/ -c jk_ajp12_worker.c gcc: /usr/src/redhat/BUILD/httpd-2.0.46/srclib/apr/include: linker input file unused because linking not done cc1: /usr/src/redhat/BUILD/httpd-2.0.46/srclib/apr/include: No such file or directory make[1]: *** [jk_ajp12_worker.lo] Error 1 make[1]: Leaving directory `/tmp/jk/jakarta-tomcat-connectors-1.2.8-src/jk/native/common' make: *** [all-recursive] Error 1 And the directory /usr/src/redhat/BUILD/httpd-2.0.46/srclib/apr/include does exist and is populated. I believe I understand that the -c in the compile line indicates that there wouldn't be linking anyway, but I'm unsure why the program stops. I've looked at some of the Make files and can't seem to find a place to edit to prevent the exit. I've Googled, and scanned the archives here but can't seem to find a useful pointer to my problem. Any insight would be very welcome. Thanks. _tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mod_JK 1.2.8, gcc 3.4.3 on Linux RH ES3 - compile error
Thomas Tinnes wrote: make[1]: Entering directory `/tmp/jk/jakarta-tomcat-connectors-1.2.8-src/jk/native/common' -D_GNU_SOURCE -I /usr/local/java/include -I /usr/local/java/include/ -c jk_ajp12_worker.c Perhaps the error is caused by space between -I and /usr/local/java Have no idea why this happening. I've tested the build on RH9 not on RHE3. Edit the common/Makefile.in and remove the spaces: From: JAVA_INCL=-I @JAVA_HOME@/include -I @JAVA_HOME@/include/@OS@ To: [EMAIL PROTECTED]@/include [EMAIL PROTECTED]@/include/@OS@ Any insight would be very welcome. Thanks. Tell me if that helps. Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Compile and Deploy JSPs - Tomcat 4.0
Usually Tomcat JSPC compiler compiles classes to package org.apache.jsp. You can override it by specifiying packagename as an argument to the compile command/Ant task. Perhaps something is wrong with the compile arguments you used or the classfiles are not packed into the war file. rgds Antony Paul On Thu, 23 Dec 2004 07:47:14 +0200, Abhay Hiwarkar [EMAIL PROTECTED] wrote: Harry, I decompiled all the class files and checked for CLASS NAME. They are same as provided in web.xml. servlet servlet-nameclient/servlet-name servlet-classclient/servlet-class /servlet Still not able to access any jsp through http://localhost:8080/myProj/client.jsp Any help will be appriciated... Abhay Hiwarkar -Original Message- From: Harry Mantheakis [mailto:[EMAIL PROTECTED] Sent: Wed, 22 Dec 2004 18:32 To: Tomcat Users List Subject: Re: Compile and Deploy JSPs - Tomcat 4.0 I might be picking up fag ends here, but I noticed that in this block: servlet servlet-nameclient/servlet-name servlet-classclient/servlet-class /servlet The 'servlet-class' element would normally take the fully qualified name of the class - IOW the complete package name. Also, classes, by Java conventions, should have capitalised names - so perhaps your entry there is wrong. Good luck. Harry Mantheakis Hi, Thanks for your help. Also, I looked into archives and got more details. Still, I am not able to load any jsp which is comipled to class and deployed in a war file containing web.xml. On the other hand, I am able to get an html (also packed in the war file) loaded without any error. conf/server.xml has entry as follows - Context path=/myProj docBase=C:/tomcat4.0/myProj.war debug=0 privileged=true conf/web.xml has enry as follows - servlet servlet-nameclient/servlet-name servlet-classclient/servlet-class /servlet ... servlet-mapping servlet-nameclient/servlet-name url-pattern/client.jsp/url-pattern /servlet-mapping Upon issuing URL as : http://localhost:8080/myProj/client.jsp, following error is thrown : HTTP Status 500 : Internal Server Error ... javax.servlet.ServletException: Wrapper cannot find servlet class client or a class it depends on at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:87 3) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655) Could any one help. Thanks in advance, Abhay -Original Message- From: Antony Paul [mailto:[EMAIL PROTECTED] Sent: Tue, 21 Dec 2004 09:34 To: Tomcat Users List Subject: Re: Compile and Deploy JSPs - Tomcat 4.0 The proper way to do this is use the JSPC task to compile JSP files to class files and then create url mappings in the web.xml for the JSPs to class files. The class files are to be deployed in the WEB-INF/classes directory. The Anto JSPC task(which is same supplied with Tomcat). I think this topic is discussed previously and you can find details in the archives. rgds Antony Paul On Tue, 21 Dec 2004 09:21:00 +0200, Abhay Hiwarkar [EMAIL PROTECTED] wrote: Hi, I have around 120 JSP files and want to avoid deploying them with the source-code. Using JSPC utility, I am able to compile them to .java files. If required, I can get the .class files from: /tomcat4.0/work/myApp. Can anybody help me deploying only the .class files with Tomcat4.0. Many Thanks in advance, Regards, Abhay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Compile and Deploy JSPs - Tomcat 4.0
Hi, Thanks for your help. Also, I looked into archives and got more details. Still, I am not able to load any jsp which is comipled to class and deployed in a war file containing web.xml. On the other hand, I am able to get an html (also packed in the war file) loaded without any error. conf/server.xml has entry as follows - Context path=/myProj docBase=C:/tomcat4.0/myProj.war debug=0 privileged=true conf/web.xml has enry as follows - servlet servlet-nameclient/servlet-name servlet-classclient/servlet-class /servlet ... servlet-mapping servlet-nameclient/servlet-name url-pattern/client.jsp/url-pattern /servlet-mapping Upon issuing URL as : http://localhost:8080/myProj/client.jsp, following error is thrown : HTTP Status 500 : Internal Server Error ... javax.servlet.ServletException: Wrapper cannot find servlet class client or a class it depends on at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:87 3) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655) Could any one help. Thanks in advance, Abhay -Original Message- From: Antony Paul [mailto:[EMAIL PROTECTED] Sent: Tue, 21 Dec 2004 09:34 To: Tomcat Users List Subject: Re: Compile and Deploy JSPs - Tomcat 4.0 The proper way to do this is use the JSPC task to compile JSP files to class files and then create url mappings in the web.xml for the JSPs to class files. The class files are to be deployed in the WEB-INF/classes directory. The Anto JSPC task(which is same supplied with Tomcat). I think this topic is discussed previously and you can find details in the archives. rgds Antony Paul On Tue, 21 Dec 2004 09:21:00 +0200, Abhay Hiwarkar [EMAIL PROTECTED] wrote: Hi, I have around 120 JSP files and want to avoid deploying them with the source-code. Using JSPC utility, I am able to compile them to .java files. If required, I can get the .class files from: /tomcat4.0/work/myApp. Can anybody help me deploying only the .class files with Tomcat4.0. Many Thanks in advance, Regards, Abhay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
dynamically compile JSPs
Hi all - If you have your tomcat servers setup with development=false (compiling every 5 minutes) - is there a way to dynamically compile certain JSP pages from inside your servlet code? (Or at least to trigger a compile to happen off of the schedule?) If so - are there any side effects of doing this? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynamically compile JSPs
I would think that making the query string be jsp_compile=true would do it. For example: mypage.jsp?jsp_compile=true [I never tried it] -Tim Matt Bathje wrote: Hi all - If you have your tomcat servers setup with development=false (compiling every 5 minutes) - is there a way to dynamically compile certain JSP pages from inside your servlet code? (Or at least to trigger a compile to happen off of the schedule?) If so - are there any side effects of doing this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Compile and Deploy JSPs - Tomcat 4.0
I might be picking up fag ends here, but I noticed that in this block: servlet servlet-nameclient/servlet-name servlet-classclient/servlet-class /servlet The 'servlet-class' element would normally take the fully qualified name of the class - IOW the complete package name. Also, classes, by Java conventions, should have capitalised names - so perhaps your entry there is wrong. Good luck. Harry Mantheakis Hi, Thanks for your help. Also, I looked into archives and got more details. Still, I am not able to load any jsp which is comipled to class and deployed in a war file containing web.xml. On the other hand, I am able to get an html (also packed in the war file) loaded without any error. conf/server.xml has entry as follows - Context path=/myProj docBase=C:/tomcat4.0/myProj.war debug=0 privileged=true conf/web.xml has enry as follows - servlet servlet-nameclient/servlet-name servlet-classclient/servlet-class /servlet ... servlet-mapping servlet-nameclient/servlet-name url-pattern/client.jsp/url-pattern /servlet-mapping Upon issuing URL as : http://localhost:8080/myProj/client.jsp, following error is thrown : HTTP Status 500 : Internal Server Error ... javax.servlet.ServletException: Wrapper cannot find servlet class client or a class it depends on at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:87 3) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655) Could any one help. Thanks in advance, Abhay -Original Message- From: Antony Paul [mailto:[EMAIL PROTECTED] Sent: Tue, 21 Dec 2004 09:34 To: Tomcat Users List Subject: Re: Compile and Deploy JSPs - Tomcat 4.0 The proper way to do this is use the JSPC task to compile JSP files to class files and then create url mappings in the web.xml for the JSPs to class files. The class files are to be deployed in the WEB-INF/classes directory. The Anto JSPC task(which is same supplied with Tomcat). I think this topic is discussed previously and you can find details in the archives. rgds Antony Paul On Tue, 21 Dec 2004 09:21:00 +0200, Abhay Hiwarkar [EMAIL PROTECTED] wrote: Hi, I have around 120 JSP files and want to avoid deploying them with the source-code. Using JSPC utility, I am able to compile them to .java files. If required, I can get the .class files from: /tomcat4.0/work/myApp. Can anybody help me deploying only the .class files with Tomcat4.0. Many Thanks in advance, Regards, Abhay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynamically compile JSPs
I can't seem to find any solid documentation on this (I downloaded the JSP 2.0 spec and don't see it mentioned, even though based on a google search it seems like it is is a JSP thing and not a tomcat thing) But anyways - it doesn't seem to work for me, and I think the reason is that the jsp I want to compile dynamically is a struts/tiles layout page. There is no way to access the file directly through the browser. I may be able to get away with putting jsp_compile=true in the tile definition path, but I'd like to avoid that because (if my understanding of this parameter is true) the page will get recompiled on every page load, which is really not what I want, and would probably hurt performance a lot. Any other ideas for dynamic JSP compilation? Calling the compiler from inside the code (a struts action) if possible is not out of the question as long as there is no serious downside. Thanks, Matt Tim Funk wrote: I would think that making the query string be jsp_compile=true would do it. For example: mypage.jsp?jsp_compile=true [I never tried it] -Tim Matt Bathje wrote: Hi all - If you have your tomcat servers setup with development=false (compiling every 5 minutes) - is there a way to dynamically compile certain JSP pages from inside your servlet code? (Or at least to trigger a compile to happen off of the schedule?) If so - are there any side effects of doing this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: dynamically compile JSPs
This might be a long way round but you could call a system ant job to compile them. Or if it is appropriate in your environment you should just precompile them anyway, this way there will be no performance hit at all on your production server when a new deployment is made. Ta Matt -Original Message- From: Matt Bathje [mailto:[EMAIL PROTECTED] Sent: 22 December 2004 17:01 To: Tomcat Users List Subject: Re: dynamically compile JSPs I can't seem to find any solid documentation on this (I downloaded the JSP 2.0 spec and don't see it mentioned, even though based on a google search it seems like it is is a JSP thing and not a tomcat thing) But anyways - it doesn't seem to work for me, and I think the reason is that the jsp I want to compile dynamically is a struts/tiles layout page. There is no way to access the file directly through the browser. I may be able to get away with putting jsp_compile=true in the tile definition path, but I'd like to avoid that because (if my understanding of this parameter is true) the page will get recompiled on every page load, which is really not what I want, and would probably hurt performance a lot. Any other ideas for dynamic JSP compilation? Calling the compiler from inside the code (a struts action) if possible is not out of the question as long as there is no serious downside. Thanks, Matt Tim Funk wrote: I would think that making the query string be jsp_compile=true would do it. For example: mypage.jsp?jsp_compile=true [I never tried it] -Tim Matt Bathje wrote: Hi all - If you have your tomcat servers setup with development=false (compiling every 5 minutes) - is there a way to dynamically compile certain JSP pages from inside your servlet code? (Or at least to trigger a compile to happen off of the schedule?) If so - are there any side effects of doing this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any opinions expressed in this E-mail may be those of the individual and not necessarily the company. This E-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this E-mail in error and that any use or copying is strictly prohibited. If you have received this E-mail in error please notify the beCogent postmaster at [EMAIL PROTECTED] Unless expressly stated, opinions in this email are those of the individual sender and not beCogent Ltd. You must take full responsibility for virus checking this email and any attachments. Please note that the content of this email or any of its attachments may contain data that falls within the scope of the Data Protection Acts and that you must ensure that any handling or processing of such data by you is fully compliant with the terms and provisions of the Data Protection Act 1984 and 1998. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]