Re: JspC exception with log4j in WEB-INF/lib
But as soon as I put log4j-1.2.9.jar into my WEB-INF/lib directory, it doesn't work any more. I get the following exception: [jasper2] java.lang.NullPointerException [jasper2] at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:220) After building a version of Tomcat which logs the exception that happens when trying to create the compiler (by default it's caught without logging), I was able to figure out how to fix it. Apparently, when log4j-1.2.9.jar is in WEB-INF/lib, it also needs to be in the ant/lib directory (or somewhere else in the Ant classpath). If it isn't there, a ClassNotFound exception will be thrown when trying to create the compiler (either Ant or JDT), but this exception is caught without logging and later the NullPointer exception happens. As a side effect, I discovered that the same goes for jasper-compiler-jdt.jar. The JDT compiler will not be used unless it's in the Ant classpath. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JspC exception with log4j in WEB-INF/lib [255729:132231]
Many thanks for your email. This is an automated response acknowledging receipt. Please be advised that Badge mailing commences beginning of October 2005. Should your message require a response we will respond shortly. Regards Meridian Club -Original Message- From: Artur Brinkmann [EMAIL PROTECTED] Received: 10/7/2005 2:27 PM To: tomcat-user@jakarta.apache.org Subject: JspC exception with log4j in WEB-INF/lib I'm trying to use the Jspc ant task to precompile JSP pages. It's almost working except for one problem. I made a minimal webapp, with the usual structure, and just one empty JSP file. The task runs fine and compiles the JSP without problems. But as soon as I put log4j-1.2.9.jar into my WEB-INF/lib directory, it doesn't work any more. I get the following exception: [jasper2] java.lang.NullPointerException [jasper2] at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:220) [jasper2] at org.apache.jasper.JspC.processFile(JspC.java:849) [jasper2] at org.apache.jasper.JspC.execute(JspC.java:991) [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:157) [jasper2] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306) [jasper2] at org.apache.tools.ant.Task.perform(Task.java:401) [jasper2] at org.apache.tools.ant.Target.execute(Target.java:338) [jasper2] at org.apache.tools.ant.Target.performTasks(Target.java:365) [jasper2] at org.apache.tools.ant.Project.executeTarget(Project.java:1237) [jasper2] at org.apache.tools.ant.Project.executeTargets(Project.java:1094) [jasper2] at org.apache.tools.ant.Main.runBuild(Main.java:669) [jasper2] at org.apache.tools.ant.Main.startAnt(Main.java:220) [jasper2] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) [jasper2] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) [jasper2] Error in class org.apache.jasper.JspC I tried different versions of log4j, without success. Any other jar files don't bother Jspc, but as soon as I put log4j in WEB-INF/lib, I get this exception. The funny thing is, WEB-INF/lib isn't even in the classpath of the JspC task. And if I put log4j in ${tomcat.home}/common/lib (which is in the classpath), I don't get the exception. Well, I can't figure it out... anybody know why this could be happening? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Meridian Club Unit 5, Caxton Centre Porters Wood St Albans Herts UNITED KINGDOM AL3 6XT Tel: +44 1727 738855 Fax: +44 1700 578955 email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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]
Re: JSPc excludes?
Guys, Sorry to ask a redundant question -- I looked on the list archives and found my answer: http://marc.theaimsgroup.com/?l=tomcat-userm=110607458931449w=2 No possiblity of doing excludes. I'm going to try to hack in this functionality to the org.apache.jasper.JspCclass but I'm unclear as to how it's working. First off, the class doesn't extend org.apache.tools.ant.Task. Anyone know how this class actually works? Thanks, --Bill On 4/18/05, Bill Lynch [EMAIL PROTECTED] wrote: Guys, I've been using the JSPc task (org.apache.jasper.JspC) to compile a set of JSPs. So far so good, but I now want to exclude a few of the JSPs from being precompiled. Unfortuntely, there's no attribute (that I know of) in the JSPc task to do this. Am I missing something here? Thanks, --Bill
Re: jspc taglib handling different between 5.5.4 and 5.5.7
I am having the same issue. My absolute uri'd tld are not getting resolved. Also I am getting this error when I try running my struts app: ERROR: 2005-02-02 14:45:27,578: ApplicationDispatcher: Servlet.service() for servlet jsp threw exception java.lang.ClassCastException at org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:420) at org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:248) at org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:162) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418) at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539) at org.apache.jasper.compiler.Parser.parse(Parser.java:126) at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) On Tue, 1 Feb 2005 09:55:12 -0600, Jason Schuchert [EMAIL PROTECTED] wrote: i upgraded to 5.5.7 this weekend and noticed that my ant jsp precompile task was failing for .jsp files that were referencing taglibs. it gave a message like: org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or the jar files deployed with this application the line in the offending jsp looks like: %@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql % if i go into the jstl taglib jar file and grab the sql.tld file and put it into my WEB-INF then the jspc task works. in 5.5.4 this worked without having the sql.tld file in WEB-INF (it was just found in the .jar file of the tag library) anybody hitting similar issues? was there a change in the jspc code that intentionally makes this not work in 5.5.7? thanks! -jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jspc taglib handling different between 5.5.4 and 5.5.7
i submitted a bug (http://issues.apache.org/bugzilla/show_bug.cgi?id=33373) for the precompile error i'm getting which you may want to add your information too as well if you think it's related (or log separate bug if not) thanks, -jason - Original Message - From: Vinny [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Wednesday, February 02, 2005 2:13 PM Subject: Re: jspc taglib handling different between 5.5.4 and 5.5.7 I am having the same issue. My absolute uri'd tld are not getting resolved. Also I am getting this error when I try running my struts app: ERROR: 2005-02-02 14:45:27,578: ApplicationDispatcher: Servlet.service() for servlet jsp threw exception java.lang.ClassCastException at org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:420) at org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:248) at org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:162) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418) at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539) at org.apache.jasper.compiler.Parser.parse(Parser.java:126) at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) On Tue, 1 Feb 2005 09:55:12 -0600, Jason Schuchert [EMAIL PROTECTED] wrote: i upgraded to 5.5.7 this weekend and noticed that my ant jsp precompile task was failing for .jsp files that were referencing taglibs. it gave a message like: org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or the jar files deployed with this application the line in the offending jsp looks like: %@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql % if i go into the jstl taglib jar file and grab the sql.tld file and put it into my WEB-INF then the jspc task works. in 5.5.4 this worked without having the sql.tld file in WEB-INF (it was just found in the .jar file of the tag library) anybody hitting similar issues? was there a change in the jspc code that intentionally makes this not work in 5.5.7? thanks! -jason - 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: JspC on Tomcat5 vs Tomcat4 - Java Source Generation
Hi, I assume you're already read http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html#Web%20 Application%20Compilation? To me, that page suggests JspC just creates java code, and then javac must be called (explicitly, by you) to compile that code. Moreover, the error you're getting isn't a Java compilation error, it's a Jasper JSP translation error, which seems reasonable. JspC also supports the compile switch, which you can use to turn compilation on or off. As you can see by looking at the source code (http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-jasper/jasper2/src/sha re/org/apache/jasper/JspC.java?rev=1.84view=markup), compile is set to false by default. Yoav Shapira http://www.yoavshapira.com -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Lukas Bradley Sent: Friday, October 15, 2004 3:23 PM To: [EMAIL PROTECTED] Subject: JspC on Tomcat5 vs Tomcat4 - Java Source Generation On old Tomcat 4 projects, the Manager used Ant to generate Java source from my JSPs, which could then be compiled directly with my other Java source, and all was good. The Manager saw that it was good, and it was good. In the great migration to Tomcat 5, the Ant script proclaimed: this task doesn't support Tomcat 5.x properly, please use the Tomcat provided jspc task instead And there was much scurrying. The Manager defined a new task, one for Tomcat 5.x using org.apache.jasper.JspC, for Tomcat 5 begat Jasper2. (Actually, it was earlier, but that's neither here nor there...) The Manager was pleased that the task looked about the same, and he saw that it was good, and it was good. Until he freaking tried to run it, and it didn't work. Because it appears as if the task is attempting to generate AND compile from JSP to classes, which isn't what I want. I would really like for my Java source to be generated, so I can compile it along-side my regular source later. When trying to compile, it's looking for dependencies in my code that is right beside it, but uncompiled. Maybe I'm a little off, and it needs those binary dependant classes for source generation, but my tingling geeky sense tells me otherwise. What setting am I missing to do this? Here is the setup: target name=jsp-to-java depends=prepare echoproperties /echoproperties taskdef classname=org.apache.jasper.JspC name=jasper2 classpath id=jspc.classpath pathelement location=${java.home}/lib/tools.jar / fileset dir=${catalina.home}/bin include name=*.jar / /fileset fileset dir=${catalina.home}/server/lib include name=*.jar / /fileset fileset dir=${catalina.home}/common/lib include name=*.jar / /fileset fileset dir=${catalina.home}/shared/lib include name=*.jar / /fileset /classpath /taskdef jasper2 verbose=9 package=p2p.ui.jsp validateXml=false webxml=${build.web-inf.dir}/web.xml uriroot=${build.web.dir} webXmlFragment=${temp}/webinc.xml outputDir=${build.java.source.dir} / /target And the You suck, I can't find your dependant classes error: jsp-to-java: [jasper2] log4j:WARN No appenders could be found for logger (org.apache.jasper.compiler.Compiler). [jasper2] log4j:WARN Please initialize the log4j system properly. [jasper2] Oct 15, 2004 3:07:39 PM org.apache.jasper.JspC processFile [jasper2] INFO: Built File: \Error.jsp [jasper2] Oct 15, 2004 3:07:39 PM org.apache.jasper.JspC processFile [jasper2] INFO: Built File: \SecurityException.jsp BUILD FAILED: C:\dev\games\conf\build\build.xml:146: org.apache.jasper.JasperException: file:C:/dev/games/build/web/user/Login.jsp(4,0) Unable to load tag handler class p2p.ui.tags.form.ErrorsTag for tag form:errors I've started compiled my classes before the JSPs, then including that in the JspC path, but I'm just all flustered now that my previous build order has been changed, and expectations are all off. And I don't want to continue pouting. Inform me, please. Lukas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JspC on Tomcat5 vs Tomcat4 - Java Source Generation
Yes, Yoav, everything you wrote is correct. I have read all those things, and the source is being created *for those files that do not have dependencies with my other java source.* In short, I was wondering why the older JSP Java generation in ANT didn't need those class dependencies, but the new one does. Lukas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSPC/Jasper2 with no package name - bug???
Do people agree this is a bug?? should I submit a bug report? cheers, David |-+ | | [EMAIL PROTECTED] | | || | | 07/29/2004 05:57 | | | PM | | | Please respond to| | | Tomcat Users| | | List| | || |-+ | | | | To: Tomcat Users List [EMAIL PROTECTED] | | cc: | | Subject: JSPC/Jasper2 with no package name - bug??? | | Hi, I precompile my JSP's. I have the source files under a directory structure as follows: src jsp user admin I am trying to use the JspC with Ant as described at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html. However, I want the package name to be the sub-directory ie user, admin etc. for the respective files. I tried leaving off package= at first, but this created them all with a package of org.apache.jsp.user/admin etc.. I then tried just putting package=, but now I get an error with the package name becoming .user, .admin, which is obviously invalid. How do I achieve what I need? Is this a bug? Can anyone point me in the right direction where the package statement is generated when the java files are created? Many thanks, David - 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: JSPC/Jasper2 with no package name - bug???
I don't know what you want to achieve, but my jspc task generates package names with subdirectories (eg. org.apache.jsp.user and org.apache.jsp.admin, in org/apache/jsp/user and org/apache/jsp/admin respectively) ... Also I don't know where you set that package= thing? On 7/30/2004 1:38 PM, [EMAIL PROTECTED] wrote: Do people agree this is a bug?? should I submit a bug report? cheers, David |-+ | | [EMAIL PROTECTED] | | || | | 07/29/2004 05:57 | | | PM | | | Please respond to| | | Tomcat Users| | | List| | || |-+ | | | | To: Tomcat Users List [EMAIL PROTECTED] | | cc: | | Subject: JSPC/Jasper2 with no package name - bug??? | | Hi, I precompile my JSP's. I have the source files under a directory structure as follows: src jsp user admin I am trying to use the JspC with Ant as described at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html. However, I want the package name to be the sub-directory ie user, admin etc. for the respective files. I tried leaving off package= at first, but this created them all with a package of org.apache.jsp.user/admin etc.. I then tried just putting package=, but now I get an error with the package name becoming .user, .admin, which is obviously invalid. How do I achieve what I need? Is this a bug? Can anyone point me in the right direction where the package statement is generated when the java files are created? Many thanks, David -- Dennis Dai [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSPC/Jasper2 with no package name - bug???
Yes, it will generate the package names if you leave it off (you add package= to the jspc task, like you do uriroot=${src}\jsp). I'm trying to get it to give me the **subdirectories** as the full package name - ie user.myjsp.jsp etc.. cheers, David |-+ | | Dennis Dai | | | [EMAIL PROTECTED]| | | | | || | | 07/30/2004 05:01 | | | PM | | | Please respond to| | | Tomcat Users| | | List| | || |-+ | | | | To: Tomcat Users List [EMAIL PROTECTED] | | cc: | | Subject: Re: JSPC/Jasper2 with no package name - bug??? | | I don't know what you want to achieve, but my jspc task generates package names with subdirectories (eg. org.apache.jsp.user and org.apache.jsp.admin, in org/apache/jsp/user and org/apache/jsp/admin respectively) ... Also I don't know where you set that package= thing? On 7/30/2004 1:38 PM, [EMAIL PROTECTED] wrote: Do people agree this is a bug?? should I submit a bug report? cheers, David |-+ | | [EMAIL PROTECTED] | | || | | 07/29/2004 05:57 | | | PM | | | Please respond to| | | Tomcat Users| | | List| | || |-+ | | | | To: Tomcat Users List [EMAIL PROTECTED] | | cc: | | Subject: JSPC/Jasper2 with no package name - bug??? | | Hi, I precompile my JSP's. I have the source files under a directory structure as follows: src jsp user admin I am trying to use the JspC with Ant as described at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html. However, I want the package name to be the sub-directory ie user, admin etc. for the respective files. I tried leaving off package= at first, but this created them all with a package of org.apache.jsp.user/admin etc.. I then tried just putting package=, but now I get an error with the package name becoming .user, .admin, which is obviously invalid. How do I achieve what I need? Is this a bug? Can anyone point me in the right direction where the package statement is generated when the java files are created? Many thanks, David -- Dennis Dai [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: jspc
Hi Jason, Yes, it was of help. Thanks for your lengthy insight. Paul. Hi Paul, To specify a path for your compilation results use the -d option like so: jspc.sh -compile -d /jakarta-tomcat-5.0.25/webapps myapp/WEB-INF/classes ...the rest of you compile options... It will build any subdirs required using the directory you specify, along with the package name you give it (org.apache.jsp if you don't specify a package name) as the root directory for any subdirs. As for the work directory that is where Tomcat places any jsps that it has to compile (i.e. non-precompiled jsps) during runtime. If you run Tomcat with uncompiled jsps and walk though your app in a browser you will see compiled JSPs appear in the work directory. It will create subdirs, etc. to mimic your applications directory structure and place compiled versions there. You could just place your compiled jsps in the same respective places in the work directory before starting Tomcat and it would probably work. BUT, Tomcat will only expand .war files into the webapps directory so you have no way of packaging up these compiled files from the work directory and automatically expanding them into another work directory at Tomcat startup. That would have to be a manual process by the end user (or an install script). It is not the recommended deployment strategy. It does save you from having to worry about having the web.xml mappings correct though. Tomcat will check first in the work directory for a compiled jsp and then look for an uncompiled version if it doesn't find one there. No mappings in web.xml are required. In answer to another related question I saw posted: If you precompile your JSPs and then remove the original JSPs you need to have two things for your app to run: 1. The compiled JSP class files need to be copied over to the WEB-INF/classes directory with the correct directory structure. (The exact directory with be the package name (org.apache.jsp by default) plus any subdirs the JSP existed in under you apps root folder. i.e. if under webapps/yourapp you had a jsp in a directory subdir1/subdirB then under you WEB-INF/classes directory you would need a directory called org/apache/jsp/subdir1/subdirB and you would place that compiled JSP class there. The easiest way to do this is to run your compile with the -d option as stated above and point the output to your WEB-INF/classes directory. jspc in Tomcat 5.x should automatically create the correct subdir structure and place the class file in it. 2. Yuo need servlet definitions and mappings that tell Tomcat If someone requests this .jsp execute this servlet instead. These go in the web.xml file for your app. jspc will create a complete file or just a fragment file that contains all the mappings. You can tell it explicitly to create a fragment file with the -webinc option like so: -webinc /jakarta-tomcat-5.0.25/webapps/myapp/WEB-INF/my_web_fragment.xml I think it creates a complete web.xml if you use this option -webxml /jakarta-tomcat-5.0.25/webapps/myapp/WEB-INF/my_complete_web.xml In this case you just have to rename the file web.xml and place it in you app's WEB-INF directory. If you don't do BOTH of these things, then Tomcat won't know where to look for your compiled JSPs and will instead look for the actual .jsp. Finding nothing it will throw a 404 error. I hope this is helpful. Jason --- Paul Wallace [EMAIL PROTECTED] wrote: (sorry, wrong key!) Hi Jason, Thanks for that. Yes, it does make sense. A couple of things though, I just ran it with -compile - great. But my query about the work directory and was more towards what I am being 'encouraged' to do from the powers that be. I.e not WAR the app., but put it in the work directory. Is this ill-advised/poor practice? To accomplish this, is it as simple as dragging the compiled source under my work directory, and modifying my web.xml as advised? Why does -compile work, but not appear in the usage?! Also, can I specify a path for the compilation, rather than the classes be placed in the same dirs as the source? (I tried adding a path after the -compile switch, but it constructed and compiled a file with the same name as the class directory destination). Do I make sense?! Paul. Paul, I just use the -compile option and have jspc do the compilation from .java to .class for me. It seems to work fairly well. Once all the fully compiled (ie .class) files are placed in you applications WEB-INF/classes directory you just need to place the generated web.xml file in WEB-INF. There is an option to create a complete web.xml file that you can place in WEB-INF or, if you already have a web.xml file you want to keep, you can have jspc create an xml fragment that just contains the servlet definitions and mappings that you then add (in the appropriate place) to your existing web.xml. Then just war up you application
RE: jspc
Hi. In addition to sacing resources on the webserver it also allows you to run your tomcat server (the live one) without javac being on the machine - which is a security step. Carl -Original Message- From: Paul Wallace [mailto:[EMAIL PROTECTED] Sent: 25 June 2004 03:38 AM To: Tomcat Users List Subject: RE: jspc Hi, Yes..that is what I thought, but I learned from a 'reliable' source I could accomplish this on saving overhead. So rather than looking into the whys and whats, I looked into how to do it, and look into the performance benefits later. I will provide the list with my sources reasoning, when it becomes available! A thought..and to answer a question with a question (Why would you precompile jsp files?), why is jspc there? If only to increase performance on the first hit? Thanks Paul. It will increase speed on the first viewing of the jsp, but after that I can't see how there will be any difference. How much memory can you save if any? And how would that work? Thanks On Fri, 25 Jun 2004 11:12:44 +1000, Paul Wallace [EMAIL PROTECTED] wrote: In an effort to increase speed/free up memory that otherwise might be consumed by Tomcat otherwise Why would you precompile jsp files? On Fri, 25 Jun 2004 09:32:38 +1000, Paul Wallace [EMAIL PROTECTED] wrote: (sorry, wrong key!) Hi Jason, Thanks for that. Yes, it does make sense. A couple of things though, I just ran it with -compile - great. But my query about the work directory and was more towards what I am being 'encouraged' to do from the powers that be. I.e not WAR the app., but put it in the work directory. Is this ill-advised/poor practice? To accomplish this, is it as simple as dragging the compiled source under my work directory, and modifying my web.xml as advised? Why does -compile work, but not appear in the usage?! Also, can I specify a path for the compilation, rather than the classes be placed in the same dirs as the source? (I tried adding a path after the -compile switch, but it constructed and compiled a file with the same name as the class directory destination). Do I make sense?! Paul. Paul, I just use the -compile option and have jspc do the compilation from .java to .class for me. It seems to work fairly well. Once all the fully compiled (ie .class) files are placed in you applications WEB-INF/classes directory you just need to place the generated web.xml file in WEB-INF. There is an option to create a complete web.xml file that you can place in WEB-INF or, if you already have a web.xml file you want to keep, you can have jspc create an xml fragment that just contains the servlet definitions and mappings that you then add (in the appropriate place) to your existing web.xml. Then just war up you application directory in the normal way (you can even delete the jsps once your certain the servlet mappings are working). If you try to put the generated files in your working directory you won't be able to war them up and deploy them in the normal put war file under webapps directory and tomcat will expand it when it starts way. You'd have to ship a complete tomcat directory structure with the work directory already filled in with your compiled jsps. Does that make sense? Jason --- Paul Wallace [EMAIL PROTECTED] wrote: Hello, I have compiled my JSPs thus: jspc -webapp C:\src\site -d C:\src\site\classes -s -l -uriroot C:\src\site this builds the Java source files to the specified location, but how might I deploy them? What is a typical deployment after a JSP compilation? Compilation of Java source files, then WAR/JAR? Can I not define the JSP compile to go under my work directory? The purpose of my efforts is to try and speed up / make TC less memory consumptive. cheers Paul. __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail - 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] -- They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin (1755) - 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
Re: jspc
A good reason to precompile your JSP files is to make sure you don't accidentally have broken JSP files on production. You then know *before* deployment if any changes to your JSP files or the java classes they belong to cause breakage. Michiel Paul Wallace wrote: Hi, Yes..that is what I thought, but I learned from a 'reliable' source I could accomplish this on saving overhead. So rather than looking into the whys and whats, I looked into how to do it, and look into the performance benefits later. I will provide the list with my sources reasoning, when it becomes available! A thought..and to answer a question with a question (Why would you precompile jsp files?), why is jspc there? If only to increase performance on the first hit? Thanks Paul. It will increase speed on the first viewing of the jsp, but after that I can't see how there will be any difference. How much memory can you save if any? And how would that work? Thanks On Fri, 25 Jun 2004 11:12:44 +1000, Paul Wallace [EMAIL PROTECTED] wrote: In an effort to increase speed/free up memory that otherwise might be consumed by Tomcat otherwise Why would you precompile jsp files? On Fri, 25 Jun 2004 09:32:38 +1000, Paul Wallace [EMAIL PROTECTED] wrote: (sorry, wrong key!) Hi Jason, Thanks for that. Yes, it does make sense. A couple of things though, I just ran it with -compile - great. But my query about the work directory and was more towards what I am being 'encouraged' to do from the powers that be. I.e not WAR the app., but put it in the work directory. Is this ill-advised/poor practice? To accomplish this, is it as simple as dragging the compiled source under my work directory, and modifying my web.xml as advised? Why does -compile work, but not appear in the usage?! Also, can I specify a path for the compilation, rather than the classes be placed in the same dirs as the source? (I tried adding a path after the -compile switch, but it constructed and compiled a file with the same name as the class directory destination). Do I make sense?! Paul. Paul, I just use the -compile option and have jspc do the compilation from .java to .class for me. It seems to work fairly well. Once all the fully compiled (ie .class) files are placed in you applications WEB-INF/classes directory you just need to place the generated web.xml file in WEB-INF. There is an option to create a complete web.xml file that you can place in WEB-INF or, if you already have a web.xml file you want to keep, you can have jspc create an xml fragment that just contains the servlet definitions and mappings that you then add (in the appropriate place) to your existing web.xml. Then just war up you application directory in the normal way (you can even delete the jsps once your certain the servlet mappings are working). If you try to put the generated files in your working directory you won't be able to war them up and deploy them in the normal put war file under webapps directory and tomcat will expand it when it starts way. You'd have to ship a complete tomcat directory structure with the work directory already filled in with your compiled jsps. Does that make sense? Jason --- Paul Wallace [EMAIL PROTECTED] wrote: Hello, I have compiled my JSPs thus: jspc -webapp C:\src\site -d C:\src\site\classes -s -l -uriroot C:\src\site this builds the Java source files to the specified location, but how might I deploy them? What is a typical deployment after a JSP compilation? Compilation of Java source files, then WAR/JAR? Can I not define the JSP compile to go under my work directory? The purpose of my efforts is to try and speed up / make TC less memory consumptive. cheers Paul. -- Michiel Toneman Software Engineer Bibit Global Payment Services Regulierenring 10 3981 LB Bunnik [EMAIL PROTECTED] Tel. +31-30-6595168 Fax +31-30-6564464 http://www.bibit.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jspc
I seem to remember something about a known memory leak in javac 1.4 (not sure which version), which might affect you if you use javac and have many JSPs to compile - so that might be another argument for precompiling your jsps... Nick -Original Message- From: Michiel Toneman [mailto:[EMAIL PROTECTED] Sent: 25 June 2004 10:29 To: Tomcat Users List Subject: Re: jspc A good reason to precompile your JSP files is to make sure you don't accidentally have broken JSP files on production. You then know *before* deployment if any changes to your JSP files or the java classes they belong to cause breakage. Michiel Paul Wallace wrote: Hi, Yes..that is what I thought, but I learned from a 'reliable' source I could accomplish this on saving overhead. So rather than looking into the whys and whats, I looked into how to do it, and look into the performance benefits later. I will provide the list with my sources reasoning, when it becomes available! A thought..and to answer a question with a question (Why would you precompile jsp files?), why is jspc there? If only to increase performance on the first hit? Thanks Paul. It will increase speed on the first viewing of the jsp, but after that I can't see how there will be any difference. How much memory can you save if any? And how would that work? Thanks On Fri, 25 Jun 2004 11:12:44 +1000, Paul Wallace [EMAIL PROTECTED] wrote: In an effort to increase speed/free up memory that otherwise might be consumed by Tomcat otherwise Why would you precompile jsp files? On Fri, 25 Jun 2004 09:32:38 +1000, Paul Wallace [EMAIL PROTECTED] wrote: (sorry, wrong key!) Hi Jason, Thanks for that. Yes, it does make sense. A couple of things though, I just ran it with -compile - great. But my query about the work directory and was more towards what I am being 'encouraged' to do from the powers that be. I.e not WAR the app., but put it in the work directory. Is this ill-advised/poor practice? To accomplish this, is it as simple as dragging the compiled source under my work directory, and modifying my web.xml as advised? Why does -compile work, but not appear in the usage?! Also, can I specify a path for the compilation, rather than the classes be placed in the same dirs as the source? (I tried adding a path after the -compile switch, but it constructed and compiled a file with the same name as the class directory destination). Do I make sense?! Paul. Paul, I just use the -compile option and have jspc do the compilation from .java to .class for me. It seems to work fairly well. Once all the fully compiled (ie .class) files are placed in you applications WEB-INF/classes directory you just need to place the generated web.xml file in WEB-INF. There is an option to create a complete web.xml file that you can place in WEB-INF or, if you already have a web.xml file you want to keep, you can have jspc create an xml fragment that just contains the servlet definitions and mappings that you then add (in the appropriate place) to your existing web.xml. Then just war up you application directory in the normal way (you can even delete the jsps once your certain the servlet mappings are working). If you try to put the generated files in your working directory you won't be able to war them up and deploy them in the normal put war file under webapps directory and tomcat will expand it when it starts way. You'd have to ship a complete tomcat directory structure with the work directory already filled in with your compiled jsps. Does that make sense? Jason --- Paul Wallace [EMAIL PROTECTED] wrote: Hello, I have compiled my JSPs thus: jspc -webapp C:\src\site -d C:\src\site\classes -s -l -uriroot C:\src\site this builds the Java source files to the specified location, but how might I deploy them? What is a typical deployment after a JSP compilation? Compilation of Java source files, then WAR/JAR? Can I not define the JSP compile to go under my work directory? The purpose of my efforts is to try and speed up / make TC less memory consumptive. cheers Paul. -- Michiel Toneman Software Engineer Bibit Global Payment Services Regulierenring 10 3981 LB Bunnik [EMAIL PROTECTED] Tel. +31-30-6595168 Fax +31-30-6564464 http://www.bibit.com/ - 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: jspc
Hi There, The memory leak was in JDK1.4.1 and was to do with Strings and StringBuffer sharing memory for performance. Use JDK1.4.2 to ensure that this problem does not happen. Pete -Original Message- From: Nick Curry [mailto:[EMAIL PROTECTED] Sent: 25 June 2004 11:08 To: Tomcat Users List Subject: RE: jspc I seem to remember something about a known memory leak in javac 1.4 (not sure which version), which might affect you if you use javac and have many JSPs to compile - so that might be another argument for precompiling your jsps... Nick -Original Message- From: Michiel Toneman [mailto:[EMAIL PROTECTED] Sent: 25 June 2004 10:29 To: Tomcat Users List Subject: Re: jspc A good reason to precompile your JSP files is to make sure you don't accidentally have broken JSP files on production. You then know *before* deployment if any changes to your JSP files or the java classes they belong to cause breakage. Michiel Paul Wallace wrote: Hi, Yes..that is what I thought, but I learned from a 'reliable' source I could accomplish this on saving overhead. So rather than looking into the whys and whats, I looked into how to do it, and look into the performance benefits later. I will provide the list with my sources reasoning, when it becomes available! A thought..and to answer a question with a question (Why would you precompile jsp files?), why is jspc there? If only to increase performance on the first hit? Thanks Paul. It will increase speed on the first viewing of the jsp, but after that I can't see how there will be any difference. How much memory can you save if any? And how would that work? Thanks On Fri, 25 Jun 2004 11:12:44 +1000, Paul Wallace [EMAIL PROTECTED] wrote: In an effort to increase speed/free up memory that otherwise might be consumed by Tomcat otherwise Why would you precompile jsp files? On Fri, 25 Jun 2004 09:32:38 +1000, Paul Wallace [EMAIL PROTECTED] wrote: (sorry, wrong key!) Hi Jason, Thanks for that. Yes, it does make sense. A couple of things though, I just ran it with -compile - great. But my query about the work directory and was more towards what I am being 'encouraged' to do from the powers that be. I.e not WAR the app., but put it in the work directory. Is this ill-advised/poor practice? To accomplish this, is it as simple as dragging the compiled source under my work directory, and modifying my web.xml as advised? Why does -compile work, but not appear in the usage?! Also, can I specify a path for the compilation, rather than the classes be placed in the same dirs as the source? (I tried adding a path after the -compile switch, but it constructed and compiled a file with the same name as the class directory destination). Do I make sense?! Paul. Paul, I just use the -compile option and have jspc do the compilation from .java to .class for me. It seems to work fairly well. Once all the fully compiled (ie .class) files are placed in you applications WEB-INF/classes directory you just need to place the generated web.xml file in WEB-INF. There is an option to create a complete web.xml file that you can place in WEB-INF or, if you already have a web.xml file you want to keep, you can have jspc create an xml fragment that just contains the servlet definitions and mappings that you then add (in the appropriate place) to your existing web.xml. Then just war up you application directory in the normal way (you can even delete the jsps once your certain the servlet mappings are working). If you try to put the generated files in your working directory you won't be able to war them up and deploy them in the normal put war file under webapps directory and tomcat will expand it when it starts way. You'd have to ship a complete tomcat directory structure with the work directory already filled in with your compiled jsps. Does that make sense? Jason --- Paul Wallace [EMAIL PROTECTED] wrote: Hello, I have compiled my JSPs thus: jspc -webapp C:\src\site -d C:\src\site\classes -s -l -uriroot C:\src\site this builds the Java source files to the specified location, but how might I deploy them? What is a typical deployment after a JSP compilation? Compilation of Java source files, then WAR/JAR? Can I not define the JSP compile to go under my work directory? The purpose of my efforts is to try and speed up / make TC less memory consumptive. cheers Paul. -- Michiel Toneman Software Engineer Bibit Global Payment Services Regulierenring 10 3981 LB Bunnik [EMAIL PROTECTED] Tel. +31-30-6595168 Fax +31-30-6564464 http://www.bibit.com/ - 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: jspc
Hi, when I run jspc from command line ${tomcat_home}/bin/jspc.sh -s -l -uriroot ${tomcat_home}/webapps/myapp -d ${tomcat_home}/work it generates .class files according to hierarchy* of JSP files and that what I expected. When I run this And task target name=jspc depends=compile jspc srcdir=${myapp} destdir=${work} compiler=jasper41 verbose=1 include name=**/*.jsp / /jspc /target it generates .java files - and all files in the 'work' directory, JSP hierarchy is missed. Could you advice how to use Ant task for better results. I consulted Ant doc, but still have the question.. Thanks Evgeny --- Peter Guyatt [EMAIL PROTECTED] wrote: Hi There, The memory leak was in JDK1.4.1 and was to do with Strings and StringBuffer sharing memory for performance. Use JDK1.4.2 to ensure that this problem does not happen. Pete -Original Message- From: Nick Curry [mailto:[EMAIL PROTECTED] Sent: 25 June 2004 11:08 To: Tomcat Users List Subject: RE: jspc I seem to remember something about a known memory leak in javac 1.4 (not sure which version), which might affect you if you use javac and have many JSPs to compile - so that might be another argument for precompiling your jsps... Nick -Original Message- From: Michiel Toneman [mailto:[EMAIL PROTECTED] Sent: 25 June 2004 10:29 To: Tomcat Users List Subject: Re: jspc A good reason to precompile your JSP files is to make sure you don't accidentally have broken JSP files on production. You then know *before* deployment if any changes to your JSP files or the java classes they belong to cause breakage. Michiel Paul Wallace wrote: Hi, Yes..that is what I thought, but I learned from a 'reliable' source I could accomplish this on saving overhead. So rather than looking into the whys and whats, I looked into how to do it, and look into the performance benefits later. I will provide the list with my sources reasoning, when it becomes available! A thought..and to answer a question with a question (Why would you precompile jsp files?), why is jspc there? If only to increase performance on the first hit? Thanks Paul. It will increase speed on the first viewing of the jsp, but after that I can't see how there will be any difference. How much memory can you save if any? And how would that work? Thanks On Fri, 25 Jun 2004 11:12:44 +1000, Paul Wallace [EMAIL PROTECTED] wrote: In an effort to increase speed/free up memory that otherwise might be consumed by Tomcat otherwise Why would you precompile jsp files? On Fri, 25 Jun 2004 09:32:38 +1000, Paul Wallace [EMAIL PROTECTED] wrote: (sorry, wrong key!) Hi Jason, Thanks for that. Yes, it does make sense. A couple of things though, I just ran it with -compile - great. But my query about the work directory and was more towards what I am being 'encouraged' to do from the powers that be. I.e not WAR the app., but put it in the work directory. Is this ill-advised/poor practice? To accomplish this, is it as simple as dragging the compiled source under my work directory, and modifying my web.xml as advised? Why does -compile work, but not appear in the usage?! Also, can I specify a path for the compilation, rather than the classes be placed in the same dirs as the source? (I tried adding a path after the -compile switch, but it constructed and compiled a file with the same name as the class directory destination). Do I make sense?! Paul. Paul, I just use the -compile option and have jspc do the compilation from .java to .class for me. It seems to work fairly well. Once all the fully compiled (ie .class) files are placed in you applications WEB-INF/classes directory you just need to place the generated web.xml file in WEB-INF. There is an option to create a complete web.xml file that you can place in WEB-INF or, if you already have a web.xml file you want to keep, you can have jspc create an xml fragment that just contains the servlet definitions and mappings that you then add (in the appropriate place) to your existing web.xml. Then just war up you application directory in the normal way (you can even delete the jsps once your certain the servlet mappings are working). If you try to put the generated files in your working directory you won't be able to war them up and deploy them in the normal put war file under webapps directory and tomcat will expand it when it starts way. You'd have to ship a complete tomcat directory structure with the work directory already filled in with your compiled jsps. Does that make sense? Jason --- Paul Wallace [EMAIL PROTECTED] wrote: Hello, I have compiled my JSPs thus: jspc -webapp C:\src\site -d C:\src\site\classes -s -l -uriroot C:\src\site this builds the Java source files
RE: jspc
hi, not sure if this is related but Tomcat is now using Ant to compile .jsp files and there was something about a memory leak in the internal javac that Ant uses to compile. the 'fix' was to set fork = true for this Ant compilation process so that it does not corrupt Tomcat's jvm by using a separate jvm to do .jsp compiling. having said that, i believe this fork = true setting is the default that is shipped with Tomcat.. so i'm not sure if this helps you any :p --- Peter Guyatt [EMAIL PROTECTED] wrote: Hi There, The memory leak was in JDK1.4.1 and was to do with Strings and StringBuffer sharing memory for performance. Use JDK1.4.2 to ensure that this problem does not happen. Pete -Original Message- From: Nick Curry [mailto:[EMAIL PROTECTED] Sent: 25 June 2004 11:08 To: Tomcat Users List Subject: RE: jspc I seem to remember something about a known memory leak in javac 1.4 (not sure which version), which might affect you if you use javac and have many JSPs to compile - so that might be another argument for precompiling your jsps... Nick -Original Message- From: Michiel Toneman [mailto:[EMAIL PROTECTED] Sent: 25 June 2004 10:29 To: Tomcat Users List Subject: Re: jspc A good reason to precompile your JSP files is to make sure you don't accidentally have broken JSP files on production. You then know *before* deployment if any changes to your JSP files or the java classes they belong to cause breakage. Michiel Paul Wallace wrote: Hi, Yes..that is what I thought, but I learned from a 'reliable' source I could accomplish this on saving overhead. So rather than looking into the whys and whats, I looked into how to do it, and look into the performance benefits later. I will provide the list with my sources reasoning, when it becomes available! A thought..and to answer a question with a question (Why would you precompile jsp files?), why is jspc there? If only to increase performance on the first hit? Thanks Paul. It will increase speed on the first viewing of the jsp, but after that I can't see how there will be any difference. How much memory can you save if any? And how would that work? Thanks On Fri, 25 Jun 2004 11:12:44 +1000, Paul Wallace [EMAIL PROTECTED] wrote: In an effort to increase speed/free up memory that otherwise might be consumed by Tomcat otherwise Why would you precompile jsp files? On Fri, 25 Jun 2004 09:32:38 +1000, Paul Wallace [EMAIL PROTECTED] wrote: (sorry, wrong key!) Hi Jason, Thanks for that. Yes, it does make sense. A couple of things though, I just ran it with -compile - great. But my query about the work directory and was more towards what I am being 'encouraged' to do from the powers that be. I.e not WAR the app., but put it in the work directory. Is this ill-advised/poor practice? To accomplish this, is it as simple as dragging the compiled source under my work directory, and modifying my web.xml as advised? Why does -compile work, but not appear in the usage?! Also, can I specify a path for the compilation, rather than the classes be placed in the same dirs as the source? (I tried adding a path after the -compile switch, but it constructed and compiled a file with the same name as the class directory destination). Do I make sense?! Paul. Paul, I just use the -compile option and have jspc do the compilation from .java to .class for me. It seems to work fairly well. Once all the fully compiled (ie .class) files are placed in you applications WEB-INF/classes directory you just need to place the generated web.xml file in WEB-INF. There is an option to create a complete web.xml file that you can place in WEB-INF or, if you already have a web.xml file you want to keep, you can have jspc create an xml fragment that just contains the servlet definitions and mappings that you then add (in the appropriate place) to your existing web.xml. Then just war up you application directory in the normal way (you can even delete the jsps once your certain the servlet mappings are working). If you try to put the generated files in your working directory you won't be able to war them up and deploy them in the normal put war file under webapps directory and tomcat will expand it when it starts way. You'd have to ship a complete tomcat directory structure with the work directory already filled in with your compiled jsps. Does that make sense? Jason --- Paul Wallace [EMAIL PROTECTED] wrote: Hello, I have compiled my JSPs thus: jspc -webapp C:\src\site -d C:\src\site\classes -s -l -uriroot C:\src\site this builds the Java source files to the specified location, but how might I deploy them? What is a typical deployment after a JSP compilation? Compilation of Java source files, then WAR/JAR? Can I not define the JSP
RE: jspc
Hi Paul, To specify a path for your compilation results use the -d option like so: jspc.sh -compile -d /jakarta-tomcat-5.0.25/webapps myapp/WEB-INF/classes ...the rest of you compile options... It will build any subdirs required using the directory you specify, along with the package name you give it (org.apache.jsp if you don't specify a package name) as the root directory for any subdirs. As for the work directory that is where Tomcat places any jsps that it has to compile (i.e. non-precompiled jsps) during runtime. If you run Tomcat with uncompiled jsps and walk though your app in a browser you will see compiled JSPs appear in the work directory. It will create subdirs, etc. to mimic your applications directory structure and place compiled versions there. You could just place your compiled jsps in the same respective places in the work directory before starting Tomcat and it would probably work. BUT, Tomcat will only expand .war files into the webapps directory so you have no way of packaging up these compiled files from the work directory and automatically expanding them into another work directory at Tomcat startup. That would have to be a manual process by the end user (or an install script). It is not the recommended deployment strategy. It does save you from having to worry about having the web.xml mappings correct though. Tomcat will check first in the work directory for a compiled jsp and then look for an uncompiled version if it doesn't find one there. No mappings in web.xml are required. In answer to another related question I saw posted: If you precompile your JSPs and then remove the original JSPs you need to have two things for your app to run: 1. The compiled JSP class files need to be copied over to the WEB-INF/classes directory with the correct directory structure. (The exact directory with be the package name (org.apache.jsp by default) plus any subdirs the JSP existed in under you apps root folder. i.e. if under webapps/yourapp you had a jsp in a directory subdir1/subdirB then under you WEB-INF/classes directory you would need a directory called org/apache/jsp/subdir1/subdirB and you would place that compiled JSP class there. The easiest way to do this is to run your compile with the -d option as stated above and point the output to your WEB-INF/classes directory. jspc in Tomcat 5.x should automatically create the correct subdir structure and place the class file in it. 2. Yuo need servlet definitions and mappings that tell Tomcat If someone requests this .jsp execute this servlet instead. These go in the web.xml file for your app. jspc will create a complete file or just a fragment file that contains all the mappings. You can tell it explicitly to create a fragment file with the -webinc option like so: -webinc /jakarta-tomcat-5.0.25/webapps/myapp/WEB-INF/my_web_fragment.xml I think it creates a complete web.xml if you use this option -webxml /jakarta-tomcat-5.0.25/webapps/myapp/WEB-INF/my_complete_web.xml In this case you just have to rename the file web.xml and place it in you app's WEB-INF directory. If you don't do BOTH of these things, then Tomcat won't know where to look for your compiled JSPs and will instead look for the actual .jsp. Finding nothing it will throw a 404 error. I hope this is helpful. Jason --- Paul Wallace [EMAIL PROTECTED] wrote: (sorry, wrong key!) Hi Jason, Thanks for that. Yes, it does make sense. A couple of things though, I just ran it with -compile - great. But my query about the work directory and was more towards what I am being 'encouraged' to do from the powers that be. I.e not WAR the app., but put it in the work directory. Is this ill-advised/poor practice? To accomplish this, is it as simple as dragging the compiled source under my work directory, and modifying my web.xml as advised? Why does -compile work, but not appear in the usage?! Also, can I specify a path for the compilation, rather than the classes be placed in the same dirs as the source? (I tried adding a path after the -compile switch, but it constructed and compiled a file with the same name as the class directory destination). Do I make sense?! Paul. Paul, I just use the -compile option and have jspc do the compilation from .java to .class for me. It seems to work fairly well. Once all the fully compiled (ie .class) files are placed in you applications WEB-INF/classes directory you just need to place the generated web.xml file in WEB-INF. There is an option to create a complete web.xml file that you can place in WEB-INF or, if you already have a web.xml file you want to keep, you can have jspc create an xml fragment that just contains the servlet definitions and mappings that you then add (in the appropriate place) to your existing web.xml. Then just war up you application directory in the normal way (you can even delete the jsps once your certain the
Re: jspc
Paul, I just use the -compile option and have jspc do the compilation from .java to .class for me. It seems to work fairly well. Once all the fully compiled (ie .class) files are placed in you applications WEB-INF/classes directory you just need to place the generated web.xml file in WEB-INF. There is an option to create a complete web.xml file that you can place in WEB-INF or, if you already have a web.xml file you want to keep, you can have jspc create an xml fragment that just contains the servlet definitions and mappings that you then add (in the appropriate place) to your existing web.xml. Then just war up you application directory in the normal way (you can even delete the jsps once your certain the servlet mappings are working). If you try to put the generated files in your working directory you won't be able to war them up and deploy them in the normal put war file under webapps directory and tomcat will expand it when it starts way. You'd have to ship a complete tomcat directory structure with the work directory already filled in with your compiled jsps. Does that make sense? Jason --- Paul Wallace [EMAIL PROTECTED] wrote: Hello, I have compiled my JSPs thus: jspc -webapp C:\src\site -d C:\src\site\classes -s -l -uriroot C:\src\site this builds the Java source files to the specified location, but how might I deploy them? What is a typical deployment after a JSP compilation? Compilation of Java source files, then WAR/JAR? Can I not define the JSP compile to go under my work directory? The purpose of my efforts is to try and speed up / make TC less memory consumptive. cheers Paul. __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jspc
Hi Jason, Thanks for that. Yes, it does make Paul, I just use the -compile option and have jspc do the compilation from .java to .class for me. It seems to work fairly well. Once all the fully compiled (ie .class) files are placed in you applications WEB-INF/classes directory you just need to place the generated web.xml file in WEB-INF. There is an option to create a complete web.xml file that you can place in WEB-INF or, if you already have a web.xml file you want to keep, you can have jspc create an xml fragment that just contains the servlet definitions and mappings that you then add (in the appropriate place) to your existing web.xml. Then just war up you application directory in the normal way (you can even delete the jsps once your certain the servlet mappings are working). If you try to put the generated files in your working directory you won't be able to war them up and deploy them in the normal put war file under webapps directory and tomcat will expand it when it starts way. You'd have to ship a complete tomcat directory structure with the work directory already filled in with your compiled jsps. Does that make sense? Jason --- Paul Wallace [EMAIL PROTECTED] wrote: Hello, I have compiled my JSPs thus: jspc -webapp C:\src\site -d C:\src\site\classes -s -l -uriroot C:\src\site this builds the Java source files to the specified location, but how might I deploy them? What is a typical deployment after a JSP compilation? Compilation of Java source files, then WAR/JAR? Can I not define the JSP compile to go under my work directory? The purpose of my efforts is to try and speed up / make TC less memory consumptive. cheers Paul. __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail - 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: jspc
(sorry, wrong key!) Hi Jason, Thanks for that. Yes, it does make sense. A couple of things though, I just ran it with -compile - great. But my query about the work directory and was more towards what I am being 'encouraged' to do from the powers that be. I.e not WAR the app., but put it in the work directory. Is this ill-advised/poor practice? To accomplish this, is it as simple as dragging the compiled source under my work directory, and modifying my web.xml as advised? Why does -compile work, but not appear in the usage?! Also, can I specify a path for the compilation, rather than the classes be placed in the same dirs as the source? (I tried adding a path after the -compile switch, but it constructed and compiled a file with the same name as the class directory destination). Do I make sense?! Paul. Paul, I just use the -compile option and have jspc do the compilation from .java to .class for me. It seems to work fairly well. Once all the fully compiled (ie .class) files are placed in you applications WEB-INF/classes directory you just need to place the generated web.xml file in WEB-INF. There is an option to create a complete web.xml file that you can place in WEB-INF or, if you already have a web.xml file you want to keep, you can have jspc create an xml fragment that just contains the servlet definitions and mappings that you then add (in the appropriate place) to your existing web.xml. Then just war up you application directory in the normal way (you can even delete the jsps once your certain the servlet mappings are working). If you try to put the generated files in your working directory you won't be able to war them up and deploy them in the normal put war file under webapps directory and tomcat will expand it when it starts way. You'd have to ship a complete tomcat directory structure with the work directory already filled in with your compiled jsps. Does that make sense? Jason --- Paul Wallace [EMAIL PROTECTED] wrote: Hello, I have compiled my JSPs thus: jspc -webapp C:\src\site -d C:\src\site\classes -s -l -uriroot C:\src\site this builds the Java source files to the specified location, but how might I deploy them? What is a typical deployment after a JSP compilation? Compilation of Java source files, then WAR/JAR? Can I not define the JSP compile to go under my work directory? The purpose of my efforts is to try and speed up / make TC less memory consumptive. cheers Paul. __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail - 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: jspc
Why would you precompile jsp files? On Fri, 25 Jun 2004 09:32:38 +1000, Paul Wallace [EMAIL PROTECTED] wrote: (sorry, wrong key!) Hi Jason, Thanks for that. Yes, it does make sense. A couple of things though, I just ran it with -compile - great. But my query about the work directory and was more towards what I am being 'encouraged' to do from the powers that be. I.e not WAR the app., but put it in the work directory. Is this ill-advised/poor practice? To accomplish this, is it as simple as dragging the compiled source under my work directory, and modifying my web.xml as advised? Why does -compile work, but not appear in the usage?! Also, can I specify a path for the compilation, rather than the classes be placed in the same dirs as the source? (I tried adding a path after the -compile switch, but it constructed and compiled a file with the same name as the class directory destination). Do I make sense?! Paul. Paul, I just use the -compile option and have jspc do the compilation from .java to .class for me. It seems to work fairly well. Once all the fully compiled (ie .class) files are placed in you applications WEB-INF/classes directory you just need to place the generated web.xml file in WEB-INF. There is an option to create a complete web.xml file that you can place in WEB-INF or, if you already have a web.xml file you want to keep, you can have jspc create an xml fragment that just contains the servlet definitions and mappings that you then add (in the appropriate place) to your existing web.xml. Then just war up you application directory in the normal way (you can even delete the jsps once your certain the servlet mappings are working). If you try to put the generated files in your working directory you won't be able to war them up and deploy them in the normal put war file under webapps directory and tomcat will expand it when it starts way. You'd have to ship a complete tomcat directory structure with the work directory already filled in with your compiled jsps. Does that make sense? Jason --- Paul Wallace [EMAIL PROTECTED] wrote: Hello, I have compiled my JSPs thus: jspc -webapp C:\src\site -d C:\src\site\classes -s -l -uriroot C:\src\site this builds the Java source files to the specified location, but how might I deploy them? What is a typical deployment after a JSP compilation? Compilation of Java source files, then WAR/JAR? Can I not define the JSP compile to go under my work directory? The purpose of my efforts is to try and speed up / make TC less memory consumptive. cheers Paul. __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail - 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] -- They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin (1755) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jspc
In an effort to increase speed/free up memory that otherwise might be consumed by Tomcat otherwise Why would you precompile jsp files? On Fri, 25 Jun 2004 09:32:38 +1000, Paul Wallace [EMAIL PROTECTED] wrote: (sorry, wrong key!) Hi Jason, Thanks for that. Yes, it does make sense. A couple of things though, I just ran it with -compile - great. But my query about the work directory and was more towards what I am being 'encouraged' to do from the powers that be. I.e not WAR the app., but put it in the work directory. Is this ill-advised/poor practice? To accomplish this, is it as simple as dragging the compiled source under my work directory, and modifying my web.xml as advised? Why does -compile work, but not appear in the usage?! Also, can I specify a path for the compilation, rather than the classes be placed in the same dirs as the source? (I tried adding a path after the -compile switch, but it constructed and compiled a file with the same name as the class directory destination). Do I make sense?! Paul. Paul, I just use the -compile option and have jspc do the compilation from .java to .class for me. It seems to work fairly well. Once all the fully compiled (ie .class) files are placed in you applications WEB-INF/classes directory you just need to place the generated web.xml file in WEB-INF. There is an option to create a complete web.xml file that you can place in WEB-INF or, if you already have a web.xml file you want to keep, you can have jspc create an xml fragment that just contains the servlet definitions and mappings that you then add (in the appropriate place) to your existing web.xml. Then just war up you application directory in the normal way (you can even delete the jsps once your certain the servlet mappings are working). If you try to put the generated files in your working directory you won't be able to war them up and deploy them in the normal put war file under webapps directory and tomcat will expand it when it starts way. You'd have to ship a complete tomcat directory structure with the work directory already filled in with your compiled jsps. Does that make sense? Jason --- Paul Wallace [EMAIL PROTECTED] wrote: Hello, I have compiled my JSPs thus: jspc -webapp C:\src\site -d C:\src\site\classes -s -l -uriroot C:\src\site this builds the Java source files to the specified location, but how might I deploy them? What is a typical deployment after a JSP compilation? Compilation of Java source files, then WAR/JAR? Can I not define the JSP compile to go under my work directory? The purpose of my efforts is to try and speed up / make TC less memory consumptive. cheers Paul. __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail - 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] -- They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin (1755) - 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: jspc
It will increase speed on the first viewing of the jsp, but after that I can't see how there will be any difference. How much memory can you save if any? And how would that work? Thanks On Fri, 25 Jun 2004 11:12:44 +1000, Paul Wallace [EMAIL PROTECTED] wrote: In an effort to increase speed/free up memory that otherwise might be consumed by Tomcat otherwise Why would you precompile jsp files? On Fri, 25 Jun 2004 09:32:38 +1000, Paul Wallace [EMAIL PROTECTED] wrote: (sorry, wrong key!) Hi Jason, Thanks for that. Yes, it does make sense. A couple of things though, I just ran it with -compile - great. But my query about the work directory and was more towards what I am being 'encouraged' to do from the powers that be. I.e not WAR the app., but put it in the work directory. Is this ill-advised/poor practice? To accomplish this, is it as simple as dragging the compiled source under my work directory, and modifying my web.xml as advised? Why does -compile work, but not appear in the usage?! Also, can I specify a path for the compilation, rather than the classes be placed in the same dirs as the source? (I tried adding a path after the -compile switch, but it constructed and compiled a file with the same name as the class directory destination). Do I make sense?! Paul. Paul, I just use the -compile option and have jspc do the compilation from .java to .class for me. It seems to work fairly well. Once all the fully compiled (ie .class) files are placed in you applications WEB-INF/classes directory you just need to place the generated web.xml file in WEB-INF. There is an option to create a complete web.xml file that you can place in WEB-INF or, if you already have a web.xml file you want to keep, you can have jspc create an xml fragment that just contains the servlet definitions and mappings that you then add (in the appropriate place) to your existing web.xml. Then just war up you application directory in the normal way (you can even delete the jsps once your certain the servlet mappings are working). If you try to put the generated files in your working directory you won't be able to war them up and deploy them in the normal put war file under webapps directory and tomcat will expand it when it starts way. You'd have to ship a complete tomcat directory structure with the work directory already filled in with your compiled jsps. Does that make sense? Jason --- Paul Wallace [EMAIL PROTECTED] wrote: Hello, I have compiled my JSPs thus: jspc -webapp C:\src\site -d C:\src\site\classes -s -l -uriroot C:\src\site this builds the Java source files to the specified location, but how might I deploy them? What is a typical deployment after a JSP compilation? Compilation of Java source files, then WAR/JAR? Can I not define the JSP compile to go under my work directory? The purpose of my efforts is to try and speed up / make TC less memory consumptive. cheers Paul. __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail - 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] -- They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin (1755) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jspc
Hi, Yes..that is what I thought, but I learned from a 'reliable' source I could accomplish this on saving overhead. So rather than looking into the whys and whats, I looked into how to do it, and look into the performance benefits later. I will provide the list with my sources reasoning, when it becomes available! A thought..and to answer a question with a question (Why would you precompile jsp files?), why is jspc there? If only to increase performance on the first hit? Thanks Paul. It will increase speed on the first viewing of the jsp, but after that I can't see how there will be any difference. How much memory can you save if any? And how would that work? Thanks On Fri, 25 Jun 2004 11:12:44 +1000, Paul Wallace [EMAIL PROTECTED] wrote: In an effort to increase speed/free up memory that otherwise might be consumed by Tomcat otherwise Why would you precompile jsp files? On Fri, 25 Jun 2004 09:32:38 +1000, Paul Wallace [EMAIL PROTECTED] wrote: (sorry, wrong key!) Hi Jason, Thanks for that. Yes, it does make sense. A couple of things though, I just ran it with -compile - great. But my query about the work directory and was more towards what I am being 'encouraged' to do from the powers that be. I.e not WAR the app., but put it in the work directory. Is this ill-advised/poor practice? To accomplish this, is it as simple as dragging the compiled source under my work directory, and modifying my web.xml as advised? Why does -compile work, but not appear in the usage?! Also, can I specify a path for the compilation, rather than the classes be placed in the same dirs as the source? (I tried adding a path after the -compile switch, but it constructed and compiled a file with the same name as the class directory destination). Do I make sense?! Paul. Paul, I just use the -compile option and have jspc do the compilation from .java to .class for me. It seems to work fairly well. Once all the fully compiled (ie .class) files are placed in you applications WEB-INF/classes directory you just need to place the generated web.xml file in WEB-INF. There is an option to create a complete web.xml file that you can place in WEB-INF or, if you already have a web.xml file you want to keep, you can have jspc create an xml fragment that just contains the servlet definitions and mappings that you then add (in the appropriate place) to your existing web.xml. Then just war up you application directory in the normal way (you can even delete the jsps once your certain the servlet mappings are working). If you try to put the generated files in your working directory you won't be able to war them up and deploy them in the normal put war file under webapps directory and tomcat will expand it when it starts way. You'd have to ship a complete tomcat directory structure with the work directory already filled in with your compiled jsps. Does that make sense? Jason --- Paul Wallace [EMAIL PROTECTED] wrote: Hello, I have compiled my JSPs thus: jspc -webapp C:\src\site -d C:\src\site\classes -s -l -uriroot C:\src\site this builds the Java source files to the specified location, but how might I deploy them? What is a typical deployment after a JSP compilation? Compilation of Java source files, then WAR/JAR? Can I not define the JSP compile to go under my work directory? The purpose of my efforts is to try and speed up / make TC less memory consumptive. cheers Paul. __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail - 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] -- They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin (1755) - 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: jspc
There are a number of compelling reasons that pre-compiling JSPs are a good idea. Among the short list are: (+) Safety: If you precompile a JSP, you *know* before putting it in production that it will compile without problems. Why do we compile .java files into .class files before releasing a product? Because we want to make as sure as we can that the application will run as intended. (+) Source Code Privacy: Likewise, would your company release non-compiled source code for others to see? Why would you release uncompiled jsp source code for the world to see? (+) Speed: The first time a jsp is accessed, it must be compiled. Obviously, this delay degrades the user experience. (+) Security: Setting up your JVM to allow both execute and write access is a potential security hole. (+) Resource Usage: There is inherent overhead caused by the process of translating a jsp request to a servlet request (which all jsp requests become). To see this, look at a stack trace for a request that came through a JSP, then compare that to one from a Servlet. If you can avoid the overhead, why not? (+) Pre-compiling is a Deployment-time activity: Pre compiling doesn't affect developers -- it happens only at deployment time. Unless you change JSPs frequently (which won't happen is a best-practice production environment), there is no penalty to be paid by pre-compiling. If you care about these issues, pre-compile your JSPs. If you don't care, don't spend the 30 minutes it takes to figure it out. :) justin At 06:38 PM 6/24/2004, you wrote: Hi, Yes..that is what I thought, but I learned from a 'reliable' source I could accomplish this on saving overhead. So rather than looking into the whys and whats, I looked into how to do it, and look into the performance benefits later. I will provide the list with my sources reasoning, when it becomes available! A thought..and to answer a question with a question (Why would you precompile jsp files?), why is jspc there? If only to increase performance on the first hit? Thanks Paul. It will increase speed on the first viewing of the jsp, but after that I can't see how there will be any difference. How much memory can you save if any? And how would that work? Thanks On Fri, 25 Jun 2004 11:12:44 +1000, Paul Wallace [EMAIL PROTECTED] wrote: In an effort to increase speed/free up memory that otherwise might be consumed by Tomcat otherwise Why would you precompile jsp files? On Fri, 25 Jun 2004 09:32:38 +1000, Paul Wallace [EMAIL PROTECTED] wrote: (sorry, wrong key!) Hi Jason, Thanks for that. Yes, it does make sense. A couple of things though, I just ran it with -compile - great. But my query about the work directory and was more towards what I am being 'encouraged' to do from the powers that be. I.e not WAR the app., but put it in the work directory. Is this ill-advised/poor practice? To accomplish this, is it as simple as dragging the compiled source under my work directory, and modifying my web.xml as advised? Why does -compile work, but not appear in the usage?! Also, can I specify a path for the compilation, rather than the classes be placed in the same dirs as the source? (I tried adding a path after the -compile switch, but it constructed and compiled a file with the same name as the class directory destination). Do I make sense?! Paul. Paul, I just use the -compile option and have jspc do the compilation from .java to .class for me. It seems to work fairly well. Once all the fully compiled (ie .class) files are placed in you applications WEB-INF/classes directory you just need to place the generated web.xml file in WEB-INF. There is an option to create a complete web.xml file that you can place in WEB-INF or, if you already have a web.xml file you want to keep, you can have jspc create an xml fragment that just contains the servlet definitions and mappings that you then add (in the appropriate place) to your existing web.xml. Then just war up you application directory in the normal way (you can even delete the jsps once your certain the servlet mappings are working). If you try to put the generated files in your working directory you won't be able to war them up and deploy them in the normal put war file under webapps directory and tomcat will expand it when it starts way. You'd have to ship a complete tomcat directory structure with the work directory already filled in with your compiled jsps. Does that make sense? Jason --- Paul Wallace [EMAIL PROTECTED] wrote: Hello, I have compiled my JSPs thus: jspc -webapp C:\src\site -d C:\src\site\classes -s -l -uriroot C:\src\site this builds the Java source files to the specified location, but how might I deploy them? What is a typical deployment after a JSP compilation? Compilation of Java source files, then WAR/JAR? Can I not define the JSP compile to go under my work directory? The purpose of my efforts is to
Re: JspC compile error output - where's it go?
Here's an update: I ran this by hand on a command line without -verbose for java but with the option -Dorg.apache.commons.logging.simplelog.defaultlog=debug for JspC and this is all I got for output: 2004/06/04 14:38:16:043 PDT [INFO] JspC - -uriRoot implicitly set to /QIBM/UserData/jakarta-tomcat-5.0.19/webapps/plns 2004/06/04 14:38:17:811 PDT [DEBUG] JspRuntimeContext - -Parent class loader is: [EMAIL PROTECTED] 2004/06/04 14:38:22:641 PDT [INFO] JspC - -Built File: /RecordJSPs/DONW/QMNUSRC/PWRLOCK/PWRLOCK.jsp The PWRLOCK.jsp.xml fragment was created but no PWRLOCK .java file appears. This seems quite odd since the above messages seem to indcate that everything went fine. Is this a bug in the JspC compiler for 5.0.19? Jason --- Jason Palmatier [EMAIL PROTECTED] wrote: Does anyone know how to get jspc to display compile errors it encounters when compiling a jsp to a .java file? I haven't been able to get it to work with 4.1.18 or 5.0.19. I've looked through the source code for JspC and it seems like it should be throwing JasperExceptions if it encounters an error but I get nothing. No .java file and no errors. I'm calling jspc.sh which calls jasper.sh which then invokes the org.apache.jasper.JspC class with the appropriate parameters. Here's an example of the command jasper.sh submits (echo-ed right before it is submitted from jasper.sh, with some classpath trimming for easier reading): /QIBM/ProdData/Java400/jdk13/bin/java -verbose -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog -Dorg.apache.commons.logging.simplelog.defaultlog=info -Dorg.apache.commons.logging.simplelog.showdatetime=true -Djava.endorsed.dirs=/qibm/userdata/jakarta-tomcat-5.0.19/bin:/qibm/userdata/jakarta-tomcat-5.0.19/common/endorsed -classpath /QIBM/ProdData/Java400/jdk13/lib/tools.jar:/qibm/userdata/jakarta-tomcat-5.0.19/common/endorsed/xercesImpl.jar: ... a giant classpath here ... /qibm/userdata/jakarta-tomcat-5.0.19/webapps/plns/WEB-INF/lib/commons-lang.jar -Djasper.home=/qibm/userdata/jakarta-tomcat-5.0.19 org.apache.jasper.JspC jspc -l -v -d /qibm/userdata/jakarta-tomcat-5.0.19/webapps/plns -p com.powertech.plns.RecordJSPs.DONW.QMNUSRC.PWRLOCK -webinc /qibm/userdata/jakarta-tomcat-5.0.19/webapps/plns/RecordJSPs/DONW/QMNUSRC/PWRLOCK/PWRLOCK.jsp.xml /qibm/userdata/jakarta-tomcat-5.0.19/webapps/plns/RecordJSPs/DONW/QMNUSRC/PWRLOCK/PWRLOCK.jsp This produces no useful output even though it fails to create a .java file. I am at my wits end. Jason __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSPC compiler breaks tag library calls in JSP?
This is my own stupid fault .. the taglib was not included in the file in question and no error was presented by JasperC for me to pick this up. Cheers, ADC -Original Message- From: Allistair Crossley Sent: 10 April 2004 13:31 To: [EMAIL PROTECTED] Subject: JSPC compiler breaks tag library calls in JSP? Hi Guys I have just compiled my application with the JSPC build file for Tomcat 5. I have noticed that all my custom tag calls in the JSPs have been spat out as is without being interpreted. So is JSPC only usable when no custom tags are included? This will be unfortunate as I will not be able to pre-compile for production launch! :( Cheers ADC FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a 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]
Autoreply: RE: JSPC compiler breaks tag library calls in JSP?
Hello, Due to the increased volume of SPAM this mailbox has been closed. Please contact us via http://www.directxtras.com/ContactUS.asp We apology for the inconvenience. Best Regards, -- The DirectXtras Team - DirectXtras - Xtra Power for Director and Authorware - http://www.directxtras.com Sites with something to say - http://www.SpeaksForItself.com - Your message reads: Received: from mail.apache.org (unverified [208.185.179.12]) by mail2.intermedia.net (Rockliffe SMTPRA 4.5.6) with SMTP id [EMAIL PROTECTED] for [EMAIL PROTECTED]; Sat, 10 Apr 2004 05:39:44 -0700 Received: (qmail 31253 invoked by uid 500); 10 Apr 2004 12:39:27 - Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Precedence: bulk List-Unsubscribe: mailto:[EMAIL PROTECTED] List-Subscribe: mailto:[EMAIL PROTECTED] List-Help: mailto:[EMAIL PROTECTED] List-Post: mailto:[EMAIL PROTECTED] List-Id: Tomcat Users List tomcat-user.jakarta.apache.org Reply-To: Tomcat Users List [EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Received: (qmail 31225 invoked from network); 10 Apr 2004 12:39:27 - Received: from unknown (HELO mail1.qas.com) (195.172.82.5) by daedalus.apache.org with SMTP; 10 Apr 2004 12:39:27 - Received: from orion.qas.com (orion.qas.com [150.150.100.34]) by mail1.qas.com (Content Technologies SMTPRS 4.3.12) with ESMTP id [EMAIL PROTECTED] for [EMAIL PROTECTED]; Sat, 10 Apr 2004 13:39:25 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: RE: JSPC compiler breaks tag library calls in JSP? Date: Sat, 10 Apr 2004 13:39:25 +0100 Message-ID: [EMAIL PROTECTED] X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: JSPC compiler breaks tag library calls in JSP? Thread-Index: AcQe97GzHNFi+px4T5SuzxApUwIh9wAARFTQ From: Allistair Crossley [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This is my own stupid fault .. the taglib was not included in the file = in question and no error was presented by JasperC for me to pick this = up. Cheers, ADC -Original Message- From: Allistair Crossley=20 Sent: 10 April 2004 13:31 To: [EMAIL PROTECTED] Subject: JSPC compiler breaks tag library calls in JSP? Hi Guys I have just compiled my application with the JSPC build file for Tomcat = 5. I have noticed that all my custom tag calls in the JSPs have been = spat out as is without being interpreted.=20 So is JSPC only usable when no custom tags are included? This will be = unfortunate as I will not be able to pre-compile for production launch! = :( Cheers ADC FONT SIZE=3D1 FACE=3DVERDANA,ARIAL COLOR=3DBLUE=20 --- QAS Ltd. Developers of QuickAddress Software a href=3Dhttp://www.qas.com;www.qas.com/a 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSPC not finding servlet files
On Thu, Apr 08, 2004 at 04:27:50PM +0100, Allistair Crossley wrote: : Last night I used the JSPC ant build to precompile all my JSPs. This created a : SRC folder under my WEB-INF and a file called generated_web.xml but no : classes? Therefore when I placed the web.xml entries and restarted and tried : to run my apps lots of servlet not found exceptions occured. I noted in the : build.xml that the classes should be compiled into WEB-INF/classes but they : were not??? evern though the build said successful after compiling 94 : classes...there was however 1 class that did not compile ... would this have : caused NO classes to be compiled and saved or did they go somewhere else? Which version of Tomcat? What's in your build.xml?? By JSPC, do you mean org.apache.jasper.JspC aka jasper2 in most docs? This class produces the raw Java sources from the JSP files. After that, you still have to call javac to compile the sources. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JspC problem
I don't claim to be an Ant master but from first look, Ant appears doing exactly what you have told it to do. You may want to look at the jspC task documentation in the Ant manual. Additionally, I believe destdir attribute is required, even if you specify uribase attribute. See: http://ant.apache.org/manual/OptionalTasks/jspc.html --- Massimo Ferrari [EMAIL PROTECTED] wrote: Hello, I'm trying to precompile my jsps with the JspC ant task. The problem ist that jspc ignores my jsps directory structure when it generates the servlet files: the files are flattened. taskdef classname=org.apache.jasper.JspC name=jasper2 classpathref=jspc.classpath /taskdef jasper2 package=jsps validateXml=false uriroot=${app.home}/web webXmlFragment=${app.home}/generated_web.xml outputDir=${app.home}/jsps / All the jsps are generated to ${app.home}/jsps. Jsps with the same name but originally in different folders are overwritten. Thank you for any help! Massimo __ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSPC under Tomcat5.0.18
Hi. Can you show us your ant jspc task? [EMAIL PROTECTED] 01/26/03 03:46AM Dear list members , Recently I've decided to redeploy some of my projects with Tomcat5.0.18. Part of my projects are precomplied JSP files which were compiled using JSPC that came with Tomcat4.1.29. To my surprise those classes were not able to run properly with Tomcat5, while deploying JSP files without precompiling worked alright. The next step was to recompile JSP files allover using JSPC shipped with Tomcat5 and so I did using the Latest ANT release 1.6.0. ANT failed to complie the files with the following reason : Buildfile: build.xml jspc: [jspc] Compiling 21 source files/var/tomcat5/webapps/System/src/jsp/org/apache/jsp [jasperc] error:org.apache.jasper.JasperException: Unrecognized option: -v9. Use -help for help. [jasperc] at org.apache.jasper.JspC.setArgs(JspC.java:307) [jasperc] at org.apache.jasper.JspC.main(JspC.java:231) Can anyone tell me what is the issue here ? Why it is not backwards compatible ? How can I precompile the JSP files for Tomcat 5 ? Thanks in advance. Regards , Dima Gutzeit. - MailVision LTD. RD Team. Phone: 972-4-8500505 ext. 14 Fax: 972 - 4 - 8508000 http://www.mailvision.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSPC under Tomcat5.0.18
property name=tomcat.homevalue=D:\Tomcat5/ property name=tomcat.commonvalue=D:\Tomcat5\common\lib/ property name=tomcat.binvalue=D:\Tomcat5\bin/ !-- JSPC: pre-compile JSPs -- target name=jspc jspc srcdir=. destdir=${build.home}/src/jsp package=org.apache.jsp webinc=jsp.xml classpath fileset dir=${lib} include name=*.jar/ /fileset fileset dir=${tomcat.common} include name=*.jar/ /fileset fileset dir=${tomcat.bin} include name=*.jar/ /fileset /classpath /jspc /target - Original Message - From: Ian Joyce [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 26, 2004 4:20 PM Subject: Re: JSPC under Tomcat5.0.18 Hi. Can you show us your ant jspc task? [EMAIL PROTECTED] 01/26/03 03:46AM Dear list members , Recently I've decided to redeploy some of my projects with Tomcat5.0.18. Part of my projects are precomplied JSP files which were compiled using JSPC that came with Tomcat4.1.29. To my surprise those classes were not able to run properly with Tomcat5, while deploying JSP files without precompiling worked alright. The next step was to recompile JSP files allover using JSPC shipped with Tomcat5 and so I did using the Latest ANT release 1.6.0. ANT failed to complie the files with the following reason : Buildfile: build.xml jspc: [jspc] Compiling 21 source files/var/tomcat5/webapps/System/src/jsp/org/apache/jsp [jasperc] error:org.apache.jasper.JasperException: Unrecognized option: -v9. Use -help for help. [jasperc] at org.apache.jasper.JspC.setArgs(JspC.java:307) [jasperc] at org.apache.jasper.JspC.main(JspC.java:231) Can anyone tell me what is the issue here ? Why it is not backwards compatible ? How can I precompile the JSP files for Tomcat 5 ? Thanks in advance. Regards , Dima Gutzeit. - MailVision LTD. RD Team. Phone: 972-4-8500505 ext. 14 Fax: 972 - 4 - 8508000 http://www.mailvision.com - 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: JSPC under Tomcat5.0.18
Ian Joyce wrote: Hi. Can you show us your ant jspc task? [EMAIL PROTECTED] 01/26/03 03:46AM Dear list members , Recently I've decided to redeploy some of my projects with Tomcat5.0.18. Part of my projects are precomplied JSP files which were compiled using JSPC that came with Tomcat4.1.29. To my surprise those classes were not able to run properly with Tomcat5, while deploying JSP files without precompiling worked alright. The next step was to recompile JSP files allover using JSPC shipped with Tomcat5 and so I did using the Latest ANT release 1.6.0. ANT failed to complie the files with the following reason : Buildfile: build.xml jspc: [jspc] Compiling 21 source files/var/tomcat5/webapps/System/src/jsp/org/apache/jsp [jasperc] error:org.apache.jasper.JasperException: Unrecognized option: -v9. Use -help for help. [jasperc] at org.apache.jasper.JspC.setArgs(JspC.java:307) [jasperc] at org.apache.jasper.JspC.main(JspC.java:231) Can anyone tell me what is the issue here ? Why it is not backwards compatible ? How can I precompile the JSP files for Tomcat 5 ? Thanks in advance. The task provided with Ant is not up to date. Look in the Jasper docs for how to use the task should be used. -- x Rémy Maucherat Senior Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSPC under Tomcat5.0.18
- Original Message - From: Remy Maucherat [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, January 26, 2004 6:00 PM Subject: Re: JSPC under Tomcat5.0.18 Ian Joyce wrote: Hi. Can you show us your ant jspc task? [EMAIL PROTECTED] 01/26/03 03:46AM Dear list members , Recently I've decided to redeploy some of my projects with Tomcat5.0.18. Part of my projects are precomplied JSP files which were compiled using JSPC that came with Tomcat4.1.29. To my surprise those classes were not able to run properly with Tomcat5, while deploying JSP files without precompiling worked alright. The next step was to recompile JSP files allover using JSPC shipped with Tomcat5 and so I did using the Latest ANT release 1.6.0. ANT failed to complie the files with the following reason : Buildfile: build.xml jspc: [jspc] Compiling 21 source files/var/tomcat5/webapps/System/src/jsp/org/apache/jsp [jasperc] error:org.apache.jasper.JasperException: Unrecognized option: -v9. Use -help for help. [jasperc] at org.apache.jasper.JspC.setArgs(JspC.java:307) [jasperc] at org.apache.jasper.JspC.main(JspC.java:231) Can anyone tell me what is the issue here ? Why it is not backwards compatible ? How can I precompile the JSP files for Tomcat 5 ? Thanks in advance. The task provided with Ant is not up to date. Look in the Jasper docs for how to use the task should be used. Thank you very much , it did compile it with the new definition. But the compilation is raising another question: The compiled class file names are wierd, f.e. : sys_005ffooter_jsp.class . Where the 005f string came from ? I believe that the _ is causing it. How can I prevent the JSPC from adding there chars ? -- x Rémy Maucherat Senior Developer Consultant JBoss Group (Europe) SàRL x - 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: jspc ant task and merge web.xml
Hi Arnaud, You might be interested in this. http://www.fwd.at/tomcat/buildmanagement-using-ant-howto.html (look at the build.xml which is available as a link inside the html file, you find the merge-descriptors task there). Johannes Elisabeth Rotbach [EMAIL PROTECTED] 03.07.2003 19:10 Please respond to Tomcat Users List [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject Re: jspc ant task and merge web.xml To merge several xml, I use : xmltask from http://www.oopsconsultancy.com. EJL Toulouse From: BOULAY Arnaud [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: jspc ant task and merge web.xml Date: Thu, 03 Jul 2003 16:33:30 +0200 Hi ! I want to do an automatic merge of newweb.xml file generated with jspc task with an existing web.xml. Thanks in advance. Regards, Arnaud - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Messenger 6 http://g.msn.fr/FR1001/866 : dialoguez en son et en image avec vos amis. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jspc ant task and merge web.xml
To merge several xml, I use : xmltask from http://www.oopsconsultancy.com. EJL Toulouse From: BOULAY Arnaud [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: jspc ant task and merge web.xml Date: Thu, 03 Jul 2003 16:33:30 +0200 Hi ! I want to do an automatic merge of newweb.xml file generated with jspc task with an existing web.xml. Thanks in advance. Regards, Arnaud - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Messenger 6 http://g.msn.fr/FR1001/866 : dialoguez en son et en image avec vos amis. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jspc ant task and merge web.xml
You could also use the style task to do this. == START EXAMPLE == == build.xml == xmlcatalog id=commondtds dtd publicId=-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN location=${src}/conf/web-app_2_3.dtd/ /xmlcatalog target name=jspc .. your jspc calls here should output the web.xml file to a file called webjspc.xml / !-- Build the new web.xml file with the servlet mappings created from the jspc script -- style in=${src}/config/web.xml out=${build}/web.xml style=${src}/config/webmerge.xsl param name=includeFile expression=${src}/config/webinc.xml/ xmlcatalog refid=commondtds/ /style /target == webmerge.xsl == ?xml version=1.0? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:output method=xml indent=yes encoding=ISO-8859-1 doctype-public=-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN doctype-system=http://java.sun.com/dtd/web-app_2_3.dtd/ xsl:param name=includeFile/ !-- get the required elements of web-app, in their defined order, according to the DTD. -- xsl:template match=/web-app web-app xsl:apply-templates select=icon/ xsl:apply-templates select=display-name/ xsl:apply-templates select=description/ xsl:apply-templates select=distributable/ xsl:apply-templates select=context-param/ xsl:apply-templates select=filter/ xsl:apply-templates select=filter-mapping/ xsl:apply-templates select=listener/ xsl:apply-templates select=servlet/ xsl:copy-of select=document($includeFile)/web-app/servlet/ xsl:apply-templates select=servlet-mapping/ xsl:copy-of select=document($includeFile)/web-app/servlet-mapping/ xsl:apply-templates select=session-config/ xsl:apply-templates select=mime-mapping/ xsl:apply-templates select=welcome-file-list/ xsl:apply-templates select=error-page/ xsl:apply-templates select=taglib/ xsl:apply-templates select=resource-env-ref/ xsl:apply-templates select=resource-ref/ xsl:apply-templates select=security-constraint/ xsl:apply-templates select=login-config/ xsl:apply-templates select=security-role/ xsl:apply-templates select=env-entry/ xsl:apply-templates select=ejb-ref/ xsl:apply-templates select=ejb-local-ref/ /web-app /xsl:template xsl:template match=* xsl:for-each select=@* xsl:attribute name={.} xsl:value-of select=./ /xsl:attribute /xsl:for-each xsl:copy-of select=./ /xsl:template /xsl:stylesheet == webinc.xml == ?xml version=1.0? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; [ !ENTITY webinc PUBLIC webinc file:../build/webjspc.xml ] web-app webinc; /web-app == END EXAMPLE == - Original Message - From: Elisabeth Rotbach [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 03, 2003 10:10 AM Subject: Re: jspc ant task and merge web.xml To merge several xml, I use : xmltask from http://www.oopsconsultancy.com. EJL Toulouse From: BOULAY Arnaud [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: jspc ant task and merge web.xml Date: Thu, 03 Jul 2003 16:33:30 +0200 Hi ! I want to do an automatic merge of newweb.xml file generated with jspc task with an existing web.xml. Thanks in advance. Regards, Arnaud - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Messenger 6 http://g.msn.fr/FR1001/866 : dialoguez en son et en image avec vos amis. - 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: JSPC for TOMCAT 4.124 generates unexpected internal error
Normal behavior. You need to change web-inf to WEB-INF. -Original Message- From: Dufresne, Marc [mailto:[EMAIL PROTECTED] I'm doing a simple test to compile the checkbox JSP from the TOMCAT examples with the -webinc switch The JAVA and XML files are properly generates but jasper complains (unexpectedly ) that the web.xml file is no found here is the output fragment: 2003-04-04 04:21:34 - uriRoot implicitly set to /dsa1/apache/jakarta/tomcat/web apps/examples 2003-04-04 04:21:34 - Internal Error: File /WEB-INF/web.xml not found Check the web.xml file is really there: bash$ pwd /dsa1/apache/jakarta/tomcat/webapps/examples/web-inf bash$ ls classes jsp web.xml bash$ OK, spurious or normal behaviour ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSPC for TOMCAT 4.124 generates unexpected internal error
the lower case is an artefact of GNV (BASH shell for OpenVMS) The actuall directory name *IS* in caps when watching JSPC do it's file search up the tree, it does in fact find the directory porperly. next? Marc Dufresne OpenVMS Ambassador Pre-Sales Large Accounts HP France ( : + 33.1.5762.5413 e-mail : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 6:26 PM To: Tomcat Users List Subject: RE: JSPC for TOMCAT 4.124 generates unexpected internal error Normal behavior. You need to change web-inf to WEB-INF. -Original Message- From: Dufresne, Marc [mailto:[EMAIL PROTECTED] I'm doing a simple test to compile the checkbox JSP from the TOMCAT examples with the -webinc switch The JAVA and XML files are properly generates but jasper complains (unexpectedly ) that the web.xml file is no found here is the output fragment: 2003-04-04 04:21:34 - uriRoot implicitly set to /dsa1/apache/jakarta/tomcat/web apps/examples 2003-04-04 04:21:34 - Internal Error: File /WEB-INF/web.xml not found Check the web.xml file is really there: bash$ pwd /dsa1/apache/jakarta/tomcat/webapps/examples/web-inf bash$ ls classes jsp web.xml bash$ OK, spurious or normal behaviour ? - 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: JSPC for TOMCAT 4.124 generates unexpected internal error
Ok, well, one technique you might use to diagnose what's happening here is to use some tool for monitoring I/O operations, like truss on Solaris, or FileMon on Windows. You can search for references to that file name, and it will tell you what directories it is looking in. Hopefully that will give you a clue to why it's not finding it in the directory you expect. -Original Message- From: Dufresne, Marc [mailto:[EMAIL PROTECTED] the lower case is an artefact of GNV (BASH shell for OpenVMS) The actuall directory name *IS* in caps when watching JSPC do it's file search up the tree, it does in fact find the directory porperly. next? -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Normal behavior. You need to change web-inf to WEB-INF. -Original Message- From: Dufresne, Marc [mailto:[EMAIL PROTECTED] I'm doing a simple test to compile the checkbox JSP from the TOMCAT examples with the -webinc switch The JAVA and XML files are properly generates but jasper complains (unexpectedly ) that the web.xml file is no found here is the output fragment: 2003-04-04 04:21:34 - uriRoot implicitly set to /dsa1/apache/jakarta/tomcat/web apps/examples 2003-04-04 04:21:34 - Internal Error: File /WEB-INF/web.xml not found Check the web.xml file is really there: bash$ pwd /dsa1/apache/jakarta/tomcat/webapps/examples/web-inf bash$ ls classes jsp web.xml bash$ OK, spurious or normal behaviour ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSPC for TOMCAT 4.124 generates unexpected internal error
Well, I've got just that. VMS will track every file accessed from JAVA (called file mapping). When set, I can see that JSPC first looks at descendant, then ascendant directories, until it reaches /examples. It probes /WEB-INF, then goes on... The fact that JSPC sets the default uriroot to ../examples, confirms it found the WEB-INF directory. the web.xml file is there: $dir DSA1:APACHE.JAKARTA.TOMCAT.webapps.examples.WEB-INF Directory DSA1:APACHE.JAKARTA.TOMCAT.webapps.examples.WEB-INF classes.DIR;1 jsp.DIR;1 web.xml;1 And, when run with -uriroot explicitely defined eg jspc -v4 -webinc check.xml -uriroot /dsa1/apache/jakarta/tomcat/webapps/examples -webapp . JSPC runs just fine: 2003-04-04 09:01:21 - Class name is: checkresult 2003-04-04 09:01:21 - Java file name is: /dsa1/apache/jakarta/tomcat/webapps/examples/jsp/checkbox/checkresult.java 2003-04-04 09:01:22 - Accepted org.apache.jasper.compiler.Parser$Declaration at /jsp/checkbox/checkresult.jsp(8,0) 2003-04-04 09:01:22 - Accepted org.apache.jasper.compiler.Parser$Bean at /jsp/ch eckbox/checkresult.jsp(9,0) 2003-04-04 09:01:22 - Accepted org.apache.jasper.compiler.Parser$SetProperty at /jsp/checkbox/checkresult.jsp(11,0) ... ...etc directory listing after jspc: Directory DSA1:APACHE.JAKARTA.TOMCAT.webapps.examples.jsp.checkbox check.html;1check.xml;1 checkresult.java;1 checkresult.jsp;1 CheckTest.html;1cresult.html;1 so the plot thickens... This appears to be linked to the -uriroot switch processing next? Marc Dufresne OpenVMS Ambassador Pre-Sales Large Accounts HP France ( : + 33.1.5762.5413 e-mail : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 8:30 PM To: Tomcat Users List Subject: RE: JSPC for TOMCAT 4.124 generates unexpected internal error Ok, well, one technique you might use to diagnose what's happening here is to use some tool for monitoring I/O operations, like truss on Solaris, or FileMon on Windows. You can search for references to that file name, and it will tell you what directories it is looking in. Hopefully that will give you a clue to why it's not finding it in the directory you expect. -Original Message- From: Dufresne, Marc [mailto:[EMAIL PROTECTED] the lower case is an artefact of GNV (BASH shell for OpenVMS) The actuall directory name *IS* in caps when watching JSPC do it's file search up the tree, it does in fact find the directory porperly. next? -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Normal behavior. You need to change web-inf to WEB-INF. -Original Message- From: Dufresne, Marc [mailto:[EMAIL PROTECTED] I'm doing a simple test to compile the checkbox JSP from the TOMCAT examples with the -webinc switch The JAVA and XML files are properly generates but jasper complains (unexpectedly ) that the web.xml file is no found here is the output fragment: 2003-04-04 04:21:34 - uriRoot implicitly set to /dsa1/apache/jakarta/tomcat/web apps/examples 2003-04-04 04:21:34 - Internal Error: File /WEB-INF/web.xml not found Check the web.xml file is really there: bash$ pwd /dsa1/apache/jakarta/tomcat/webapps/examples/web-inf bash$ ls classes jsp web.xml bash$ OK, spurious or normal behaviour ? - 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: jspc and index.jsp
If not mistaken, Files that you set under welcome-file-list must be physically exist. else, you need to type http://localhost:8080/your-webapp/index.jsp as this is what we set in servlet-mapping servlet-mapping servlet-nameindex/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping another workaround would be create a dummy index.html file that has the below code meta http-equiv=refresh content=0; url=index.jsp - Original Message - From: Matthew Oatham [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 6:15 PM Subject: jspc and index.jsp Hi, I have managed to pre-compile my jsp's down to class files and put them in web-inf/classes. I have this entry in web.xml welcome-file-list welcome-fileindex.jsp/welcome-file welcome-fileindex.htm/welcome-file welcome-fileindex.html/welcome-file /welcome-file-list I have the servlet WEB-INF/classes/index.class I have the mapping: servlet servlet-nameindex/servlet-name servlet-classindex/servlet-class /servlet servlet-mapping servlet-nameindex/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping when I hit my application instead of seeing the contents of index.jsp I get a directory listing of the location where index.jsp should be but isn't because it is now a class in web-inf/classes. Any ideas? Thanks. Matt. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jspc and index.jsp
Arrrgg! Also when I have .. frame name=topFrame scrolling=0 src=jsp/index.jsp NORESIZE With the mapping servlet servlet-namejsp.index/servlet-name servlet-classjsp.index/servlet-class /servlet servlet-mapping servlet-namejsp.index/servlet-name url-patternjsp/index.jsp/url-pattern /servlet-mapping I don't get to see jsp/indesx.jsp instead I get a directory listing! I also changed the above to servlet-mapping servlet-namejsp.index/servlet-name url-pattern/jsp/index.jsp/url-pattern /servlet-mapping and frame name=topFrame scrolling=0 src=/jsp/index.jsp NORESIZE Still no luck! Is this something to with the uriroot or uribase attributes at compile time! Do I need to be setting these! Thanks. Matt - Original Message - From: Lee Peik Feng [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 10:29 AM Subject: Re: jspc and index.jsp If not mistaken, Files that you set under welcome-file-list must be physically exist. else, you need to type http://localhost:8080/your-webapp/index.jsp as this is what we set in servlet-mapping servlet-mapping servlet-nameindex/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping another workaround would be create a dummy index.html file that has the below code meta http-equiv=refresh content=0; url=index.jsp - Original Message - From: Matthew Oatham [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 6:15 PM Subject: jspc and index.jsp Hi, I have managed to pre-compile my jsp's down to class files and put them in web-inf/classes. I have this entry in web.xml welcome-file-list welcome-fileindex.jsp/welcome-file welcome-fileindex.htm/welcome-file welcome-fileindex.html/welcome-file /welcome-file-list I have the servlet WEB-INF/classes/index.class I have the mapping: servlet servlet-nameindex/servlet-name servlet-classindex/servlet-class /servlet servlet-mapping servlet-nameindex/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping when I hit my application instead of seeing the contents of index.jsp I get a directory listing of the location where index.jsp should be but isn't because it is now a class in web-inf/classes. Any ideas? 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: JSPC skips files - Please help
Just to let you know, this change fixed the problem: arg value=${web.dir}/jsp/common/**.jsp / -robert Robert Skoczylas wrote: Folks, I'm trying to compile my jsps using the JSPC class using Tomcat 4.1.12 and ANT 1.5. When running it with the -webapp option, there are no problems, all jsps compile and are placed in the destination dir/package. But we have a requirement to create different packages so I have created many tasks that invoke java classname=org.apache.jasper.JspC targeting different directories. The strage thing is, when using this method, the compiler only compiles every other JSP.The compiler skips every other jsp in this process, this is repeatable. I tried this using command line and no luck. We are using lots of tags and tiles ... Below is my ant task: java classname=org.apache.jasper.JspC fork=true failonerror=true arg value=-d / arg value=${build.jspc.java.dir} / arg value=-webinc / arg value=${dest.dir}/webinc.xml / arg value=-p / arg value=com.mycompany.jsp.common / arg value=-s / arg value=-- / arg value=${web.dir}/jsp/common/*.jsp / classpathpath refid=compile.classpath/ /classpath /java Anyone seen this? Please let me know. if you have more information. thanks, -robert - 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]
Correction -Re: JSPC skips files - Please help
This one works: java classname=org.apache.jasper.JspC fork=true failonerror=true arg value=-d / arg value=${build.jspc.java.dir} / arg value=-webinc / arg value=${dest.dir}/webinc.xml / arg value=-p / arg value=com.mycompany.jsp.common / arg value=-s / arg value=${web.dir}/jsp/common/*.jsp / classpathpath refid=compile.classpath/ /classpath /java removed arg value=-- / -robert Robert Skoczylas wrote: Just to let you know, this change fixed the problem: arg value=${web.dir}/jsp/common/**.jsp / -robert Robert Skoczylas wrote: Folks, I'm trying to compile my jsps using the JSPC class using Tomcat 4.1.12 and ANT 1.5. When running it with the -webapp option, there are no problems, all jsps compile and are placed in the destination dir/package. But we have a requirement to create different packages so I have created many tasks that invoke java classname=org.apache.jasper.JspC targeting different directories. The strage thing is, when using this method, the compiler only compiles every other JSP.The compiler skips every other jsp in this process, this is repeatable. I tried this using command line and no luck. We are using lots of tags and tiles ... Below is my ant task: java classname=org.apache.jasper.JspC fork=true failonerror=true arg value=-d / arg value=${build.jspc.java.dir} / arg value=-webinc / arg value=${dest.dir}/webinc.xml / arg value=-p / arg value=com.mycompany.jsp.common / arg value=-s / arg value=-- / arg value=${web.dir}/jsp/common/*.jsp / classpathpath refid=compile.classpath/ /classpath /java Anyone seen this? Please let me know. if you have more information. thanks, -robert - 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: jspc NullPointerException
Try to isolate the error further, error:null seems like it is coming from a: catch(Exception e){ System.out.println(error: + e.getMessage()); } in your code. Null pointer exception is very often a call to a method on an object which has not been instantiated. Andoni. - Original Message - From: Holger Veltrup [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 18, 2002 9:15 AM Subject: jspc NullPointerException Hey, I try to compile a JSP with the jspc-Script. I download the binary-distritbution fo tomcat-1.4.12. My Java-Version is 1.4.0 If i execute the following command a NullPointerException is thrown. ./jspc.sh -uriroot ../webapps/examples ../webapps/examples/jsp/colors/colrs.jsp 2002-11-18 10:13:30 - ERROR-the file '/jsp/colors/colrs.jsp' generated the following general exception: java.lang.NullPointerException error:null Several variations of options could't help Thanks for help Holger -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Re: jspc NullPointerException
I use the tomcat example of downloaded distribution. There is not my owen code intergrated. The same call (./jspc.sh -uriroot ../webapps/examples ../webapps/examples/jsp/colors/colrs.jsp) works with tomcat 4.0.3 Try to isolate the error further, error:null seems like it is coming from a: catch(Exception e){ System.out.println(error: + e.getMessage()); } in your code. Null pointer exception is very often a call to a method on an object which has not been instantiated. Andoni. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: jspc problem: precompilation inserts  character
you need to replace the pound character with the equivalent HTML code. as in replace with pound;. that should work. peter Anthony Martin wrote: Hi, I have hit a very interesting problem with precompilation of jsp files using the jspc.bat which is distributed with Tomcat. In trying to precompile a jsp that includes the 'pound' character (£), jspc.bat generates a .java file which prefixes the 'pound' character with an 'A-circumflex' character (Â). This happens consistently, despite using very minimal jsp content. E.g. the following jsp code: html body £ /body /html ... produces: out.write(html\r\nbody\r\n£\r\n\r\n/body\r\n/html); Just in case it's relevant, I called jsp with the following parameters: C:\Tomcat_Home\bin\jspc.bat -d C:\temp\jspctest -p jsp -webinc C:\temp\Jsp_Home\WEB-INF\theXML.xml -webapp C:\temp\Jsp_Home Please help! This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
re: JspC problems
Hi, I've solved my compilation problem - I'd inadvertently trashed my build classpath and jasper couldn't find the JavaBeans used by the JSPs. I still have the Internal Error: File /WEB-INFO/web.xml not found problem though. The arguments to JspC are -d dest dir -v4 -p JspServ and -webapp src dir and I'm using an ant java task as I couldn't get the jspc task to work (always died with signal 9). I can't find any docs for JspC which say what its command-line options are, so I don't know how to tell it where to find web.xml at compile time. Any insights appreciated. John. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
re: JspC problems
thanks for the post John running the jspc4 sript under linux the su fails // problems escaping the -d but if I su to tomcat then run djasper4 script su - tomcat4 djasper4 jspc -d dest dir -v4 -webapp src dir It works under tomcat 4.0.4 tomcat 4.1.12 creates java files but does not compile them, and gives no reason as to why. compilation by hand without jasper.JspC results in working but smaller class files. --- [EMAIL PROTECTED] wrote: Hi, I've solved my compilation problem - I'd inadvertently trashed my build classpath and jasper couldn't find the JavaBeans used by the JSPs. I still have the Internal Error: File /WEB-INFO/web.xml not found problem though. The arguments to JspC are -d dest dir -v4 -p JspServ and -webapp src dir and I'm using an ant java task as I couldn't get the jspc task to work (always died with signal 9). I can't find any docs for JspC which say what its command-line options are, so I don't know how to tell it where to find web.xml at compile time. Any insights appreciated. John. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org = Paul N Miller [EMAIL PROTECTED] __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: jspc
if you're using jsp1.1 tag libraries, make sure you only have the tag tld file in either jar or WEB-INF/. if you have it in both, it will cause null pointer errors. peter Max wrote: Hello, I use tomcat 4.1.10 /usr/local/tomcat/bin#./jspc.sh ../webapps/myapp/test.jsp 2002-10-28 03:51:38 - ERROR-the file '/test.jsp' generated the following general exception: java.lang.NullPointerException error:null This error with every jsp ... somebody know another way than jspc to compile all jsp recursivly ? thanks -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: jspc
i use jstl with jakarta-taglibs with no tld file (in WEB-INF or in jar files) and log tag library with one tld file in WEB-INF/lib/log.jar do you have an idea ? - Original Message - From: peter lin [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, October 28, 2002 3:59 PM Subject: Re: jspc if you're using jsp1.1 tag libraries, make sure you only have the tag tld file in either jar or WEB-INF/. if you have it in both, it will cause null pointer errors. peter Max wrote: Hello, I use tomcat 4.1.10 /usr/local/tomcat/bin#./jspc.sh ../webapps/myapp/test.jsp 2002-10-28 03:51:38 - ERROR-the file '/test.jsp' generated the following general exception: java.lang.NullPointerException error:null This error with every jsp ... somebody know another way than jspc to compile all jsp recursivly ? thanks -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: jspc
remove all tld files in jar and put them in WEB-INF that fixed the NPE for me. peter Max wrote: i use jstl with jakarta-taglibs with no tld file (in WEB-INF or in jar files) and log tag library with one tld file in WEB-INF/lib/log.jar do you have an idea ? - Original Message - From: peter lin [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, October 28, 2002 3:59 PM Subject: Re: jspc if you're using jsp1.1 tag libraries, make sure you only have the tag tld file in either jar or WEB-INF/. if you have it in both, it will cause null pointer errors. peter Max wrote: Hello, I use tomcat 4.1.10 /usr/local/tomcat/bin#./jspc.sh ../webapps/myapp/test.jsp 2002-10-28 03:51:38 - ERROR-the file '/test.jsp' generated the following general exception: java.lang.NullPointerException error:null This error with every jsp ... somebody know another way than jspc to compile all jsp recursivly ? thanks -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: jspc
Perter, I have the similar problem. How can I make sure the jsp1.1 tag libraries is not in either jar or WEH-INF/. Eddie Liang Database Architect Phone: 630-810-9669 x253 -Original Message- From: peter lin [mailto:peter.lin;labs.gte.com] Sent: Monday, October 28, 2002 2:59 PM To: Tomcat Users List Subject: Re: jspc if you're using jsp1.1 tag libraries, make sure you only have the tag tld file in either jar or WEB-INF/. if you have it in both, it will cause null pointer errors. peter Max wrote: Hello, I use tomcat 4.1.10 /usr/local/tomcat/bin#./jspc.sh ../webapps/myapp/test.jsp 2002-10-28 03:51:38 - ERROR-the file '/test.jsp' generated the following general exception: java.lang.NullPointerException error:null This error with every jsp ... somebody know another way than jspc to compile all jsp recursivly ? thanks -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: jspc
From my experience, the easiest thing is to delete the tag's tld file in the jar if you're using jakarta jsp1.1 tags. in my project we are using a couple jakarta jsp1.1 tags, which caused NPE when using jspc. If your problems with jspc is due to tld file conflicts, do the following: 1. place a copy of the tag tld file in mywebapp/WEB-INF/ 2. delete all .tld files in your jar 3. make sure you don't have any tld files in META-INF/ or any place else in WEB-INF As far as I can tell, jasper2 is delegating to the tld in jar file. but rather than just use the tld file, it differs between jsp 1.1 and jsp 1.2 taglibs. With jsp 1.2 taglibs, it uses the tld in jar and completely ignores all other tld files. In jsp 1.1, jasper seems to use the jar version. The problem only crops up using jspc for jasper2 with jsp 1.1 taglibs with multiple copies of tld file. I discovered the problem a month back and submitted a bug to bugzilla, but no one has fixed it yet. I have an itch to track it down and submit a patch, but I'm already sleep deprived as it is. hope that helps. peter Eddie Liang [EMAIL PROTECTED] wrote:Perter, I have the similar problem. How can I make sure the jsp1.1 tag libraries is not in either jar or WEH-INF/. Eddie Liang Database Architect Phone: 630-810-9669 x253 -Original Message- From: peter lin [mailto:peter.lin;labs.gte.com] Sent: Monday, October 28, 2002 2:59 PM To: Tomcat Users List Subject: Re: jspc if you're using jsp1.1 tag libraries, make sure you only have the tag tld file in either jar or WEB-INF/. if you have it in both, it will cause null pointer errors. peter Max wrote: Hello, I use tomcat 4.1.10 /usr/local/tomcat/bin#./jspc.sh ../webapps/myapp/test.jsp 2002-10-28 03:51:38 - ERROR-the file '/test.jsp' generated the following general exception: java.lang.NullPointerException error:null This error with every jsp ... somebody know another way than jspc to compile all jsp recursivly ? thanks -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: - Do you Yahoo!? Y! Web Hosting - Let the expert host your web site
RE: jspc pre-compiled pages distributed with .war file?
The jspc command does not put real package names on the jsp.class files. What happens is each jsp page gets its own classloader so if you have 2 index.jsp files they will still run. To do what you want to do you have to have each jsp generated .java file have a real package name so that when you deploy the class files to tomcat it can resolve the classes correctly. There have been a few threads on both this and the developer list about work arounds to this.. Don't have the links.. But I suggest you try there. Also there is an option on jspc for jasper that will create the web.xml fragment for all the mappings for the jsp servlets. -Original Message- From: Thomas Heller [mailto:th.heller;mx4k.com] Sent: Friday, October 25, 2002 10:24 AM To: Tomcat Users List Subject: jspc pre-compiled pages distributed with .war file? hi there, i am migrating my projects from php to java and began to set up a development server that ideally does all the dev work once a project is marked release i just call an ant task to deploy the project to one or more (load balanced) production servers. i have written an ant build.xml to compile my webapp and to put everything i need into mywebapp.war. thats working very fine and i can just deploy that .war to a tomcat server without any problems. now, i have setup another ant task to precompile every jsp file using jasper (ant task jspc). thats working perfectly fine and i have loads of index_jsp.java, etc files. now i compile those to .class files and i would like to distribute them inside the .war file so that the tomcat server itself doesnt need to compile anything by himself. _Ideally_ i'd like to exclude _any_ .jsp file in the .war file and just include the compiled jsp.class files. but i wonder ... tomcat somehow doesnt really know what i'm sending him and he doesnt recognize any of the precompiled pages. how do i tell tomcat to use the precompiled pages in the .war instead of compiling them himself? i know i can write this it into my web.xml servlet servlet-nameindex_jsp/servlet-name servlet-class my.package.jsp.index_jsp /servlet-class /servlet servlet-mapping servlet-nameindex_jsp/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping but somehow i dont like it this way, but i would rather use this instead of putting jsp files into the .war file. would be cool if tomcat would do something like this by himself when he finds *_jsp.class in a /WEB-INF/precompiled directory. Anyways maybe tomcat has some support for what i'm trying to find and i just can't find it? Comments welcome Greetings, Thomas -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: jspc pre-compiled pages distributed with .war file?
I created an ANT script to generate the class files, and I'm with the same problemas Thomas have. But about this jspc option to generate web.xml... I think ant doesn't support it, does it? (I'm using Ant 1.5) On Fri, 2002-10-25 at 13:29, John Trollinger wrote: The jspc command does not put real package names on the jsp.class files. What happens is each jsp page gets its own classloader so if you have 2 index.jsp files they will still run. To do what you want to do you have to have each jsp generated .java file have a real package name so that when you deploy the class files to tomcat it can resolve the classes correctly. There have been a few threads on both this and the developer list about work arounds to this.. Don't have the links.. But I suggest you try there. Also there is an option on jspc for jasper that will create the web.xml fragment for all the mappings for the jsp servlets. -Original Message- From: Thomas Heller [mailto:th.heller;mx4k.com] Sent: Friday, October 25, 2002 10:24 AM To: Tomcat Users List Subject: jspc pre-compiled pages distributed with .war file? hi there, i am migrating my projects from php to java and began to set up a development server that ideally does all the dev work once a project is marked release i just call an ant task to deploy the project to one or more (load balanced) production servers. i have written an ant build.xml to compile my webapp and to put everything i need into mywebapp.war. thats working very fine and i can just deploy that .war to a tomcat server without any problems. now, i have setup another ant task to precompile every jsp file using jasper (ant task jspc). thats working perfectly fine and i have loads of index_jsp.java, etc files. now i compile those to .class files and i would like to distribute them inside the .war file so that the tomcat server itself doesnt need to compile anything by himself. _Ideally_ i'd like to exclude _any_ .jsp file in the .war file and just include the compiled jsp.class files. but i wonder ... tomcat somehow doesnt really know what i'm sending him and he doesnt recognize any of the precompiled pages. how do i tell tomcat to use the precompiled pages in the .war instead of compiling them himself? i know i can write this it into my web.xml servlet servlet-nameindex_jsp/servlet-name servlet-class my.package.jsp.index_jsp /servlet-class /servlet servlet-mapping servlet-nameindex_jsp/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping but somehow i dont like it this way, but i would rather use this instead of putting jsp files into the .war file. would be cool if tomcat would do something like this by himself when he finds *_jsp.class in a /WEB-INF/precompiled directory. Anyways maybe tomcat has some support for what i'm trying to find and i just can't find it? Comments welcome Greetings, Thomas -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- Felipe Schnack Analista de Sistemas [EMAIL PROTECTED] Cel.: (51)91287530 Linux Counter #281893 Faculdade Ritter dos Reis www.ritterdosreis.br [EMAIL PROTECTED] Fone/Fax.: (51)32303328 -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: jspc pre-compiled pages distributed with .war file?
I created my own ant task that does all the jspc.bat does. I have tried to relay the code to the ant community with no luck.. -Original Message- From: Felipe Schnack [mailto:felipes;ritterdosreis.br] Sent: Friday, October 25, 2002 10:36 AM To: Tomcat Users List Subject: RE: jspc pre-compiled pages distributed with .war file? I created an ANT script to generate the class files, and I'm with the same problemas Thomas have. But about this jspc option to generate web.xml... I think ant doesn't support it, does it? (I'm using Ant 1.5) On Fri, 2002-10-25 at 13:29, John Trollinger wrote: The jspc command does not put real package names on the jsp.class files. What happens is each jsp page gets its own classloader so if you have 2 index.jsp files they will still run. To do what you want to do you have to have each jsp generated .java file have a real package name so that when you deploy the class files to tomcat it can resolve the classes correctly. There have been a few threads on both this and the developer list about work arounds to this.. Don't have the links.. But I suggest you try there. Also there is an option on jspc for jasper that will create the web.xml fragment for all the mappings for the jsp servlets. -Original Message- From: Thomas Heller [mailto:th.heller;mx4k.com] Sent: Friday, October 25, 2002 10:24 AM To: Tomcat Users List Subject: jspc pre-compiled pages distributed with .war file? hi there, i am migrating my projects from php to java and began to set up a development server that ideally does all the dev work once a project is marked release i just call an ant task to deploy the project to one or more (load balanced) production servers. i have written an ant build.xml to compile my webapp and to put everything i need into mywebapp.war. thats working very fine and i can just deploy that .war to a tomcat server without any problems. now, i have setup another ant task to precompile every jsp file using jasper (ant task jspc). thats working perfectly fine and i have loads of index_jsp.java, etc files. now i compile those to .class files and i would like to distribute them inside the .war file so that the tomcat server itself doesnt need to compile anything by himself. _Ideally_ i'd like to exclude _any_ .jsp file in the .war file and just include the compiled jsp.class files. but i wonder ... tomcat somehow doesnt really know what i'm sending him and he doesnt recognize any of the precompiled pages. how do i tell tomcat to use the precompiled pages in the .war instead of compiling them himself? i know i can write this it into my web.xml servlet servlet-nameindex_jsp/servlet-name servlet-class my.package.jsp.index_jsp /servlet-class /servlet servlet-mapping servlet-nameindex_jsp/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping but somehow i dont like it this way, but i would rather use this instead of putting jsp files into the .war file. would be cool if tomcat would do something like this by himself when he finds *_jsp.class in a /WEB-INF/precompiled directory. Anyways maybe tomcat has some support for what i'm trying to find and i just can't find it? Comments welcome Greetings, Thomas -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- Felipe Schnack Analista de Sistemas [EMAIL PROTECTED] Cel.: (51)91287530 Linux Counter #281893 Faculdade Ritter dos Reis www.ritterdosreis.br [EMAIL PROTECTED] Fone/Fax.: (51)32303328 -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: jspc pre-compiled pages distributed with .war file?
Tomcat requires the servlet and servlet mappings in the web.xml, this is the way it works. Essentially, servlets are generated for the jsp pages. I modified my web application this week to precompile the jsp files and no longer include these in my war. The JspC compiler when used with the -webapp option, also allows the use of either -webxml or -webinc to generate a complete web.xml file or just the servlet and servlet mappings to be included. I found I couldnt do this using the ant jspc command, but rather used a java task to run the jspc command. My generated .java classes were then compiled with all my other classes and put in the war. Andy. Thomas Heller wrote: hi there, i am migrating my projects from php to java and began to set up a development server that ideally does all the dev work once a project is marked release i just call an ant task to deploy the project to one or more (load balanced) production servers. i have written an ant build.xml to compile my webapp and to put everything i need into mywebapp.war. thats working very fine and i can just deploy that .war to a tomcat server without any problems. now, i have setup another ant task to precompile every jsp file using jasper (ant task jspc). thats working perfectly fine and i have loads of index_jsp.java, etc files. now i compile those to .class files and i would like to distribute them inside the .war file so that the tomcat server itself doesnt need to compile anything by himself. _Ideally_ i'd like to exclude _any_ .jsp file in the .war file and just include the compiled jsp.class files. but i wonder ... tomcat somehow doesnt really know what i'm sending him and he doesnt recognize any of the precompiled pages. how do i tell tomcat to use the precompiled pages in the .war instead of compiling them himself? i know i can write this it into my web.xml servlet servlet-nameindex_jsp/servlet-name servlet-class my.package.jsp.index_jsp /servlet-class /servlet servlet-mapping servlet-nameindex_jsp/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping but somehow i dont like it this way, but i would rather use this instead of putting jsp files into the .war file. would be cool if tomcat would do something like this by himself when he finds *_jsp.class in a /WEB-INF/precompiled directory. Anyways maybe tomcat has some support for what i'm trying to find and i just can't find it? Comments welcome Greetings, Thomas -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: jspc name-mangling and mapping vs. Tomcat on-the-fly compile
Comments from anyone who's been successful in getting JSP precompile to work is appreciated! Since my first posting, I have since upgraded to Tomcat 4.0.4, hoping the issue with precompile of JSP's would be fixed, but I am still not having success getting it to work. I'm running jspc.sh as: jspc.sh -uriroot $CATALINA_HOME/webapps/jspcdemo -d $CATALINA_HOME/work/Standalone/this.host.com/jspcdemo -web$CATALINA_HOME/web apps/jspcdemo/jspcdemo.xml -webapp $CATALINA_HOME/webapps/jspcdemo The files and class names produced from this are: some.java (containing public class some) These are not of the same form as those produced on-the-fly by Tomcat: some$jsp.java (containing public class some$jsp) Thus, Tomcat ignores these files, and does it's own compile anyway. Any ideas? -Original Message- From: Scott Dayberry [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 1:27 PM To: Tomcat-User (E-mail) Subject: jspc name-mangling and mapping vs. Tomcat on-the-fly compile Sorry if this has been answered, but I couldn't find anything searching. It might be in older archives, as my issue is with Tomcat 3.2.3. I'm trying to get JSP pre-compilation to work, but have the following problem. (The example is using a one page webapp, $TOMCAT_HOME/webapps/jspcdemo/some.jsp). How do I get the same mangled name for the .java and .class files from jspc.sh as that produced by Tomcat when it compiles JSP's on-the-fly? When Tomcat compiles, it generates for $TOMCAT_HOME/webapps/jspcdemo/some.jsp, the following files: _0002fsome_0002ejspsome.class _0002fsome_0002ejspsome_jsp_0.java in the $TOMCAT_HOME/work/localhost_8080%2Fjspcdemo/ directory. If I use jspc.sh, it produces 'some.java'. If I use javac to compile this to 'some.class', then copy these two files to the same /work directory, Tomcat still does it's own compile when the page is hit. If I put my pre-compiled .class file under $TOMCAT_HOME/webapps/jspcdemo/WEB-INF/classes and use the web.xml file produced by jspc, then it works, but no log entries are written to jasper.log file. Why? Also, this would require a seperate servlet-mapping for each url. Is this true? For a large webapp with a large number of jsp's, this means a long web.xml file. Any comments are appreciated! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JSPC Precompiling Issues and a handy utility
Anyway, when I use jspc to precompile I get all the .java files in , but no class files. Does jspc only generate the servlet java files? The whole point of precompiling was to prevent javac from being called to compile those servlets to work around the javac memory leak and speed up page loading. This is not the answer but most likely a question, which came in my head while I was reading. AFAIK a running server (and server which does not serve developers' needs) compiling is made only one time when the server gets the request for a certain jsp page. After this compiling each following request is served by the server without recompiling (in the case the time of last modification of this jsp file is not changed) so javac is not called each time when the server gets a request for this page and as follows it does not have an influence on the speed of serving user's requests. Do I understand something wrong? ilis -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JSPC Precompiling Issues and a handy utility
On Fri, 2 Aug 2002, Irina Lishchenko wrote: This is not the answer but most likely a question, which came in my head while I was reading. AFAIK a running server (and server which does not serve developers' needs) compiling is made only one time when the server gets the request for a certain jsp page. After this compiling each following request is served by the server without recompiling (in the case the time of last modification of this jsp file is not changed) so javac is not called each time when the server gets a request for this page and as follows it does not have an influence on the speed of serving user's requests. Do I understand something wrong? You are correct. After the first request for a page, the JSP page has been precompiled to a servlet (.java) and that servlet has been compiled to a java class (.class) by the java compiler. After that, it will not have to be compiled again (unless you force the reloadable attribute in your context). The problem that was asked about wasn't regarding performance issues but an issue with the javac compiler. It leaks memory everytime you compile a JSP page and if you have a large amount of JSPs to be compiled or will be compiled over time (without restarting the server), it could eventually cause an out of memory error. -adam k. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JSPC Precompiling Issues and a handy utility
Rick == Rick Fincher [EMAIL PROTECTED] writes: Rick Hi All, Rick There has been some discussion on here and on the TAGLIBS list about Rick precompiling JSP's in Tomcat. Rick To avoid confusion, before I go on I want to point out that there has been a Rick change in Tomcat 4.1.8 in the naming conventions of servlets generated from Rick JSP's. Rick In 4.1.8 a JSP file CATALINA_HOME/webapps/myApp/main.jsp gets compiled into Rick a servlet CATALINA_HOME/work/Standalone/localhost/myApp/main_jsp.java. Rick Prior to 4.1.8 the servlet created was called main$jsp.java. So they Rick changed the name convention from $jsp.java to _jsp.java. Rick I'll use the 4.1.8 names in this post. Rick Anyway, when I use jspc to precompile I get all the .java files in , but no Rick class files. Does jspc only generate the servlet java files? The whole Rick point of precompiling was to prevent javac from being called to compile Rick those servlets to work around the javac memory leak and speed up page Rick loading. The Tomcat JspC process only generates the servlet code. You have to compile the code yourself. It's easy enough to set that up as part of your build process. -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JSPC Precompiling Issues and a handy utility
Hi David, Thanks for the response. I'm using an IDE and all it does is spit out a war file with the JSP sources and WEB-INF. I guess it can't use class files because it has no knowlege of the container environment it will be deployed in. So it looks like what I need to do is write an ant script (or somethin similar) to take the webapp name as an argument and: 1. Call jspc.sh with the appropriate parameters to compile the servlets into the work directory. 2. Pull the common/lib jars and common/classes into the classpath. 3. Pull the WEB-INF/lib jars and WEB-INF/classes of the webapp into the class path 4. Call javac with that classpath and compile all the .java files in the work directory. A shell script won't work because the classpath is too long for 1024 character limit, unless I use a shell without that restriction. Rick - Original Message - snip The Tomcat JspC process only generates the servlet code. You have to compile the code yourself. It's easy enough to set that up as part of your build process. -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JspC null pointer exception
The page compiles fine, I just can't compile it (or any other jsp) on the command line. Dave -Original Message- From: Milt Epstein [mailto:[EMAIL PROTECTED]] Sent: 27 June 2002 17:30 To: Tomcat Users List Subject: RE: JspC null pointer exception On Thu, 27 Jun 2002, Dave Gibbs wrote: I also get the problem trying to compile this very simple page. I suspect that I'm mis-specifying the uri-root or something. I've looked for more documentation but all I can find is the javadocs here http://jakarta.apache.org/tomcat/tomcat-4.1-doc/index.html I'm sure it would work if I got the params right... %@page isErrorPage=true% Do you need a space between the '@' and the 'p' (and/or between the '' and the '%')? Easy to try ... html head title/title /head body Error page /body /html -Original Message- From: Milt Epstein [mailto:[EMAIL PROTECTED]] Sent: 27 June 2002 17:15 To: Tomcat Users List Subject: Re: JspC null pointer exception On Thu, 27 Jun 2002, Dave Gibbs wrote: Hi guys, I'm still stuck trying to use jasper. I'm getting null pointer exceptions thrown by org.apache.jasper.compiler.Compiler. 2002-06-25 11:56:12 - ERROR-the file '\admin\clear.jsp' generated the following [ ... ] Where's the source for clear.jsp? That's probably most relevant here. Milt Epstein Research Programmer Systems and Technology Services (STS) Campus Information Technologies and Educational Services (CITES) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Milt Epstein Research Programmer Systems and Technology Services (STS) Campus Information Technologies and Educational Services (CITES) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Jspc i18n
It looks like the output is probably in UTF-8 format. If you use the %@ page contentType=text/html;charset=UTF-8 % directive in your page, that should instruct the browser to use that encoding for display. To see if this should work, you should be able to just manually change your browser's encoding to UTF-8 (Unicode) while viewing the page that currently doesn't work and have it display properly for you. HTH, Jeff Christian Bourque To: Tomcat Users List [EMAIL PROTECTED] christian@alicc: osoft.comSubject: Re: Jspc i18n 04/10/02 04:57 PM Please respond to Tomcat Users List Hi Jeff ! I can't use the attribute encoding, I think my app server doesn't implements the last JSP specs ! But I have an update to my problem, I did a diff on two different .java file based on the same jsp file : 1) the one generated by using jspc command line (the one that doesn't works) 2) the one generated by tomcat/jspc when accessed the first time by a browser (the one that works) Its really weird because there are almost identical (only the class name is different but this is normal), the french text is scrambled in both versions ! Even more weird, if I access the command line generated version page (#1) in IE I see this : Joyeux noël et bonne année !!! But if I do a view source of the page look at this : Joyeux noël et bonne année !!! Everything is fine !! Christian - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 4:55 PM Subject: Re: Jspc i18n Hi, Christian. I haven't run into this problem before, so I'm not sure, but it looks like the compiler is encoding the accented characters. Perhaps if you specify the JSP page's encoding, it won't do that anymore...? Try using a directive at the top of your JSP to do this, something like %@ page encoding =ISO-8859-1 % or whatever specific encoding/character set you are using. HTH, -Jeff Christian Bourque To: Tomcat Users List [EMAIL PROTECTED] christian@alicc: osoft.comSubject: Re: Jspc i18n 04/10/02 02:16 PM Please respond to Tomcat Users List Hi Jay ! No, the bad characters are in the .java files that jspc creates ! The text is clean in the .jsp file but as soon as I convert it to .java with jspc all french accent are scrambled ! Christian - Original Message - From: Jay Gardner [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 2:42 PM Subject: RE: Jspc i18n Are all the correct characters in the .java files that jspc creates? --Jay Gardner -Original Message- From: Christian Bourque [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 12:49 PM To: Tomcat Users List Subject: Jspc i18n Hi ! I'm having a weird problem with JSPC. We have a bilingual web application (english/french), so when I pre-compile all my jsp pages the ones which contains french accent are all screwed up : Vous avez oublié votre mot de passe ? = Vous avez oubliÃ(c) votre mot de passe ? chaîne = chaÃ(r)ne ??? Christian -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL
Re: Jspc i18n
Jeff, If I precompile my jsp file with this option : %@ page contentType=text/html;charset=UTF-8 % I get this error : JspReader: Exception parsing file \index.jsp sun.io.MalformedInputException at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:110) at java.io.InputStreamReader.convertInto(InputStreamReader.java:137) at java.io.InputStreamReader.fill(InputStreamReader.java:186) at java.io.InputStreamReader.read(InputStreamReader.java:249) at java.io.Reader.read(Reader.java:102) at org.apache.jasper.compiler.JspReader.pushFile(JspReader.java:224) at org.apache.jasper.compiler.JspReader.pushFile(JspReader.java:164) at org.apache.jasper.compiler.JspReader.init(JspReader.java:282) at org.apache.jasper.compiler.JspReader.createJspReader(JspReader.java:288) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:167) at org.apache.jasper.JspC.parseFile(JspC.java:376) at org.apache.jasper.JspC.parseFiles(JspC.java:641) at org.apache.jasper.JspC.main(JspC.java:689) You were right about changing the encoding directly in the browser, it works when I switch to UTF-8 ! But I still don't understand why it works if I deploy the same page directly in Tomcat (without precompilation) ??? What is the difference ? It should be the same thing ! Christian - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, April 11, 2002 9:30 AM Subject: Re: Jspc i18n It looks like the output is probably in UTF-8 format. If you use the %@ page contentType=text/html;charset=UTF-8 % directive in your page, that should instruct the browser to use that encoding for display. To see if this should work, you should be able to just manually change your browser's encoding to UTF-8 (Unicode) while viewing the page that currently doesn't work and have it display properly for you. HTH, Jeff Christian Bourque To: Tomcat Users List [EMAIL PROTECTED] christian@alicc: osoft.comSubject: Re: Jspc i18n 04/10/02 04:57 PM Please respond to Tomcat Users List Hi Jeff ! I can't use the attribute encoding, I think my app server doesn't implements the last JSP specs ! But I have an update to my problem, I did a diff on two different .java file based on the same jsp file : 1) the one generated by using jspc command line (the one that doesn't works) 2) the one generated by tomcat/jspc when accessed the first time by a browser (the one that works) Its really weird because there are almost identical (only the class name is different but this is normal), the french text is scrambled in both versions ! Even more weird, if I access the command line generated version page (#1) in IE I see this : Joyeux noël et bonne année !!! But if I do a view source of the page look at this : Joyeux noël et bonne année !!! Everything is fine !! Christian - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 4:55 PM Subject: Re: Jspc i18n Hi, Christian. I haven't run into this problem before, so I'm not sure, but it looks like the compiler is encoding the accented characters. Perhaps if you specify the JSP page's encoding, it won't do that anymore...? Try using a directive at the top of your JSP to do this, something like %@ page encoding =ISO-8859-1 % or whatever specific encoding/character set you are using. HTH, -Jeff Christian Bourque To: Tomcat Users List [EMAIL PROTECTED] christian@alicc: osoft.comSubject: Re: Jspc i18n 04/10/02 02:16 PM Please respond to Tomcat Users List Hi Jay ! No, the bad characters are in the .java files that jspc creates ! The text is clean in the .jsp file but as soon as I convert it to .java with jspc all french accent are scrambled ! Christian - Original Message - From: Jay Gardner [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 2:42 PM Subject: RE: Jspc i18n Are all the correct characters in the .java files that jspc creates? --Jay Gardner -Original Message- From: Christian Bourque [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 12:49 PM To: Tomcat Users List Subject: Jspc i18n Hi ! I'm having a weird problem with JSPC. We have a bilingual web application (english/french), so when I pre-compile all my jsp pages the ones which contains french accent are all screwed up : Vous avez oublié votre mot de passe ? = Vous avez oubliÃ(c
Re: Jspc i18n - solution
Ok I've found the solution ! The problem is not in jspc, its when I compile the .java file generated by jspc with javac ! I've look into Tomcat source code (org.apache.jasper.compiler.Compiler) and I realized that they don't compile using the default encoding instead they use UTF-8 (javac -encoding UTF-8 ...) ! Not it works !!! Thanks to everyone for your help ! Christian - Original Message - From: Christian Bourque [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, April 11, 2002 10:31 AM Subject: Re: Jspc i18n Jeff, If I precompile my jsp file with this option : %@ page contentType=text/html;charset=UTF-8 % I get this error : JspReader: Exception parsing file \index.jsp sun.io.MalformedInputException at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:110) at java.io.InputStreamReader.convertInto(InputStreamReader.java:137) at java.io.InputStreamReader.fill(InputStreamReader.java:186) at java.io.InputStreamReader.read(InputStreamReader.java:249) at java.io.Reader.read(Reader.java:102) at org.apache.jasper.compiler.JspReader.pushFile(JspReader.java:224) at org.apache.jasper.compiler.JspReader.pushFile(JspReader.java:164) at org.apache.jasper.compiler.JspReader.init(JspReader.java:282) at org.apache.jasper.compiler.JspReader.createJspReader(JspReader.java:288) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:167) at org.apache.jasper.JspC.parseFile(JspC.java:376) at org.apache.jasper.JspC.parseFiles(JspC.java:641) at org.apache.jasper.JspC.main(JspC.java:689) You were right about changing the encoding directly in the browser, it works when I switch to UTF-8 ! But I still don't understand why it works if I deploy the same page directly in Tomcat (without precompilation) ??? What is the difference ? It should be the same thing ! Christian - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, April 11, 2002 9:30 AM Subject: Re: Jspc i18n It looks like the output is probably in UTF-8 format. If you use the %@ page contentType=text/html;charset=UTF-8 % directive in your page, that should instruct the browser to use that encoding for display. To see if this should work, you should be able to just manually change your browser's encoding to UTF-8 (Unicode) while viewing the page that currently doesn't work and have it display properly for you. HTH, Jeff Christian Bourque To: Tomcat Users List [EMAIL PROTECTED] christian@alicc: osoft.comSubject: Re: Jspc i18n 04/10/02 04:57 PM Please respond to Tomcat Users List Hi Jeff ! I can't use the attribute encoding, I think my app server doesn't implements the last JSP specs ! But I have an update to my problem, I did a diff on two different .java file based on the same jsp file : 1) the one generated by using jspc command line (the one that doesn't works) 2) the one generated by tomcat/jspc when accessed the first time by a browser (the one that works) Its really weird because there are almost identical (only the class name is different but this is normal), the french text is scrambled in both versions ! Even more weird, if I access the command line generated version page (#1) in IE I see this : Joyeux noël et bonne année !!! But if I do a view source of the page look at this : Joyeux noël et bonne année !!! Everything is fine !! Christian - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 4:55 PM Subject: Re: Jspc i18n Hi, Christian. I haven't run into this problem before, so I'm not sure, but it looks like the compiler is encoding the accented characters. Perhaps if you specify the JSP page's encoding, it won't do that anymore...? Try using a directive at the top of your JSP to do this, something like %@ page encoding =ISO-8859-1 % or whatever specific encoding/character set you are using. HTH, -Jeff Christian Bourque To: Tomcat Users List [EMAIL PROTECTED] christian@alicc: osoft.comSubject: Re: Jspc i18n 04/10/02 02:16 PM Please respond to Tomcat Users List Hi Jay ! No, the bad characters are in the .java files that jspc creates ! The text is clean in the .jsp file but as soon as I convert it to .java with jspc all french accent are scrambled ! Christian - Original Message
RE: Jspc i18n
Are all the correct characters in the .java files that jspc creates? --Jay Gardner -Original Message- From: Christian Bourque [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 12:49 PM To: Tomcat Users List Subject: Jspc i18n Hi ! I'm having a weird problem with JSPC. We have a bilingual web application (english/french), so when I pre-compile all my jsp pages the ones which contains french accent are all screwed up : Vous avez oublié votre mot de passe ? = Vous avez oubliÃ(c) votre mot de passe ? chaîne = chaÃ(r)ne ??? Christian -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Jspc i18n
Hi Jay ! No, the bad characters are in the .java files that jspc creates ! The text is clean in the .jsp file but as soon as I convert it to .java with jspc all french accent are scrambled ! Christian - Original Message - From: Jay Gardner [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 2:42 PM Subject: RE: Jspc i18n Are all the correct characters in the .java files that jspc creates? --Jay Gardner -Original Message- From: Christian Bourque [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 12:49 PM To: Tomcat Users List Subject: Jspc i18n Hi ! I'm having a weird problem with JSPC. We have a bilingual web application (english/french), so when I pre-compile all my jsp pages the ones which contains french accent are all screwed up : Vous avez oublié votre mot de passe ? = Vous avez oubliÃ(c) votre mot de passe ? chaîne = chaÃ(r)ne ??? Christian -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Jspc i18n
Hi, Christian. I haven't run into this problem before, so I'm not sure, but it looks like the compiler is encoding the accented characters. Perhaps if you specify the JSP page's encoding, it won't do that anymore...? Try using a directive at the top of your JSP to do this, something like %@ page encoding =ISO-8859-1 % or whatever specific encoding/character set you are using. HTH, -Jeff Christian Bourque To: Tomcat Users List [EMAIL PROTECTED] christian@alicc: osoft.comSubject: Re: Jspc i18n 04/10/02 02:16 PM Please respond to Tomcat Users List Hi Jay ! No, the bad characters are in the .java files that jspc creates ! The text is clean in the .jsp file but as soon as I convert it to .java with jspc all french accent are scrambled ! Christian - Original Message - From: Jay Gardner [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 2:42 PM Subject: RE: Jspc i18n Are all the correct characters in the .java files that jspc creates? --Jay Gardner -Original Message- From: Christian Bourque [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 12:49 PM To: Tomcat Users List Subject: Jspc i18n Hi ! I'm having a weird problem with JSPC. We have a bilingual web application (english/french), so when I pre-compile all my jsp pages the ones which contains french accent are all screwed up : Vous avez oublié votre mot de passe ? = Vous avez oubliÃ(c) votre mot de passe ? chaîne = chaÃ(r)ne ??? Christian -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Jspc i18n
Hi Jeff ! I can't use the attribute encoding, I think my app server doesn't implements the last JSP specs ! But I have an update to my problem, I did a diff on two different .java file based on the same jsp file : 1) the one generated by using jspc command line (the one that doesn't works) 2) the one generated by tomcat/jspc when accessed the first time by a browser (the one that works) Its really weird because there are almost identical (only the class name is different but this is normal), the french text is scrambled in both versions ! Even more weird, if I access the command line generated version page (#1) in IE I see this : Joyeux noël et bonne année !!! But if I do a view source of the page look at this : Joyeux noël et bonne année !!! Everything is fine !! Christian - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 4:55 PM Subject: Re: Jspc i18n Hi, Christian. I haven't run into this problem before, so I'm not sure, but it looks like the compiler is encoding the accented characters. Perhaps if you specify the JSP page's encoding, it won't do that anymore...? Try using a directive at the top of your JSP to do this, something like %@ page encoding =ISO-8859-1 % or whatever specific encoding/character set you are using. HTH, -Jeff Christian Bourque To: Tomcat Users List [EMAIL PROTECTED] christian@alicc: osoft.comSubject: Re: Jspc i18n 04/10/02 02:16 PM Please respond to Tomcat Users List Hi Jay ! No, the bad characters are in the .java files that jspc creates ! The text is clean in the .jsp file but as soon as I convert it to .java with jspc all french accent are scrambled ! Christian - Original Message - From: Jay Gardner [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 2:42 PM Subject: RE: Jspc i18n Are all the correct characters in the .java files that jspc creates? --Jay Gardner -Original Message- From: Christian Bourque [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 12:49 PM To: Tomcat Users List Subject: Jspc i18n Hi ! I'm having a weird problem with JSPC. We have a bilingual web application (english/french), so when I pre-compile all my jsp pages the ones which contains french accent are all screwed up : Vous avez oublié votre mot de passe ? = Vous avez oubliÃ(c) votre mot de passe ? chaîne = chaÃ(r)ne ??? Christian -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Jspc i18n
did you set your browser's encoding to use French? Try it with and without. -Original Message- From: Christian Bourque [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 5:57 PM To: Tomcat Users List Subject: Re: Jspc i18n Hi Jeff ! I can't use the attribute encoding, I think my app server doesn't implements the last JSP specs ! But I have an update to my problem, I did a diff on two different .java file based on the same jsp file : 1) the one generated by using jspc command line (the one that doesn't works) 2) the one generated by tomcat/jspc when accessed the first time by a browser (the one that works) Its really weird because there are almost identical (only the class name is different but this is normal), the french text is scrambled in both versions ! Even more weird, if I access the command line generated version page (#1) in IE I see this : Joyeux noël et bonne année !!! But if I do a view source of the page look at this : Joyeux noël et bonne année !!! Everything is fine !! Christian - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 4:55 PM Subject: Re: Jspc i18n Hi, Christian. I haven't run into this problem before, so I'm not sure, but it looks like the compiler is encoding the accented characters. Perhaps if you specify the JSP page's encoding, it won't do that anymore...? Try using a directive at the top of your JSP to do this, something like %@ page encoding =ISO-8859-1 % or whatever specific encoding/character set you are using. HTH, -Jeff Christian Bourque To: Tomcat Users List [EMAIL PROTECTED] christian@alicc: osoft.comSubject: Re: Jspc i18n 04/10/02 02:16 PM Please respond to Tomcat Users List Hi Jay ! No, the bad characters are in the .java files that jspc creates ! The text is clean in the .jsp file but as soon as I convert it to .java with jspc all french accent are scrambled ! Christian - Original Message - From: Jay Gardner [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 2:42 PM Subject: RE: Jspc i18n Are all the correct characters in the .java files that jspc creates? --Jay Gardner -Original Message- From: Christian Bourque [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 12:49 PM To: Tomcat Users List Subject: Jspc i18n Hi ! I'm having a weird problem with JSPC. We have a bilingual web application (english/french), so when I pre-compile all my jsp pages the ones which contains french accent are all screwed up : Vous avez oublié votre mot de passe ? = Vous avez oubliÃ(c) votre mot de passe ? chaîne = chaÃ(r)ne ??? Christian -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: JSPC problem
A bug prevents JSPC from working in Tomcat 3.3(a). This has been fixed in Tomcat 3.3.1-rc1 and the nightly Tomcat 3.3.x. Tomcat 3.3.x has the advantage of outputting the correct slash ('/' instead of '\') in the generated web.xml file for url-pattern elements on Windows systems. Cheers, Larry -Original Message- From: Nicholls, Leon [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 10:25 AM To: '[EMAIL PROTECTED]' Subject: JSPC problem Hi I have been trying to use the java precompiler for Tomcat 3.3a. However, I am getting weird error messages. It seems to complain about not finding the crimson xml parser, but the crimson.jar file is located under jakarta-tomcat/lib/container. The crimson parser seems to have registered itself as a parser, but then the parser cannot be instantiated!? c:\jdk1.3\bin\java -Dtomcat.home=c:\PROGRA~1\APACHE~1\jakarta-tomcat org.apache.tomcat.startup.Main jspc -p -webapp s:\wsx\release\build\subscriber Guessed home=C:\Program Files\Apache Group\jakarta-tomcat java.lang.reflect.InvocationTargetException: java.lang.reflect.InvocationTargetException: javax.xml.parsers.FactoryConfigurationError: Provider org.apache.crims on.jaxp.DocumentBuilderFactoryImpl not found at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentB uilderFactory. java:145) at org.apache.jasper.compiler.JspUtil.parseXMLDocJaxp(Unknown Source) at org.apache.jasper.compiler.JspUtil.parseXMLDoc(Unknown Source) at org.apache.jasper.compiler.TagLibraryInfoImpl.init(Unknown Source) at org.apache.jasper.compiler.JspParseEventListener.handleDirecti ve(Unknown Source) at org.apache.jasper.compiler.DelegatingListener.handleDirective(Unknown Source) at org.apache.jasper.compiler.Parser$Directive.accept(Unknown Source) at org.apache.jasper.compiler.Parser.parse(Unknown Source) at org.apache.jasper.compiler.Parser.parse(Unknown Source) at org.apache.jasper.compiler.Parser.parse(Unknown Source) at org.apache.jasper.compiler.Compiler.compile(Unknown Source) at org.apache.jasper.JspC.parseFile(Unknown Source) at org.apache.jasper.JspC.parseFiles(Unknown Source) at org.apache.jasper.JspC.main(Unknown Source) at java.lang.reflect.Method.invoke(Native Method) at org.apache.tomcat.util.IntrospectionUtils.callMain(Unknown Source) at org.apache.tomcat.startup.Jspc.execute(Unknown Source) at java.lang.reflect.Method.invoke(Native Method) at org.apache.tomcat.util.IntrospectionUtils.execute(Unknown Source) at org.apache.tomcat.startup.Main.execute(Unknown Source) at org.apache.tomcat.startup.Main.main(Unknown Source) -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: JSPC
See below... - Original Message - From: Oliver Farrnbacher [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 2002. március 6. 10:26 Subject: JSPC Hi, i'm using tomcat 3.2.3 and 3.2.4 on Linux 2.4. I'm trying to precompile my JSPs using jspc.sh, but I only get .java files, it does not compile the classes. And it never will... You'll have to feed them to javac yourself. I'd like to have the classes compiled to be informed about compiler errors. Any help ? It's best to set up an Ant script to do the jspc-javac process for you. I've written an article in JavaReport that among other things discusses how to integrate JSPC compilation into your build process; see http://www.javareport.com/html/from_pages/article.asp?id=5772mon=12yr=2001 It's in the Compile your JSPs section of the article; especially take a look into Listing 3, it has an example fragment of an Ant build file with changes you have to make color-highlighted. Oliver Cheers, Attila. -- Attila Szegedi home: http://www.szegedi.org -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: jspc
I'm trying to figure out a way to pre-compile .jsp pages so that tomcat need not compile them on the fly and store the files in the /usr/local/tomcat/work directories. I'm trying to use jspc.sh and it will create the necessary .java files, but then what do I do with them? What directory do they belong in, do I have to make class files?, what options to jspc.sh are needed ? See the archives. This has been answered a couple times before. --- Michael Wentzel Software Developer Software As We Think - http://www.aswethink.com
RE: jspc
In other words, go to http://mikal.org/interests/java/tomcat/ and enter precompile as a search term. -Original Message- From: Michael Wentzel [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 1:40 PM To: '[EMAIL PROTECTED]' Subject: RE: jspc I'm trying to figure out a way to pre-compile .jsp pages so that tomcat need not compile them on the fly and store the files in the /usr/local/tomcat/work directories. I'm trying to use jspc.sh and it will create the necessary .java files, but then what do I do with them? What directory do they belong in, do I have to make class files?, what options to jspc.sh are needed ? See the archives. This has been answered a couple times before. --- Michael Wentzel Software Developer Software As We Think - http://www.aswethink.com
Re: jspc and deployment
Hi Oskar, I am using the options: -uriroot /$TOMCAT_HOME/webapps/AppName -d /$TOMCAT_HOME/webapps/AppName/WEB-INF/classes to set the directory where the results of jspc should be placed -webxml/OWN_DIR/webAppName.xml -webapp/$TOMCAT_HOME/webapps/AppName to specify the directory that contains the jsp's I remove the jsp's after running jspc from /$TOMCAT_HOME/webapps/AppName. After running jspc, you should run javac to compile the generated java-files to class files. I update my own web.xml with the results of /$OWN_DIR/webAppName.xml, and then everything runs fine. Hope this help, Sophie Oskar Zinger schreef: What option did you use with jspc? I am encountering the same problem. Thanks Oskar FRED wrote: Hi Randy, Thank you for your reaction. I got it working. This will save me a lot of time and will make my application more scalable. Sophie Randy Layman schreef: The answer is you can't. Even if you could get it to generate the file names correctly, Tomcat still wouldn't use them. What you need to do is to use jspc with the option that produces a web.xml file. You then need to incorporate that with your web.xml file, compile the .java files, and you will have a webapp made up of exclusively servlets (and static content) - no more JSP to compile. Randy -Original Message- From: Joost en Sooophie [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 09, 2001 1:59 PM To: [EMAIL PROTECTED] Subject: jspc and deployment Hi, My problem is the following: I am working on an EJB application. I want to pre-compile all the jsp-pages before making the application available on the internet (and someone clicking on the page, experiencing quite some delay). When the jsp MyJSP.jsp is compiled with jspc in Tomcat, files MyJSP.java and MyJSP.class are placed in the /TOMCAT_HOME/work directory. But when I start the application on the internet, it creates the files xxxMy_yyyJSP.java and xxxMy_yyyJSP.class in the /TOMCAT_HOME/work directory. How can I configure jspc, so that it creates the files xxxMy_yyyJSP.java and xxxMy_yyyJSP.class in the /TOMCAT_HOME/work directory? Any answer or information or documentation is much appreciated. Sophie
RE: jspc and deployment
I was wondering what tool you are using to merge the generated web.xml file with your own? We might consider pre-building everything if we could get an automatic build in place that would merge these files. Randy -Original Message- From: Sophie [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 12, 2001 7:08 AM To: [EMAIL PROTECTED] Subject: Re: jspc and deployment Hi Oskar, I am using the options: -uriroot /$TOMCAT_HOME/webapps/AppName -d /$TOMCAT_HOME/webapps/AppName/WEB-INF/classes to set the directory where the results of jspc should be placed -webxml/OWN_DIR/webAppName.xml -webapp/$TOMCAT_HOME/webapps/AppName to specify the directory that contains the jsp's I remove the jsp's after running jspc from /$TOMCAT_HOME/webapps/AppName. After running jspc, you should run javac to compile the generated java-files to class files. I update my own web.xml with the results of /$OWN_DIR/webAppName.xml, and then everything runs fine. Hope this help, Sophie Oskar Zinger schreef: What option did you use with jspc? I am encountering the same problem. Thanks Oskar FRED wrote: Hi Randy, Thank you for your reaction. I got it working. This will save me a lot of time and will make my application more scalable. Sophie Randy Layman schreef: The answer is you can't. Even if you could get it to generate the file names correctly, Tomcat still wouldn't use them. What you need to do is to use jspc with the option that produces a web.xml file. You then need to incorporate that with your web.xml file, compile the .java files, and you will have a webapp made up of exclusively servlets (and static content) - no more JSP to compile. Randy -Original Message- From: Joost en Sooophie [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 09, 2001 1:59 PM To: [EMAIL PROTECTED] Subject: jspc and deployment Hi, My problem is the following: I am working on an EJB application. I want to pre-compile all the jsp-pages before making the application available on the internet (and someone clicking on the page, experiencing quite some delay). When the jsp MyJSP.jsp is compiled with jspc in Tomcat, files MyJSP.java and MyJSP.class are placed in the /TOMCAT_HOME/work directory. But when I start the application on the internet, it creates the files xxxMy_yyyJSP.java and xxxMy_yyyJSP.class in the /TOMCAT_HOME/work directory. How can I configure jspc, so that it creates the files xxxMy_yyyJSP.java and xxxMy_yyyJSP.class in the /TOMCAT_HOME/work directory? Any answer or information or documentation is much appreciated. Sophie
Re: jspc and deployment
Hi Randy, Unfortunately I am not using a tool, but is it a manual effort. I add the statements for the EJB application to the web.xml file. It is not a lot of work as I only have to add 6 or 7 alias entries. These alias entries are defined in the jsp's FORM tags. You could automate it by letting the user define the alias tags in a file and then indeed merge the files with the generated web.xml file. Sophie Randy Layman schreef: I was wondering what tool you are using to merge the generated web.xml file with your own? We might consider pre-building everything if we could get an automatic build in place that would merge these files. Randy -Original Message- From: Sophie [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 12, 2001 7:08 AM To: [EMAIL PROTECTED] Subject: Re: jspc and deployment Hi Oskar, I am using the options: -uriroot /$TOMCAT_HOME/webapps/AppName -d /$TOMCAT_HOME/webapps/AppName/WEB-INF/classes to set the directory where the results of jspc should be placed -webxml/OWN_DIR/webAppName.xml -webapp/$TOMCAT_HOME/webapps/AppName to specify the directory that contains the jsp's I remove the jsp's after running jspc from /$TOMCAT_HOME/webapps/AppName. After running jspc, you should run javac to compile the generated java-files to class files. I update my own web.xml with the results of /$OWN_DIR/webAppName.xml, and then everything runs fine. Hope this help, Sophie Oskar Zinger schreef: What option did you use with jspc? I am encountering the same problem. Thanks Oskar FRED wrote: Hi Randy, Thank you for your reaction. I got it working. This will save me a lot of time and will make my application more scalable. Sophie Randy Layman schreef: The answer is you can't. Even if you could get it to generate the file names correctly, Tomcat still wouldn't use them. What you need to do is to use jspc with the option that produces a web.xml file. You then need to incorporate that with your web.xml file, compile the .java files, and you will have a webapp made up of exclusively servlets (and static content) - no more JSP to compile. Randy -Original Message- From: Joost en Sooophie [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 09, 2001 1:59 PM To: [EMAIL PROTECTED] Subject: jspc and deployment Hi, My problem is the following: I am working on an EJB application. I want to pre-compile all the jsp-pages before making the application available on the internet (and someone clicking on the page, experiencing quite some delay). When the jsp MyJSP.jsp is compiled with jspc in Tomcat, files MyJSP.java and MyJSP.class are placed in the /TOMCAT_HOME/work directory. But when I start the application on the internet, it creates the files xxxMy_yyyJSP.java and xxxMy_yyyJSP.class in the /TOMCAT_HOME/work directory. How can I configure jspc, so that it creates the files xxxMy_yyyJSP.java and xxxMy_yyyJSP.class in the /TOMCAT_HOME/work directory? Any answer or information or documentation is much appreciated. Sophie
Re: jspc and deployment
Thanks. I got it to work. Oskar Sophie wrote: Hi Oskar, I am using the options: -uriroot /$TOMCAT_HOME/webapps/AppName -d /$TOMCAT_HOME/webapps/AppName/WEB-INF/classes to set the directory where the results of jspc should be placed -webxml/OWN_DIR/webAppName.xml -webapp/$TOMCAT_HOME/webapps/AppName to specify the directory that contains the jsp's I remove the jsp's after running jspc from /$TOMCAT_HOME/webapps/AppName. After running jspc, you should run javac to compile the generated java-files to class files. I update my own web.xml with the results of /$OWN_DIR/webAppName.xml, and then everything runs fine. Hope this help, Sophie Oskar Zinger schreef: What option did you use with jspc? I am encountering the same problem. Thanks Oskar FRED wrote: Hi Randy, Thank you for your reaction. I got it working. This will save me a lot of time and will make my application more scalable. Sophie Randy Layman schreef: The answer is you can't. Even if you could get it to generate the file names correctly, Tomcat still wouldn't use them. What you need to do is to use jspc with the option that produces a web.xml file. You then need to incorporate that with your web.xml file, compile the .java files, and you will have a webapp made up of exclusively servlets (and static content) - no more JSP to compile. Randy -Original Message- From: Joost en Sooophie [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 09, 2001 1:59 PM To: [EMAIL PROTECTED] Subject: jspc and deployment Hi, My problem is the following: I am working on an EJB application. I want to pre-compile all the jsp-pages before making the application available on the internet (and someone clicking on the page, experiencing quite some delay). When the jsp MyJSP.jsp is compiled with jspc in Tomcat, files MyJSP.java and MyJSP.class are placed in the /TOMCAT_HOME/work directory. But when I start the application on the internet, it creates the files xxxMy_yyyJSP.java and xxxMy_yyyJSP.class in the /TOMCAT_HOME/work directory. How can I configure jspc, so that it creates the files xxxMy_yyyJSP.java and xxxMy_yyyJSP.class in the /TOMCAT_HOME/work directory? Any answer or information or documentation is much appreciated. Sophie
Re: jspc and deployment
Hi Randy, Thank you for your reaction. I got it working. This will save me a lot of time and will make my application more scalable. Sophie Randy Layman schreef: The answer is you can't. Even if you could get it to generate the file names correctly, Tomcat still wouldn't use them. What you need to do is to use jspc with the option that produces a web.xml file. You then need to incorporate that with your web.xml file, compile the .java files, and you will have a webapp made up of exclusively servlets (and static content) - no more JSP to compile. Randy -Original Message- From: Joost en Sooophie [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 09, 2001 1:59 PM To: [EMAIL PROTECTED] Subject: jspc and deployment Hi, My problem is the following: I am working on an EJB application. I want to pre-compile all the jsp-pages before making the application available on the internet (and someone clicking on the page, experiencing quite some delay). When the jsp MyJSP.jsp is compiled with jspc in Tomcat, files MyJSP.java and MyJSP.class are placed in the /TOMCAT_HOME/work directory. But when I start the application on the internet, it creates the files xxxMy_yyyJSP.java and xxxMy_yyyJSP.class in the /TOMCAT_HOME/work directory. How can I configure jspc, so that it creates the files xxxMy_yyyJSP.java and xxxMy_yyyJSP.class in the /TOMCAT_HOME/work directory? Any answer or information or documentation is much appreciated. Sophie
Re: jspc and deployment
What option did you use with jspc? I am encountering the same problem. Thanks Oskar FRED wrote: Hi Randy, Thank you for your reaction. I got it working. This will save me a lot of time and will make my application more scalable. Sophie Randy Layman schreef: The answer is you can't. Even if you could get it to generate the file names correctly, Tomcat still wouldn't use them. What you need to do is to use jspc with the option that produces a web.xml file. You then need to incorporate that with your web.xml file, compile the .java files, and you will have a webapp made up of exclusively servlets (and static content) - no more JSP to compile. Randy -Original Message- From: Joost en Sooophie [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 09, 2001 1:59 PM To: [EMAIL PROTECTED] Subject: jspc and deployment Hi, My problem is the following: I am working on an EJB application. I want to pre-compile all the jsp-pages before making the application available on the internet (and someone clicking on the page, experiencing quite some delay). When the jsp MyJSP.jsp is compiled with jspc in Tomcat, files MyJSP.java and MyJSP.class are placed in the /TOMCAT_HOME/work directory. But when I start the application on the internet, it creates the files xxxMy_yyyJSP.java and xxxMy_yyyJSP.class in the /TOMCAT_HOME/work directory. How can I configure jspc, so that it creates the files xxxMy_yyyJSP.java and xxxMy_yyyJSP.class in the /TOMCAT_HOME/work directory? Any answer or information or documentation is much appreciated. Sophie
Re: jspc ???
At 03:18 PM 6/9/2002 +0530, you wrote: hi all can somebody tell me how to precompile the jsp's of my webapp. i have tried using jspc with options . it just creates the related java files but not the compiled servlets. Hit your jsp content once before you go into production, they'll be compiled and ready to go until the next time you cycle the system for whatever reason.
Re: jspc ???
Hi, jspc just creates the .java files. You can use the javac command to compile these .java files to .class files. Sophie Krishna Kant T schreef: hi all can somebody tell me how to precompile the jsp's of my webapp. i have tried using jspc with options . it just creates the related java files but not the compiled servlets. regards ~krishnakant
Re: jspc classes
Hi! all Using the jspc option I have been able to compile the .jsp files and generate .class files. Further I have also generated a web.xml file. I put all the .class files in the web-inf\classes folder. Now the question I have is how do I access these .class files. Earlier I would type in http://localhost/servlet and i could access my application. Now when i type this , tomcat recompiles all the jsp files and puts them in a work folder, instad of using the .class files I have in my web-inf\classes folder. Any help or tips would be greatly appreciated. Thanks in advance Usha
Re: JspC HOW-TO? (Was precompilations)
On Wed, Nov 29, 2000 at 01:29:58PM -0600, Mike La Budde wrote: OK, I'm stumped! How do I use JspC to precompile a specific (or all of the) .jsp file(s)? I've tried the following: jspc -uriroot c:\sfwr\tomcat\webapps\examples -webapp c:\sfwr\tomcat\webapps\examples c:\sfwr\tomcat\webapps\examples\jsp\num\numguess.jsp and various other tries w/out success TIA, Mike Dear Mike, It might help if you post what kind of error you are getting, or what happens when you try. For me, tomcat.sh jspc -v -d /usr/local/tomcat/work/localhost_8080%2Fcontextname -webapp /usr/local/tomcat/webapps/myapp works, it converts my *.jsp files to *.java files (which I understand now contain the servlet source code). What I'm looking for is a tool to convert the servlet source code to servlet classes, using the unique-class-name generation algorithm described in http://archives2.real-time.com/pipermail/tomcat-users/2000-August/008481.html so Tomcat doesn't have to do this work itself when it starts. Is there such a tool? Or has anybody else run into Tomcat going into 500 server errors while trying to compile JSP pages under heavy load, and if so, how did you deal with it, please? Yours Sincerely, Aleksey Tsalolikhin