Re: More helpful reporting of exceptions in JSPs
Tim Fennell wrote: I've posted my patch for Jasper/Tomcat at the following location: http://www.tfenne.com/jasper/ The page has a brief overview, a download link and before and after screenshots so you can get an idea for what exactly the patch does before you decide to patch your own environment. If you give it a shot and have any problems and/or suggestions for improving it please let me know - but please read the readme first ;) Excellent addition. Maybe once you have got an initial around of feedback for users of the latest 5.0.x and 5.5.x you might like to post it up on Tomcat Bugzilla http://issues.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%205 and attach the patch. Darryl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fwd: More helpful reporting of exceptions in JSPs
Apologies in advance for cross-posting this, but I sent this email out to the tomcat-dev list a couple of days ago and have received no replies at all... I think this is quite a useful feature, and I'm wondering how best to go about contributing it. Thanks -Tim Fennell http://stripes.mc4j.org Begin forwarded message: From: Tim Fennell [EMAIL PROTECTED] Date: October 9, 2005 5:50:11 PM EDT To: tomcat-dev@jakarta.apache.org Subject: More helpful reporting of exceptions in JSPs Reply-To: Tomcat Developers List tomcat-dev@jakarta.apache.org Hi, I'll apologize in advance if this is the wrong place to post this, or if this has been covered before. I had a good read through the Tomcat docs and faqs, searched the bug database, and googled around on the topic, but could not really find anything. I've been using Tomcat for a while, and in general have found it as good a servlet/JSP container as any I've used. With one exception (no pun intended). A long time ago I started out using WebLogic, and the one thing that I loved about WebLogic, that is missing from Tomcat, is that when an Exception occurred in a JSP it would tell you what line number *in the JSP* generated the exception, and show you a snippet of code around the offending line. For quite a while I'd figured that the way Tomcat was built prevented this from being easy/possible, but I didn't look. Well, I finally got around to looking, and it only took me a couple of hours to implement it. Which makes me wonder if there is some other reason that this isn't done in Tomcat/Jasper? At any rate, I have code that will do this now, and I think it'd be a great productivity boost for anyone else developing JSPs on Tomcat. It amounts to small patches to two files. The first is org.apache.jasper.compiler.Compiler to make it hang on to the parse tree (pageNodes) if in development mode, and a getter to make this accessible. The second is to org.apache.jasper.servlet.JspServletWrapper to do the grunt work of mapping a stack frame from the exception back to the line in the JSP that it came from. It's all coded up to function only when in development mode, and is reasonably well commented. Would any of the committers be interested in taking a look at this if I put together a patch and posted it here? Cheers, -Tim Fennell http://stripes.mc4j.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fwd: More helpful reporting of exceptions in JSPs
Wow, you are my hero! I've always missed that from the Weblogic days! I for one would love to see this added. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Tue, October 11, 2005 1:15 pm, Tim Fennell said: Apologies in advance for cross-posting this, but I sent this email out to the tomcat-dev list a couple of days ago and have received no replies at all... I think this is quite a useful feature, and I'm wondering how best to go about contributing it. Thanks -Tim Fennell http://stripes.mc4j.org Begin forwarded message: From: Tim Fennell [EMAIL PROTECTED] Date: October 9, 2005 5:50:11 PM EDT To: tomcat-dev@jakarta.apache.org Subject: More helpful reporting of exceptions in JSPs Reply-To: Tomcat Developers List tomcat-dev@jakarta.apache.org Hi, I'll apologize in advance if this is the wrong place to post this, or if this has been covered before. I had a good read through the Tomcat docs and faqs, searched the bug database, and googled around on the topic, but could not really find anything. I've been using Tomcat for a while, and in general have found it as good a servlet/JSP container as any I've used. With one exception (no pun intended). A long time ago I started out using WebLogic, and the one thing that I loved about WebLogic, that is missing from Tomcat, is that when an Exception occurred in a JSP it would tell you what line number *in the JSP* generated the exception, and show you a snippet of code around the offending line. For quite a while I'd figured that the way Tomcat was built prevented this from being easy/possible, but I didn't look. Well, I finally got around to looking, and it only took me a couple of hours to implement it. Which makes me wonder if there is some other reason that this isn't done in Tomcat/Jasper? At any rate, I have code that will do this now, and I think it'd be a great productivity boost for anyone else developing JSPs on Tomcat. It amounts to small patches to two files. The first is org.apache.jasper.compiler.Compiler to make it hang on to the parse tree (pageNodes) if in development mode, and a getter to make this accessible. The second is to org.apache.jasper.servlet.JspServletWrapper to do the grunt work of mapping a stack frame from the exception back to the line in the JSP that it came from. It's all coded up to function only when in development mode, and is reasonably well commented. Would any of the committers be interested in taking a look at this if I put together a patch and posted it here? Cheers, -Tim Fennell http://stripes.mc4j.org - 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: More helpful reporting of exceptions in JSPs
regardless how the commiters feel about it, are you willing to release your patched source files? (So for example, I can compile and deploy them myself?) ;) If so, I'd say a page on your wiki might be alright for distro, with a link to the page sent to tomcat-user ? I'd be giving it a try about 10 minutes after you send out your email, since I've often wondered about this feature. Usually right after digging through the work directory for a generated java file. -Original Message- From: Tim Fennell [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 11, 2005 12:15 PM To: Tomcat Users List Subject: Fwd: More helpful reporting of exceptions in JSPs Apologies in advance for cross-posting this, but I sent this email out to the tomcat-dev list a couple of days ago and have received no replies at all... I think this is quite a useful feature, and I'm wondering how best to go about contributing it. Thanks -Tim Fennell http://stripes.mc4j.org Begin forwarded message: From: Tim Fennell [EMAIL PROTECTED] Date: October 9, 2005 5:50:11 PM EDT To: tomcat-dev@jakarta.apache.org Subject: More helpful reporting of exceptions in JSPs Reply-To: Tomcat Developers List tomcat-dev@jakarta.apache.org At any rate, I have code that will do this now, and I think it'd be a great productivity boost for anyone else developing JSPs on Tomcat. It amounts to small patches to two files. The first is org.apache.jasper.compiler.Compiler to make it hang on to the parse tree (pageNodes) if in development mode, and a getter to make this accessible. The second is to org.apache.jasper.servlet.JspServletWrapper to do the grunt work of mapping a stack frame from the exception back to the line in the JSP that it came from. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: More helpful reporting of exceptions in JSPs
could you post your patch for download anywhere? If you need webspace, I can provide you some. I would find the patch extremely helpful, and would love to have it in my development tomcat, as soon as possible. thanx leon On 10/11/05, Tim Fennell [EMAIL PROTECTED] wrote: Apologies in advance for cross-posting this, but I sent this email out to the tomcat-dev list a couple of days ago and have received no replies at all... I think this is quite a useful feature, and I'm wondering how best to go about contributing it. Thanks -Tim Fennell http://stripes.mc4j.org Begin forwarded message: From: Tim Fennell [EMAIL PROTECTED] Date: October 9, 2005 5:50:11 PM EDT To: tomcat-dev@jakarta.apache.org Subject: More helpful reporting of exceptions in JSPs Reply-To: Tomcat Developers List tomcat-dev@jakarta.apache.org Hi, I'll apologize in advance if this is the wrong place to post this, or if this has been covered before. I had a good read through the Tomcat docs and faqs, searched the bug database, and googled around on the topic, but could not really find anything. I've been using Tomcat for a while, and in general have found it as good a servlet/JSP container as any I've used. With one exception (no pun intended). A long time ago I started out using WebLogic, and the one thing that I loved about WebLogic, that is missing from Tomcat, is that when an Exception occurred in a JSP it would tell you what line number *in the JSP* generated the exception, and show you a snippet of code around the offending line. For quite a while I'd figured that the way Tomcat was built prevented this from being easy/possible, but I didn't look. Well, I finally got around to looking, and it only took me a couple of hours to implement it. Which makes me wonder if there is some other reason that this isn't done in Tomcat/Jasper? At any rate, I have code that will do this now, and I think it'd be a great productivity boost for anyone else developing JSPs on Tomcat. It amounts to small patches to two files. The first is org.apache.jasper.compiler.Compiler to make it hang on to the parse tree (pageNodes) if in development mode, and a getter to make this accessible. The second is to org.apache.jasper.servlet.JspServletWrapper to do the grunt work of mapping a stack frame from the exception back to the line in the JSP that it came from. It's all coded up to function only when in development mode, and is reasonably well commented. Would any of the committers be interested in taking a look at this if I put together a patch and posted it here? Cheers, -Tim Fennell http://stripes.mc4j.org - 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: More helpful reporting of exceptions in JSPs
I certainly don't have a problem with that. Obviously I'd rather have it in the main codebase - while I don't have a problem running a patched version of jasper, I'm sure that would freak out a good number of PHBs ;) But since there is interest I'll clean up what I have, put it online and post a link here. That should happen some time this evening. -t On Oct 11, 2005, at 2:01 PM, GB Developer wrote: regardless how the commiters feel about it, are you willing to release your patched source files? (So for example, I can compile and deploy them myself?) ;) If so, I'd say a page on your wiki might be alright for distro, with a link to the page sent to tomcat-user ? I'd be giving it a try about 10 minutes after you send out your email, since I've often wondered about this feature. Usually right after digging through the work directory for a generated java file. -Original Message- From: Tim Fennell [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 11, 2005 12:15 PM To: Tomcat Users List Subject: Fwd: More helpful reporting of exceptions in JSPs Apologies in advance for cross-posting this, but I sent this email out to the tomcat-dev list a couple of days ago and have received no replies at all... I think this is quite a useful feature, and I'm wondering how best to go about contributing it. Thanks -Tim Fennell http://stripes.mc4j.org Begin forwarded message: From: Tim Fennell [EMAIL PROTECTED] Date: October 9, 2005 5:50:11 PM EDT To: tomcat-dev@jakarta.apache.org Subject: More helpful reporting of exceptions in JSPs Reply-To: Tomcat Developers List tomcat-dev@jakarta.apache.org At any rate, I have code that will do this now, and I think it'd be a great productivity boost for anyone else developing JSPs on Tomcat. It amounts to small patches to two files. The first is org.apache.jasper.compiler.Compiler to make it hang on to the parse tree (pageNodes) if in development mode, and a getter to make this accessible. The second is to org.apache.jasper.servlet.JspServletWrapper to do the grunt work of mapping a stack frame from the exception back to the line in the JSP that it came from. - 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: More helpful reporting of exceptions in JSPs
Hi All, I've posted my patch for Jasper/Tomcat at the following location: http://www.tfenne.com/jasper/ The page has a brief overview, a download link and before and after screenshots so you can get an idea for what exactly the patch does before you decide to patch your own environment. If you give it a shot and have any problems and/or suggestions for improving it please let me know - but please read the readme first ;) Happy bug hunting. -Tim Fennell http://stripes.mc4j.org On Oct 11, 2005, at 3:40 PM, Tim Fennell wrote: I certainly don't have a problem with that. Obviously I'd rather have it in the main codebase - while I don't have a problem running a patched version of jasper, I'm sure that would freak out a good number of PHBs ;) But since there is interest I'll clean up what I have, put it online and post a link here. That should happen some time this evening. -t On Oct 11, 2005, at 2:01 PM, GB Developer wrote: regardless how the commiters feel about it, are you willing to release your patched source files? (So for example, I can compile and deploy them myself?) ;) If so, I'd say a page on your wiki might be alright for distro, with a link to the page sent to tomcat-user ? I'd be giving it a try about 10 minutes after you send out your email, since I've often wondered about this feature. Usually right after digging through the work directory for a generated java file. -Original Message- From: Tim Fennell [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 11, 2005 12:15 PM To: Tomcat Users List Subject: Fwd: More helpful reporting of exceptions in JSPs Apologies in advance for cross-posting this, but I sent this email out to the tomcat-dev list a couple of days ago and have received no replies at all... I think this is quite a useful feature, and I'm wondering how best to go about contributing it. Thanks -Tim Fennell http://stripes.mc4j.org Begin forwarded message: From: Tim Fennell [EMAIL PROTECTED] Date: October 9, 2005 5:50:11 PM EDT To: tomcat-dev@jakarta.apache.org Subject: More helpful reporting of exceptions in JSPs Reply-To: Tomcat Developers List tomcat-dev@jakarta.apache.org At any rate, I have code that will do this now, and I think it'd be a great productivity boost for anyone else developing JSPs on Tomcat. It amounts to small patches to two files. The first is org.apache.jasper.compiler.Compiler to make it hang on to the parse tree (pageNodes) if in development mode, and a getter to make this accessible. The second is to org.apache.jasper.servlet.JspServletWrapper to do the grunt work of mapping a stack frame from the exception back to the line in the JSP that it came from. - 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: precompiling JSPs -- how to resolve references normally resolved by apache?
Unless you have a directory ${TOP}/web/html/jsp/jsp your uribase/uriroot probably aren't right. [EMAIL PROTECTED] wrote: Hi, I am trying to get our JSPs to be precompiled as part of our ant build process to catch all syntax errors at compile time. The problem I have run into is that we are using apache + tomcat and we have set the following rules in apache httpd. conf: JkMount /servlets/* ajp13 JkMount /jsp/* ajp13 JkMount /controller/* cont JkMount /cgi-bin/java-rmi.cgi ajp13 Inside some of our servlets and JSPs, they refer to other jsps using the absolute URL /jsp/ which works in deployed environment because apache redirects it. For example, in one JSP we have %@ include file=/jsp/Header.jsp % I setup the tomcat-4.1.30 ant jspc task and it was giving a NPE. Then I tried the Ant Jspc optional task, and it gave me an error message: the file '\Status.jsp' generated the following general exceptionn: org.apache.jasper.JasperExeption: /Status.jsp(3,0) File /jsp/Header.jsp not found Is there any quick and dirty way to get the JspC to resolve the /jsp/*.jsp urls to *.jsp or is there no way? My alternative is to try to change all the /jsp/*.jsp references to *.jsp everywhere we do an %@ include % or jsp:include/ or jsp:forward/. I think that would be ok since those directices are handled on the tomcat side. Changing it would be kind of messy since we have a ton of JSPs in a large directory hierarchy, so some of those /jsp/Header.jsp references would have to be changed to ../../Header.jsp, etc. I know I can't get away from the /jsp mapping completely because we have URLs and HTTP redirects which depend on it. Here is the quick and dirty jspc ant target I created: jspc srcdir=${TOP}/web/html/jsp uribase=${TOP}/web/html/jsp uriroot=${TOP}/web/html/jsp destdir=${TMP_DIR}/WEB-INF/src compiler=jasper41 verbose=9 include name=*.jsp/ classpath !--todo: including all the tomcat jars, overkill i know...-- fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\bin include name=*.jar/ /fileset fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\common\endorsed include name=*.jar/ /fileset fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\common\lib include name=*.jar/ /fileset fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\shared\lib include name=*.jar/ /fileset fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\server\lib include name=*.jar/ /fileset !-- project classes and external 3rd party jar files -- pathelement path=${CLASS_DIR}/ filelist refid=active.external.jar.filelist/ /classpath /jspc Thanks for any advice, -Alex - 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: precompiling JSPs -- how to resolve references normally resolved by apache?
Jon, Thanks for your help. The uribase and uriroot were not set correctly. Here is the final version that I got working. I had one additional twist that I needed to copy the JSP files to another location first using the ant copy task. I set uriroot to the webapps root {dir}/html, and then jasper2 automatically found the JSP files in the subdirectories under jsp/** and correctly resolved the references /jsp/**.jsp inside the JSP files. Once it works, it's great. But it several hours of frustration because tomcat4.x jasper often just print NullPointerExceptions instead of an error message. So you have to guess what is wrong. -Alex target name=jspc depends=init mkdir dir=${TMP_DIR}/html/ mkdir dir=${TMP_DIR}/WEB-INF/classes/ mkdir dir=${TMP_DIR}/WEB-INF/src/ copy todir=${TMP_DIR}/html flatten=false fileset dir=${TOP}/web/html include name=jsp/*.jsp/ /fileset /copy taskdef classname=org.apache.jasper.JspC name=jasper2 classpath id=jspc.classpath fileset dir=${BASE_ENG_DIR}/${TOMCAT_DIR}\common\endorsed include name=*.jar/ /fileset fileset dir=${BASE_ENG_DIR}/${TOMCAT_DIR}\common\lib include name=*.jar/ /fileset !-- compiled classes and 3rd party jars -- pathelement path=${CLASS_DIR}/ filelist refid=active.external.jar.filelist/ /classpath /taskdef !--property name=p1 refid=jspc.classpath/-- !--echoclasspath = ${p1}/echo-- jasper2 verbose=9 compiler=jasper41 validateXml=false uriroot=${TMP_DIR}/html webXmlFragment=${TMP_DIR}/WEB-INF/generated_web.xml outputDir=${TMP_DIR}/WEB-INF/src / /target target name=compile-server-jsps depends=init,jspc mkdir dir=${TMP_DIR}/WEB-INF/classes/ mkdir dir=${TMP_DIR}/WEB-INF/lib/ javac destdir=${TMP_DIR}/WEB-INF/classes optimize=off failonerror=true srcdir=${TMP_DIR}/WEB-INF/src excludes=**/*.smap classpath pathelement location=${TMP_DIR}/WEB-INF/classes/ path refid=jspc.classpath/ /classpath include name=** / exclude name=tags/** / /javac /target On Thu, 06 Oct 2005 14:06:23 +0100, Jon Wingfield [EMAIL PROTECTED] said: Unless you have a directory ${TOP}/web/html/jsp/jsp your uribase/uriroot probably aren't right. [EMAIL PROTECTED] wrote: Hi, I am trying to get our JSPs to be precompiled as part of our ant build process to catch all syntax errors at compile time. The problem I have run into is that we are using apache + tomcat and we have set the following rules in apache httpd. conf: JkMount /servlets/* ajp13 JkMount /jsp/* ajp13 JkMount /controller/* cont JkMount /cgi-bin/java-rmi.cgi ajp13 Inside some of our servlets and JSPs, they refer to other jsps using the absolute URL /jsp/ which works in deployed environment because apache redirects it. For example, in one JSP we have %@ include file=/jsp/Header.jsp % I setup the tomcat-4.1.30 ant jspc task and it was giving a NPE. Then I tried the Ant Jspc optional task, and it gave me an error message: the file '\Status.jsp' generated the following general exceptionn: org.apache.jasper.JasperExeption: /Status.jsp(3,0) File /jsp/Header.jsp not found Is there any quick and dirty way to get the JspC to resolve the /jsp/*.jsp urls to *.jsp or is there no way? My alternative is to try to change all the /jsp/*.jsp references to *.jsp everywhere we do an %@ include % or jsp:include/ or jsp:forward/. I think that would be ok since those directices are handled on the tomcat side. Changing it would be kind of messy since we have a ton of JSPs in a large directory hierarchy, so some of those /jsp/Header.jsp references would have to be changed to ../../Header.jsp, etc. I know I can't get away from the /jsp mapping completely because we have URLs and HTTP redirects which depend on it. Here is the quick and dirty jspc ant target I created: jspc srcdir=${TOP}/web/html/jsp uribase=${TOP}/web/html/jsp uriroot=${TOP}/web/html/jsp destdir=${TMP_DIR}/WEB-INF/src compiler=jasper41 verbose=9 include name=*.jsp/ classpath !--todo: including all the tomcat jars, overkill i know...-- fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\bin include name=*.jar/ /fileset fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\common\endorsed
precompiling JSPs -- how to resolve references normally resolved by apache?
Hi, I am trying to get our JSPs to be precompiled as part of our ant build process to catch all syntax errors at compile time. The problem I have run into is that we are using apache + tomcat and we have set the following rules in apache httpd. conf: JkMount /servlets/* ajp13 JkMount /jsp/* ajp13 JkMount /controller/* cont JkMount /cgi-bin/java-rmi.cgi ajp13 Inside some of our servlets and JSPs, they refer to other jsps using the absolute URL /jsp/ which works in deployed environment because apache redirects it. For example, in one JSP we have %@ include file=/jsp/Header.jsp % I setup the tomcat-4.1.30 ant jspc task and it was giving a NPE. Then I tried the Ant Jspc optional task, and it gave me an error message: the file '\Status.jsp' generated the following general exceptionn: org.apache.jasper.JasperExeption: /Status.jsp(3,0) File /jsp/Header.jsp not found Is there any quick and dirty way to get the JspC to resolve the /jsp/*.jsp urls to *.jsp or is there no way? My alternative is to try to change all the /jsp/*.jsp references to *.jsp everywhere we do an %@ include % or jsp:include/ or jsp:forward/. I think that would be ok since those directices are handled on the tomcat side. Changing it would be kind of messy since we have a ton of JSPs in a large directory hierarchy, so some of those /jsp/Header.jsp references would have to be changed to ../../Header.jsp, etc. I know I can't get away from the /jsp mapping completely because we have URLs and HTTP redirects which depend on it. Here is the quick and dirty jspc ant target I created: jspc srcdir=${TOP}/web/html/jsp uribase=${TOP}/web/html/jsp uriroot=${TOP}/web/html/jsp destdir=${TMP_DIR}/WEB-INF/src compiler=jasper41 verbose=9 include name=*.jsp/ classpath !--todo: including all the tomcat jars, overkill i know...-- fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\bin include name=*.jar/ /fileset fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\common\endorsed include name=*.jar/ /fileset fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\common\lib include name=*.jar/ /fileset fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\shared\lib include name=*.jar/ /fileset fileset dir=C:\Program Files\Apache Group\Tomcat 4.1\server\lib include name=*.jar/ /fileset !-- project classes and external 3rd party jar files -- pathelement path=${CLASS_DIR}/ filelist refid=active.external.jar.filelist/ /classpath /jspc Thanks for any advice, -Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to PreCompile JSPs
Murali schrieb: Hi , Can you someone provide me some information on how to precompile JSPs (probably thousands of JSPs) ? Regards, Murali http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Precompile jsps into work directory
Never mind. I searched the list again and found the answer. Though I haven't tried it, yet, it looks like with the proper arguments (output directory, package name, etc.) to JSPC, you can manipulate it to compile the jsps to the work directory and not have to insert the servlet definition fragments in web.xml. This seems like a task which should be automated through an option in the JSPC task. Why? Suppose that I have a WAR file which I would like to deploy on multiple application servers. Each app server may have its own jsp compiler. I don't see why I should have to build separate WAR files in order to precompile jsps for each application server. Ideally, I could build one WAR file and then precompile for each application server. Scott From: Scott Goldstein Sent: Thursday, September 29, 2005 8:47 PM To: 'tomcat-user@jakarta.apache.org' Subject: Precompile jsps into work directory I've searched the archives and couldn't find an answer to this question. The Tomcat manual suggests using Jspc to precompile jsps. The method it describes precompiles the jsps and creates stub servlet definitions for each jsp to place within web.xml. Instead of this method, I would like to simply precompile the jsps into the tomcat work directory. I know I can do this by requesting each jsp with the precompile request parameter, but I'd like a command line/Ant method of doing this without having to run the server. Has anyone tried/been successful in doing this? Thanks. Scott
Re: Jsps
if you haven't reconfigured your resin - actually nothing. just drop your war file in webapps. if you did, you have to do the same you did in httpd.sh now in catalina.sh. More or less. leon On 9/29/05, Prema Kumar [EMAIL PROTECTED] wrote: Hi, I have an Application which is J2EE Architecture and working with Resin 2.1.6 Now we are trying to bring up my application using Tomcat. What necessary modifications needs to be done in Tomcat web.xml file and server.xml Prem The information in this mail is confidential and is intended solely for the addressee. Access to this mail by anyone else is unauthorized. Any copying or further distribution beyond the original recipient is not intended and may be unlawful. The opinion expressed in this mail is that of the sender and does not necessarily reflect that of Titan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to PreCompile JSPs
Hi , Can you someone provide me some information on how to precompile JSPs (probably thousands of JSPs) ? Regards, Murali
Re: How to PreCompile JSPs
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Murali wrote: Hi , Can you someone provide me some information on how to precompile JSPs (probably thousands of JSPs) ? This might help. http://www.rgagnon.com/javadetails/java-0414.html - -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDPAIUikQgpVn8xrARAjqMAJ9zT3FPwhgnXPGyG9XvrAmlptzzBQCeNfz5 9s+G7lFVcWAObuJZ5L0YYSw= =AoqJ -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: How to PreCompile JSPs
From the Tomcat docs: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html -Ursprüngliche Nachricht- Von: Murali [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 29. September 2005 16:54 An: tomcat-user@jakarta.apache.org Betreff: How to PreCompile JSPs Hi , Can you someone provide me some information on how to precompile JSPs (probably thousands of JSPs) ? Regards, Murali - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Precompile jsps into work directory
I've searched the archives and couldn't find an answer to this question. The Tomcat manual suggests using Jspc to precompile jsps. The method it describes precompiles the jsps and creates stub servlet definitions for each jsp to place within web.xml. Instead of this method, I would like to simply precompile the jsps into the tomcat work directory. I know I can do this by requesting each jsp with the precompile request parameter, but I'd like a command line/Ant method of doing this without having to run the server. Has anyone tried/been successful in doing this? Thanks. Scott
Jsps
Hi, I have an Application which is J2EE Architecture and working with Resin 2.1.6 Now we are trying to bring up my application using Tomcat. What necessary modifications needs to be done in Tomcat web.xml file and server.xml Prem The information in this mail is confidential and is intended solely for the addressee. Access to this mail by anyone else is unauthorized. Any copying or further distribution beyond the original recipient is not intended and may be unlawful. The opinion expressed in this mail is that of the sender and does not necessarily reflect that of Titan.
RE: Pre-compiled JSPs?
Hi Tim, Sorry, I'm sure I'm being a bit dense but I seem to be missing something important here. Are the jspf files included (embedded) into the class file when Jasper compiles the jsp files to java? Essentially, the compiled class file will include the original jsp and also the fragment? Thanks for your help! Richard. -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 06 September 2005 17:01 To: Tomcat Users List Subject: Re: Pre-compiled JSPs? There is no need to turn jspf into classes. The jspf are included by real jsp files. Those jsp files are turned into the class files. -Tim Richard Burman wrote: Tim, Is there no way of turning the fragment (jspf) file into .class files or do they need to remain as JSPs? Cheers, Richard. -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 06 September 2005 16:14 To: Tomcat Users List Subject: Re: Pre-compiled JSPs? From the jasper task all the [valid] jsp's are turned into java files and compiled into class files. Those class files need to be a jar file in WEB-INF/lib or inside WEB-INF/classes. The jasper task can also rewrite web.xml so that all the mappings from the JSP -- class file are taken care of. Once all the jsp's are compiled and mapped in web.xml. They can be deleted from the deployment war file (or dir). -Tim Richard Burman wrote: Hi Tim, Yeah, that's my exact issue, except the pages somewhat more complicated than your example. ;o) I've tried renaming one of them to jspf and, unsurprisingly, it has been ignored by the JSP compiler. I'll have to take your word that it would still work in the parent (once the reference had been changed to point to jspf, not jsp) as I don't have a test bed up and running at the moment. Okay, so we've ascertained how to avoid the 'fragments' being compiled because they're effectively not valid JSP pages because they use beans that are never declared within themselves. The 'parent' page will compile because it has all it needs to be compiled but the fragment cannot be compiled without the presence of the parent. Does this mean that I can only include the 'parent' JSPs in my JAR file and included in my web.xml? Do I have to keep the fragments as raw JSPs in my webapp, then? I'd really rather get them all together in a JAR, if possible, which is why I'm on this voyage of discovery! :o) - 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: Pre-compiled JSPs?
Yes, think of jspf like .h files in c. You don't compile .h files, but .c files include .h files at compile time. -Tim Richard Burman wrote: Hi Tim, Sorry, I'm sure I'm being a bit dense but I seem to be missing something important here. Are the jspf files included (embedded) into the class file when Jasper compiles the jsp files to java? Essentially, the compiled class file will include the original jsp and also the fragment? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Pre-compiled JSPs? - Solved. Thanks!
Right, I get it now. Thanks for all your help Tim, Darryl and Nicolas! Happy Tomcat-ing, Richard. -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 07 September 2005 12:15 To: Tomcat Users List Subject: Re: Pre-compiled JSPs? Yes, think of jspf like .h files in c. You don't compile .h files, but .c files include .h files at compile time. -Tim Richard Burman wrote: Hi Tim, Sorry, I'm sure I'm being a bit dense but I seem to be missing something important here. Are the jspf files included (embedded) into the class file when Jasper compiles the jsp files to java? Essentially, the compiled class file will include the original jsp and also the fragment? - 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: Pre-compiled JSPs?
Hi Nicolas, Thanks for your reply, I really appreciate your help. I'm not sure I fully understand your solution. I see now that the webXmlFragment provides a convenient way to generate the XML needed for the Servlets but that have bizarre names. Let's say I have a jsp: /RichardsApp/DoSomething.jsp Running Jasper at it provides a java file: /RichardsApp/DoSomething_jsp.java Then the Servlet definition would be: servlet servlet-nameRichardsApp.DoSomething_jsp/servlet-name servlet-classRichardsApp.DoSomething_jsp/servlet-class /servlet The way to reference my JSP used to be: http://myserver:8080/RichardsApp/DoSomething.jsp What would the new reference be? http://myserver:8080/RichardsApp/DoSomething_jsp or http://myserver:8080/RichardsApp/DoSomething Have I missed something obvious? Thanks for your help! Richard. -Original Message- From: Karasek-XID, Nicolas [mailto:[EMAIL PROTECTED] Sent: 05 September 2005 12:04 To: Tomcat Users List Subject: RE: Pre-compiled JSPs? Hi, You need to insert in your web.xml the reference to the precompiled servlets. Jasper can generate a web.xml fragment when turning JSP into servlets. You can then insert the fragment into your web.xml Something like this with ant: !-- turn jsp into servlets -- jasper2 verbose=0 package=your.package validateXml=false uriroot=${webapp.path} webXmlFragment=generated-web.xml outputDir=${webapp.path}/WEB-INF/src / !-- Load the precompiled snippet into a property -- loadfile property=precompiled srcFile= generated-web.xml encoding=ISO-8859-1 / !-- Now replace the web.xml with a predefined snippet -- !-- copy web.xml -- replace file=web.xml value=${precompiled} replacetokenlt;!-- jsp-servlets will be inserted here - do not remove this line --gt;/replacetoken /replace -Original Message- From: Richard Burman [mailto:[EMAIL PROTECTED] Sent: lundi 5 septembre 2005 12:44 To: Tomcat Users List Subject: Pre-compiled JSPs? Hi everyone, I have a fairly elaborate problem but hope that some people out there can help with it. I am trying to take a large webapp and create pre-compiled JSPs. We already compile the java into class files, then package in JARs, then finally a WAR, but we would like to be able to package the JSPs into a neat package, too. The first hurdle was trying to circumvent the issue of when JSPs include each other and a bean is used in both JSPs but can only be declared once when the JSPs are combined. Thus, you have to leave out the bean declaration in the second JSP but then it will not compile on it's own because it has no knowledge of the bean. Fortunately, in the recent Tomcat releases, it's possible to use the flag 'errorOnUseBeanInvalidClassAttribute' to ignore this problem. Once the JSPs have been turned into Java classes by Jasper2, it's not too hard to compile them into class files. But how do you deploy these compiled classes so that Tomcat knows to use them? If the Whatever.jsp file doesn't exist, how does Tomcat know where or how to find the compiled JSP file? Should I put them in a JAR and deploy somewhere? Do I need to change the web.xml or similar to inform Tomcat about this? If anyone has any suggestions, advice or solutions to this, I would be eternally grateful! :) Thanks, Richard. - 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: Pre-compiled JSPs?
What you see looks like normal jasper name mangling of generated pages. You use: http://myserver:8080/RichardsApp/DoSomething.jsp I presume there is also a generated mapping entry, that you may have overlooked: servlet-mapping servlet-nameRichardsApp.DoSomething_jsp/servlet-name url-pattern/DoSomething.jsp/url-pattern /servlet-mapping Richard Burman wrote: Hi Nicolas, Thanks for your reply, I really appreciate your help. I'm not sure I fully understand your solution. I see now that the webXmlFragment provides a convenient way to generate the XML needed for the Servlets but that have bizarre names. Let's say I have a jsp: /RichardsApp/DoSomething.jsp Running Jasper at it provides a java file: /RichardsApp/DoSomething_jsp.java Then the Servlet definition would be: servlet servlet-nameRichardsApp.DoSomething_jsp/servlet-name servlet-classRichardsApp.DoSomething_jsp/servlet-class /servlet The way to reference my JSP used to be: http://myserver:8080/RichardsApp/DoSomething.jsp What would the new reference be? http://myserver:8080/RichardsApp/DoSomething_jsp or http://myserver:8080/RichardsApp/DoSomething Have I missed something obvious? Thanks for your help! Richard. -- Darryl L. Miles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Pre-compiled JSPs?
Eureka! I get it now. :) Indeed, I hadn't noticed the servlet-mapping section down the bottom. I looked at the xml and foolishly assumed that it merely repeated all the way to the bottom. Now that you've pointed out that, it all makes sense. Thanks for all your help, I shall have a play and hopefully have new, sparkly, compiled JSPs soon! Richard. -Original Message- From: Darryl L. Miles [mailto:[EMAIL PROTECTED] Sent: 06 September 2005 12:33 To: Tomcat Users List Subject: Re: Pre-compiled JSPs? What you see looks like normal jasper name mangling of generated pages. You use: http://myserver:8080/RichardsApp/DoSomething.jsp I presume there is also a generated mapping entry, that you may have overlooked: servlet-mapping servlet-nameRichardsApp.DoSomething_jsp/servlet-name url-pattern/DoSomething.jsp/url-pattern /servlet-mapping Richard Burman wrote: Hi Nicolas, Thanks for your reply, I really appreciate your help. I'm not sure I fully understand your solution. I see now that the webXmlFragment provides a convenient way to generate the XML needed for the Servlets but that have bizarre names. Let's say I have a jsp: /RichardsApp/DoSomething.jsp Running Jasper at it provides a java file: /RichardsApp/DoSomething_jsp.java Then the Servlet definition would be: servlet servlet-nameRichardsApp.DoSomething_jsp/servlet-name servlet-classRichardsApp.DoSomething_jsp/servlet-class /servlet The way to reference my JSP used to be: http://myserver:8080/RichardsApp/DoSomething.jsp What would the new reference be? http://myserver:8080/RichardsApp/DoSomething_jsp or http://myserver:8080/RichardsApp/DoSomething Have I missed something obvious? Thanks for your help! Richard. -- Darryl L. Miles - 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: Pre-compiled JSPs?
Ah, I thought it was all too good to be true. Now that I have an understanding of how to put it all together, I have given it a go but hit another snag. Remember the use of the 'errorOnUseBeanInvalidClassAttribute' flag? Well, of course, that means that when the JSPs were turned into Java classes, they ignored the fact that the bean wasn't declared in that JSP and generated the classes regardless. What about when you try to compile the Java into a .class file? Suddenly, the Java is missing a variable declaration and cannot compile the class. Is there a way round this? If not, what's the point in including the flag?! Yours, Confused of UK. ;o) -Original Message- From: Richard Burman [mailto:[EMAIL PROTECTED] Sent: 06 September 2005 13:50 To: Tomcat Users List Subject: RE: Pre-compiled JSPs? Eureka! I get it now. :) Indeed, I hadn't noticed the servlet-mapping section down the bottom. I looked at the xml and foolishly assumed that it merely repeated all the way to the bottom. Now that you've pointed out that, it all makes sense. Thanks for all your help, I shall have a play and hopefully have new, sparkly, compiled JSPs soon! Richard. -Original Message- From: Darryl L. Miles [mailto:[EMAIL PROTECTED] Sent: 06 September 2005 12:33 To: Tomcat Users List Subject: Re: Pre-compiled JSPs? What you see looks like normal jasper name mangling of generated pages. You use: http://myserver:8080/RichardsApp/DoSomething.jsp I presume there is also a generated mapping entry, that you may have overlooked: servlet-mapping servlet-nameRichardsApp.DoSomething_jsp/servlet-name url-pattern/DoSomething.jsp/url-pattern /servlet-mapping Richard Burman wrote: Hi Nicolas, Thanks for your reply, I really appreciate your help. I'm not sure I fully understand your solution. I see now that the webXmlFragment provides a convenient way to generate the XML needed for the Servlets but that have bizarre names. Let's say I have a jsp: /RichardsApp/DoSomething.jsp Running Jasper at it provides a java file: /RichardsApp/DoSomething_jsp.java Then the Servlet definition would be: servlet servlet-nameRichardsApp.DoSomething_jsp/servlet-name servlet-classRichardsApp.DoSomething_jsp/servlet-class /servlet The way to reference my JSP used to be: http://myserver:8080/RichardsApp/DoSomething.jsp What would the new reference be? http://myserver:8080/RichardsApp/DoSomething_jsp or http://myserver:8080/RichardsApp/DoSomething Have I missed something obvious? Thanks for your help! Richard. -- Darryl L. Miles - 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: Pre-compiled JSPs?
errorOnUseBeanInvalidClassAttribute (IIRC) is a test when jsp:useBean is used without a default constructor being available. If you are using include files which were as meant as compile time include fragments, rename them (the include files) to jspf and they will be ignored by the jsp compiler. -Tim Richard Burman wrote: Ah, I thought it was all too good to be true. Now that I have an understanding of how to put it all together, I have given it a go but hit another snag. Remember the use of the 'errorOnUseBeanInvalidClassAttribute' flag? Well, of course, that means that when the JSPs were turned into Java classes, they ignored the fact that the bean wasn't declared in that JSP and generated the classes regardless. What about when you try to compile the Java into a .class file? Suddenly, the Java is missing a variable declaration and cannot compile the class. Is there a way round this? If not, what's the point in including the flag?! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Pre-compiled JSPs?
Sorry, I don't understand. How will my JSP compile at all if a section (fragment) is ignored and, presumably, omitted from the resulting java file? -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 06 September 2005 15:05 To: Tomcat Users List Subject: Re: Pre-compiled JSPs? errorOnUseBeanInvalidClassAttribute (IIRC) is a test when jsp:useBean is used without a default constructor being available. If you are using include files which were as meant as compile time include fragments, rename them (the include files) to jspf and they will be ignored by the jsp compiler. -Tim Richard Burman wrote: Ah, I thought it was all too good to be true. Now that I have an understanding of how to put it all together, I have given it a go but hit another snag. Remember the use of the 'errorOnUseBeanInvalidClassAttribute' flag? Well, of course, that means that when the JSPs were turned into Java classes, they ignored the fact that the bean wasn't declared in that JSP and generated the classes regardless. What about when you try to compile the Java into a .class file? Suddenly, the Java is missing a variable declaration and cannot compile the class. Is there a way round this? If not, what's the point in including the flag?! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
compile precompile jsps at runtime
Hi all, Is there a way to compile precompiled jsp at runtime? i.e., I want to precompiled my jsp before deployment, but after they are deployed I still want to make changes to the jsps that will take effect immediately. I want to be able to change jsp and see the changes immediately although they are precompiled Does anyone knows how to do it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pre-compiled JSPs?
For example: File a.jsp % String worldVar = null; % [EMAIL PROTECTED] file='b.jsp'% Hello %=worldVar% File b.jsp %worldVar = world% Notice b.jsp will not precompile. But then again - no one should be calling b.jsp since its not a jsp - its a jsp fragment. It should be calld b.jspf. I am guessing - your pages have a similar issue. -Tim Richard Burman wrote: Sorry, I don't understand. How will my JSP compile at all if a section (fragment) is ignored and, presumably, omitted from the resulting java file? -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 06 September 2005 15:05 To: Tomcat Users List Subject: Re: Pre-compiled JSPs? errorOnUseBeanInvalidClassAttribute (IIRC) is a test when jsp:useBean is used without a default constructor being available. If you are using include files which were as meant as compile time include fragments, rename them (the include files) to jspf and they will be ignored by the jsp compiler. -Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: compile precompile jsps at runtime
Can't with tomcat out of the box. -Tim Zachi Hazan wrote: Hi all, Is there a way to compile precompiled jsp at runtime? i.e., I want to precompiled my jsp before deployment, but after they are deployed I still want to make changes to the jsps that will take effect immediately. I want to be able to change jsp and see the changes immediately although they are precompiled Does anyone knows how to do it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Pre-compiled JSPs?
Hi Tim, Yeah, that's my exact issue, except the pages somewhat more complicated than your example. ;o) I've tried renaming one of them to jspf and, unsurprisingly, it has been ignored by the JSP compiler. I'll have to take your word that it would still work in the parent (once the reference had been changed to point to jspf, not jsp) as I don't have a test bed up and running at the moment. Okay, so we've ascertained how to avoid the 'fragments' being compiled because they're effectively not valid JSP pages because they use beans that are never declared within themselves. The 'parent' page will compile because it has all it needs to be compiled but the fragment cannot be compiled without the presence of the parent. Does this mean that I can only include the 'parent' JSPs in my JAR file and included in my web.xml? Do I have to keep the fragments as raw JSPs in my webapp, then? I'd really rather get them all together in a JAR, if possible, which is why I'm on this voyage of discovery! :o) I really appreciate your help with this. Regards, Richard. -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 06 September 2005 15:57 To: Tomcat Users List Subject: Re: Pre-compiled JSPs? For example: File a.jsp % String worldVar = null; % [EMAIL PROTECTED] file='b.jsp'% Hello %=worldVar% File b.jsp %worldVar = world% Notice b.jsp will not precompile. But then again - no one should be calling b.jsp since its not a jsp - its a jsp fragment. It should be calld b.jspf. I am guessing - your pages have a similar issue. -Tim Richard Burman wrote: Sorry, I don't understand. How will my JSP compile at all if a section (fragment) is ignored and, presumably, omitted from the resulting java file? -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 06 September 2005 15:05 To: Tomcat Users List Subject: Re: Pre-compiled JSPs? errorOnUseBeanInvalidClassAttribute (IIRC) is a test when jsp:useBean is used without a default constructor being available. If you are using include files which were as meant as compile time include fragments, rename them (the include files) to jspf and they will be ignored by the jsp compiler. -Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: compile precompile jsps at runtime
So, how can I do it with tomcat not out of the box? Tim Funk wrote: Can't with tomcat out of the box. -Tim Zachi Hazan wrote: Hi all, Is there a way to compile precompiled jsp at runtime? i.e., I want to precompiled my jsp before deployment, but after they are deployed I still want to make changes to the jsps that will take effect immediately. I want to be able to change jsp and see the changes immediately although they are precompiled Does anyone knows how to do it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pre-compiled JSPs?
From the jasper task all the [valid] jsp's are turned into java files and compiled into class files. Those class files need to be a jar file in WEB-INF/lib or inside WEB-INF/classes. The jasper task can also rewrite web.xml so that all the mappings from the JSP -- class file are taken care of. Once all the jsp's are compiled and mapped in web.xml. They can be deleted from the deployment war file (or dir). -Tim Richard Burman wrote: Hi Tim, Yeah, that's my exact issue, except the pages somewhat more complicated than your example. ;o) I've tried renaming one of them to jspf and, unsurprisingly, it has been ignored by the JSP compiler. I'll have to take your word that it would still work in the parent (once the reference had been changed to point to jspf, not jsp) as I don't have a test bed up and running at the moment. Okay, so we've ascertained how to avoid the 'fragments' being compiled because they're effectively not valid JSP pages because they use beans that are never declared within themselves. The 'parent' page will compile because it has all it needs to be compiled but the fragment cannot be compiled without the presence of the parent. Does this mean that I can only include the 'parent' JSPs in my JAR file and included in my web.xml? Do I have to keep the fragments as raw JSPs in my webapp, then? I'd really rather get them all together in a JAR, if possible, which is why I'm on this voyage of discovery! :o) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: compile precompile jsps at runtime
A lot of custom coding on your own. You'd need a filter which traps all your precompiled servlet mappings and then checks to see of the jsp the file was mapped to has changed. Then you'd need to somehow manage compiling the JSP and loading the class file while ignoring the existing mapping. In a nutshell ... not pretty. Or you can have tomcat run in production mode (for the jsp servlet) and all the jsp's get compiled in the background when they are changed. But this relies on jsps NOT being precompiled. -Tim Zachi Hazan wrote: So, how can I do it with tomcat not out of the box? Tim Funk wrote: Can't with tomcat out of the box. -Tim Zachi Hazan wrote: Hi all, Is there a way to compile precompiled jsp at runtime? i.e., I want to precompiled my jsp before deployment, but after they are deployed I still want to make changes to the jsps that will take effect immediately. I want to be able to change jsp and see the changes immediately although they are precompiled Does anyone knows how to do it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: compile precompile jsps at runtime
From: Zachi Hazan [mailto:[EMAIL PROTECTED] Subject: Re: compile precompile jsps at runtime So, how can I do it with tomcat not out of the box? One approach would be to cheat! Tomcat compiles the page when the page is first invoked. So, you could for example define a special parameter as part of the query string (such as 'precompile=true') and modify the code for each page so that if the parameter is found, the page does nothing. However, Tomcat has still compiled it. Then all you need is some kind of script (using cURL or a similar tool) that fetches each page and adds a '?precompile=true' suffix. Deploy, run the script, and all your pages are precompiled. Low-tech, I agree, and I suspect others on the list will be able to come up with a better approach. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Pre-compiled JSPs?
Tim, Is there no way of turning the fragment (jspf) file into .class files or do they need to remain as JSPs? Cheers, Richard. -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 06 September 2005 16:14 To: Tomcat Users List Subject: Re: Pre-compiled JSPs? From the jasper task all the [valid] jsp's are turned into java files and compiled into class files. Those class files need to be a jar file in WEB-INF/lib or inside WEB-INF/classes. The jasper task can also rewrite web.xml so that all the mappings from the JSP -- class file are taken care of. Once all the jsp's are compiled and mapped in web.xml. They can be deleted from the deployment war file (or dir). -Tim Richard Burman wrote: Hi Tim, Yeah, that's my exact issue, except the pages somewhat more complicated than your example. ;o) I've tried renaming one of them to jspf and, unsurprisingly, it has been ignored by the JSP compiler. I'll have to take your word that it would still work in the parent (once the reference had been changed to point to jspf, not jsp) as I don't have a test bed up and running at the moment. Okay, so we've ascertained how to avoid the 'fragments' being compiled because they're effectively not valid JSP pages because they use beans that are never declared within themselves. The 'parent' page will compile because it has all it needs to be compiled but the fragment cannot be compiled without the presence of the parent. Does this mean that I can only include the 'parent' JSPs in my JAR file and included in my web.xml? Do I have to keep the fragments as raw JSPs in my webapp, then? I'd really rather get them all together in a JAR, if possible, which is why I'm on this voyage of discovery! :o) - 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: Pre-compiled JSPs?
There is no need to turn jspf into classes. The jspf are included by real jsp files. Those jsp files are turned into the class files. -Tim Richard Burman wrote: Tim, Is there no way of turning the fragment (jspf) file into .class files or do they need to remain as JSPs? Cheers, Richard. -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 06 September 2005 16:14 To: Tomcat Users List Subject: Re: Pre-compiled JSPs? From the jasper task all the [valid] jsp's are turned into java files and compiled into class files. Those class files need to be a jar file in WEB-INF/lib or inside WEB-INF/classes. The jasper task can also rewrite web.xml so that all the mappings from the JSP -- class file are taken care of. Once all the jsp's are compiled and mapped in web.xml. They can be deleted from the deployment war file (or dir). -Tim Richard Burman wrote: Hi Tim, Yeah, that's my exact issue, except the pages somewhat more complicated than your example. ;o) I've tried renaming one of them to jspf and, unsurprisingly, it has been ignored by the JSP compiler. I'll have to take your word that it would still work in the parent (once the reference had been changed to point to jspf, not jsp) as I don't have a test bed up and running at the moment. Okay, so we've ascertained how to avoid the 'fragments' being compiled because they're effectively not valid JSP pages because they use beans that are never declared within themselves. The 'parent' page will compile because it has all it needs to be compiled but the fragment cannot be compiled without the presence of the parent. Does this mean that I can only include the 'parent' JSPs in my JAR file and included in my web.xml? Do I have to keep the fragments as raw JSPs in my webapp, then? I'd really rather get them all together in a JAR, if possible, which is why I'm on this voyage of discovery! :o) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Pre-compiled JSPs?
Hi everyone, I have a fairly elaborate problem but hope that some people out there can help with it. I am trying to take a large webapp and create pre-compiled JSPs. We already compile the java into class files, then package in JARs, then finally a WAR, but we would like to be able to package the JSPs into a neat package, too. The first hurdle was trying to circumvent the issue of when JSPs include each other and a bean is used in both JSPs but can only be declared once when the JSPs are combined. Thus, you have to leave out the bean declaration in the second JSP but then it will not compile on it's own because it has no knowledge of the bean. Fortunately, in the recent Tomcat releases, it's possible to use the flag 'errorOnUseBeanInvalidClassAttribute' to ignore this problem. Once the JSPs have been turned into Java classes by Jasper2, it's not too hard to compile them into class files. But how do you deploy these compiled classes so that Tomcat knows to use them? If the Whatever.jsp file doesn't exist, how does Tomcat know where or how to find the compiled JSP file? Should I put them in a JAR and deploy somewhere? Do I need to change the web.xml or similar to inform Tomcat about this? If anyone has any suggestions, advice or solutions to this, I would be eternally grateful! :) Thanks, Richard. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Pre-compiled JSPs?
Hi, You need to insert in your web.xml the reference to the precompiled servlets. Jasper can generate a web.xml fragment when turning JSP into servlets. You can then insert the fragment into your web.xml Something like this with ant: !-- turn jsp into servlets -- jasper2 verbose=0 package=your.package validateXml=false uriroot=${webapp.path} webXmlFragment=generated-web.xml outputDir=${webapp.path}/WEB-INF/src / !-- Load the precompiled snippet into a property -- loadfile property=precompiled srcFile= generated-web.xml encoding=ISO-8859-1 / !-- Now replace the web.xml with a predefined snippet -- !-- copy web.xml -- replace file=web.xml value=${precompiled} replacetokenlt;!-- jsp-servlets will be inserted here - do not remove this line --gt;/replacetoken /replace -Original Message- From: Richard Burman [mailto:[EMAIL PROTECTED] Sent: lundi 5 septembre 2005 12:44 To: Tomcat Users List Subject: Pre-compiled JSPs? Hi everyone, I have a fairly elaborate problem but hope that some people out there can help with it. I am trying to take a large webapp and create pre-compiled JSPs. We already compile the java into class files, then package in JARs, then finally a WAR, but we would like to be able to package the JSPs into a neat package, too. The first hurdle was trying to circumvent the issue of when JSPs include each other and a bean is used in both JSPs but can only be declared once when the JSPs are combined. Thus, you have to leave out the bean declaration in the second JSP but then it will not compile on it's own because it has no knowledge of the bean. Fortunately, in the recent Tomcat releases, it's possible to use the flag 'errorOnUseBeanInvalidClassAttribute' to ignore this problem. Once the JSPs have been turned into Java classes by Jasper2, it's not too hard to compile them into class files. But how do you deploy these compiled classes so that Tomcat knows to use them? If the Whatever.jsp file doesn't exist, how does Tomcat know where or how to find the compiled JSP file? Should I put them in a JAR and deploy somewhere? Do I need to change the web.xml or similar to inform Tomcat about this? If anyone has any suggestions, advice or solutions to this, I would be eternally grateful! :) Thanks, Richard. - 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]
tomcat 5.5.9 not recompiling JSPs
Hello, I have a problem with tomcat 5.5.9 - for some reason tomcat does not recompile JSPs after I redeploy the application using manager application. There's no error message in the logs, tomcat has write access to work directory and it compiles new jsps. It simply does not recompile the existing ones. Have you seen such behaviour in the past? Thanks in advance, Michal. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 5.5.9 not recompiling JSPs
I saw this just today. I did some digging and realized that my application context file, usually found under $ CATALNA_HOME/conf/Catalina/localhost was messed up. After I fixed whatever problem it was, I was able to deploy again. Michal Kwiatek wrote: Hello, I have a problem with tomcat 5.5.9 - for some reason tomcat does not recompile JSPs after I redeploy the application using manager application. There's no error message in the logs, tomcat has write access to work directory and it compiles new jsps. It simply does not recompile the existing ones. Have you seen such behaviour in the past? Thanks in advance, Michal. - 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: tomcat 5.5.9 not recompiling JSPs
Well, I don't have a context.xml file! I'm not using one for this app, and AFAK, tomcat creates context automatically in memory for the application. Anyway, my context.xml file is not corrupted, because there's none. Any other idea perhaps? Thanks, Michal. -Original Message- From: Sean Rowe [mailto:[EMAIL PROTECTED] Sent: Monday, August 22, 2005 8:32 AM To: Tomcat Users List Subject: Re: tomcat 5.5.9 not recompiling JSPs I saw this just today. I did some digging and realized that my application context file, usually found under $ CATALNA_HOME/conf/Catalina/localhost was messed up. After I fixed whatever problem it was, I was able to deploy again. Michal Kwiatek wrote: Hello, I have a problem with tomcat 5.5.9 - for some reason tomcat does not recompile JSPs after I redeploy the application using manager application. There's no error message in the logs, tomcat has write access to work directory and it compiles new jsps. It simply does not recompile the existing ones. Have you seen such behaviour in the past? Thanks in advance, Michal. - 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]
tomcat 5.5.9 not recompiling JSPs
I've just noticed that on tomcat 5.5.9 JSPs unpacked by tomcat from a deployed war file have creation dates pointing to the time when the files were first created. On tomcat 5.0.28 unpacked files have creation dates pointing to time when they were unpacked (i.e created on this file system). Perhaps this is the reason for strange problems with JSP recompilation? This problem comes and goes after I restart tomcat. What might be the reason? Michal. Michal Kwiatek wrote: Hello, I have a problem with tomcat 5.5.9 - for some reason tomcat does not recompile JSPs after I redeploy the application using manager application. There's no error message in the logs, tomcat has write access to work directory and it compiles new jsps. It simply does not recompile the existing ones. Have you seen such behaviour in the past? Thanks in advance, Michal. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 5.5.9 not recompiling JSPs
I had a similar problem, I wouldn't go so far as to say I have a solution, but fiddling with the tomcat/conf/web.xml file to have the following in its jsp section seemed to help a bit (currently used for our demo level systems): servlet servlet-namejsp/servlet-name servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class init-param param-namefork/param-name param-valuefalse/param-value /init-param init-param param-namedevelopment/param-name param-valuefalse/param-value /init-param init-param param-namereloading/param-name param-valuetrue/param-value /init-param init-param param-namecheckInterval/param-name param-value120/param-value /init-param init-param param-namexpoweredBy/param-name param-valuefalse/param-value /init-param load-on-startup3/load-on-startup /servlet Although to be honest I suspect that the best solution for production boxes is to pre-compile all jsps into the war file anyway. Mark On Mon, 2005-08-22 at 14:24 +0200, Michal Kwiatek wrote: I've just noticed that on tomcat 5.5.9 JSPs unpacked by tomcat from a deployed war file have creation dates pointing to the time when the files were first created. On tomcat 5.0.28 unpacked files have creation dates pointing to time when they were unpacked (i.e created on this file system). Perhaps this is the reason for strange problems with JSP recompilation? This email has been scanned for all known viruses by the MessageLabs SkyScan service. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 5.5.9 not recompiling JSPs
Mark Hagger wrote: ... Although to be honest I suspect that the best solution for production boxes is to pre-compile all jsps into the war file anyway. Is this possible? Don't different containers store the compiled pages in different places, with different names? Paul Singleton -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.10.13/78 - Release Date: 19/Aug/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat 5.5.9 not recompiling JSPs
compiled pages are just classes, and so long as they are mapped correctly in the web.xml you'll be ok. -Original Message- From: Paul Singleton [mailto:[EMAIL PROTECTED] Sent: 22 August 2005 15:13 To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: tomcat 5.5.9 not recompiling JSPs Mark Hagger wrote: ... Although to be honest I suspect that the best solution for production boxes is to pre-compile all jsps into the war file anyway. Is this possible? Don't different containers store the compiled pages in different places, with different names? Paul Singleton -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.10.13/78 - Release Date: 19/Aug/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: tomcat 5.5.9 not recompiling JSPs
You're both right. But when you run your Webapplication under non-tomcat container you need the tomcat libraries. Also when going to dfferent versions of tomcat, so e.g. from 4 to 5.5 you might get compatibility issues. Bernhard -Ursprüngliche Nachricht- Von: Allistair Crossley [mailto:[EMAIL PROTECTED] Gesendet: Montag, 22. August 2005 16:14 An: Tomcat Users List Cc: [EMAIL PROTECTED] Betreff: RE: tomcat 5.5.9 not recompiling JSPs compiled pages are just classes, and so long as they are mapped correctly in the web.xml you'll be ok. -Original Message- From: Paul Singleton [mailto:[EMAIL PROTECTED] Sent: 22 August 2005 15:13 To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: tomcat 5.5.9 not recompiling JSPs Mark Hagger wrote: ... Although to be honest I suspect that the best solution for production boxes is to pre-compile all jsps into the war file anyway. Is this possible? Don't different containers store the compiled pages in different places, with different names? Paul Singleton -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.10.13/78 - Release Date: 19/Aug/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat 5.5.9 not recompiling JSPs
Thanks for the hint - I'm checking it and it's been OK up to now. Since the behaviour was not deterministic in the past, I have to test it some more - I'll do it tomorrow. One more question: was it not deterministic (meaning that sometimes it worked and sometimes did not) in your case too? If so, we should signal it as a bug... In my case, the precompiled classes for jsps under ${CATALINA_HOME}/work were sometimes not deleted after I undeployed the application. It really looks like a bug to me. Cheers, Michal. -Original Message- From: Mark Hagger [mailto:[EMAIL PROTECTED] Sent: Monday, August 22, 2005 3:21 PM To: Tomcat Users List Subject: Re: tomcat 5.5.9 not recompiling JSPs I had a similar problem, I wouldn't go so far as to say I have a solution, but fiddling with the tomcat/conf/web.xml file to have the following in its jsp section seemed to help a bit (currently used for our demo level systems): servlet servlet-namejsp/servlet-name servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class init-param param-namefork/param-name param-valuefalse/param-value /init-param init-param param-namedevelopment/param-name param-valuefalse/param-value /init-param init-param param-namereloading/param-name param-valuetrue/param-value /init-param init-param param-namecheckInterval/param-name param-value120/param-value /init-param init-param param-namexpoweredBy/param-name param-valuefalse/param-value /init-param load-on-startup3/load-on-startup /servlet Although to be honest I suspect that the best solution for production boxes is to pre-compile all jsps into the war file anyway. Mark On Mon, 2005-08-22 at 14:24 +0200, Michal Kwiatek wrote: I've just noticed that on tomcat 5.5.9 JSPs unpacked by tomcat from a deployed war file have creation dates pointing to the time when the files were first created. On tomcat 5.0.28 unpacked files have creation dates pointing to time when they were unpacked (i.e created on this file system). Perhaps this is the reason for strange problems with JSP recompilation? __ __ This email has been scanned for all known viruses by the MessageLabs SkyScan service. - 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]
SAX warnings when compiling JSPs using Taglibs - 5.0.30
Hi, I don't know when this started to happen but suddenly those warning messages started to show up every time a JSP page is compiled. Has anyone got these message before, if yes how do we get rid of these? ParserUtils: warning org.xml.sax.SAXParseException: URI was not reported to parser for entity [document] ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope URI is absolute: http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope this SYSTEM id is absolute: http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd ParserUtils: warning org.xml.sax.SAXParseException: URI was not reported to parser for entity [dtd] ParserUtils: warning org.xml.sax.SAXParseException: missing system ID, using http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd Here is a snippet from my tld file : ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd; taglib tlib-version1.0/tlib-version jsp-version1.2/jsp-version short-nameflow_taglib/short-name uri/flow_taglib/uri display-nameflow_taglib/display-name descriptionTaglib to simplify flow2 layout/description /taglib and this is how in load the taglib in the JSPs files: [EMAIL PROTECTED] uri=/WEB-INF/tlds/flow_taglib.tld prefix=flow% Thanks -- Jean-Francois Beaulac [EMAIL PROTECTED]
Re: Tomcat 5.5.9 - When JSPs change, gives error org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated
Got mod_jk running; that's not the issue. Another curious piece to this anomaly is that making a change and then restarting server does not head off the error. I have to make the change, access the page (thus generating the error) THEN restart the server and access the page again, at which point the error is corrected. If I change more than one page, I have to access one page, restart the server, access the second page, restart the server again, etc. Why should accessing the page and throwing the error make any difference? Why does restarting the server not help unless the error is thrown first? Can anybody help me with this? It's driving me nuts! On 7/11/05, Craig Dixon [EMAIL PROTECTED] wrote: Another thought that just occurred to me is that the problem could be my use of the mod_jk2 connector. Could this be it? I'd like to use the mod_jk connector, since jk2 is deprecated, but I haven't been able to make it work. I wish I could find some instructions for setting up mod_jk that are as clear and concise as these for mod_jk2: http://mpcon.org/apacheguide/#jsp Any suggestions? On 7/11/05, Craig Dixon [EMAIL PROTECTED] wrote: Yes, I am running JDK 1.5.0_03. Is there any problem between Tomcat and this JDK? On 7/11/05, Tim Diggins [EMAIL PROTECTED] wrote: I don't know the answer, but can you confirm you are either: 1) using jdk 1.5 or 2) using jdk 1.4 (and with the compatibility package for tomcat 5.5) as the compatibility package (as I understand it) addresses xml parser versioning/instantiation issues. -- Tim Craig Dixon wrote: I've encountered a strange problem with my JSPs in Tomcat. Whenever I change one of them, then try to access it from the browser, I get the following error: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.lang.NullPointerException org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.lang.NullPointerException javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source) org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:152) org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:96) org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:750) org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1527) org.apache.jasper.compiler.Validator.validate(Validator.java:1495) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157) org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs. I don't have the foggiest idea what that means, but when I stop and restart Tomcat, everything usually works fine (until the next time I change the file.) I'd send relevant source code, but it seems to happen with every page in multiple applications. I've posted this in several forums and have yet to even get a reply. This is driving me batty! Any ideas? - 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: Tomcat 5.5.9 - When JSPs change, gives error org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated
I don't know the answer, but can you confirm you are either: 1) using jdk 1.5 or 2) using jdk 1.4 (and with the compatibility package for tomcat 5.5) as the compatibility package (as I understand it) addresses xml parser versioning/instantiation issues. -- Tim Craig Dixon wrote: I've encountered a strange problem with my JSPs in Tomcat. Whenever I change one of them, then try to access it from the browser, I get the following error: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.lang.NullPointerException org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.lang.NullPointerException javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source) org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:152) org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:96) org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:750) org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1527) org.apache.jasper.compiler.Validator.validate(Validator.java:1495) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157) org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs. I don't have the foggiest idea what that means, but when I stop and restart Tomcat, everything usually works fine (until the next time I change the file.) I'd send relevant source code, but it seems to happen with every page in multiple applications. I've posted this in several forums and have yet to even get a reply. This is driving me batty! Any ideas? - 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: Tomcat 5.5.9 - When JSPs change, gives error org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated
Yes, I am running JDK 1.5.0_03. Is there any problem between Tomcat and this JDK? On 7/11/05, Tim Diggins [EMAIL PROTECTED] wrote: I don't know the answer, but can you confirm you are either: 1) using jdk 1.5 or 2) using jdk 1.4 (and with the compatibility package for tomcat 5.5) as the compatibility package (as I understand it) addresses xml parser versioning/instantiation issues. -- Tim Craig Dixon wrote: I've encountered a strange problem with my JSPs in Tomcat. Whenever I change one of them, then try to access it from the browser, I get the following error: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.lang.NullPointerException org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.lang.NullPointerException javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source) org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:152) org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:96) org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:750) org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1527) org.apache.jasper.compiler.Validator.validate(Validator.java:1495) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157) org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs. I don't have the foggiest idea what that means, but when I stop and restart Tomcat, everything usually works fine (until the next time I change the file.) I'd send relevant source code, but it seems to happen with every page in multiple applications. I've posted this in several forums and have yet to even get a reply. This is driving me batty! Any ideas? - 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: Tomcat 5.5.9 - When JSPs change, gives error org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated
Another thought that just occurred to me is that the problem could be my use of the mod_jk2 connector. Could this be it? I'd like to use the mod_jk connector, since jk2 is deprecated, but I haven't been able to make it work. I wish I could find some instructions for setting up mod_jk that are as clear and concise as these for mod_jk2: http://mpcon.org/apacheguide/#jsp Any suggestions? On 7/11/05, Craig Dixon [EMAIL PROTECTED] wrote: Yes, I am running JDK 1.5.0_03. Is there any problem between Tomcat and this JDK? On 7/11/05, Tim Diggins [EMAIL PROTECTED] wrote: I don't know the answer, but can you confirm you are either: 1) using jdk 1.5 or 2) using jdk 1.4 (and with the compatibility package for tomcat 5.5) as the compatibility package (as I understand it) addresses xml parser versioning/instantiation issues. -- Tim Craig Dixon wrote: I've encountered a strange problem with my JSPs in Tomcat. Whenever I change one of them, then try to access it from the browser, I get the following error: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.lang.NullPointerException org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.lang.NullPointerException javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source) org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:152) org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:96) org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:750) org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1527) org.apache.jasper.compiler.Validator.validate(Validator.java:1495) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157) org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs. I don't have the foggiest idea what that means, but when I stop and restart Tomcat, everything usually works fine (until the next time I change the file.) I'd send relevant source code, but it seems to happen with every page in multiple applications. I've posted this in several forums and have yet to even get a reply. This is driving me batty! Any ideas? - 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]
Tomcat 5.5.9 - When JSPs change, gives error org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated
I've encountered a strange problem with my JSPs in Tomcat. Whenever I change one of them, then try to access it from the browser, I get the following error: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.lang.NullPointerException org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.lang.NullPointerException javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source) org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:152) org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:96) org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:750) org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1527) org.apache.jasper.compiler.Validator.validate(Validator.java:1495) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157) org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs. I don't have the foggiest idea what that means, but when I stop and restart Tomcat, everything usually works fine (until the next time I change the file.) I'd send relevant source code, but it seems to happen with every page in multiple applications. I've posted this in several forums and have yet to even get a reply. This is driving me batty! Any ideas? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem compiling JSPs with Tomcat as Windows Service
From: Trevor Quinn [mailto:[EMAIL PROTECTED] When I deploy a web application to a Windows 2K server running Tomcat 5.0.28 and JDK 1.5, I see Unable to compile JSP errors on every JSP page, but only when Tomcat is running as a Windows service. When I run Tomcat from the console window, all pages compile and display correctly. Check file permissions on the files Tomcat is trying to access. If you think you might have problems in this area, filemon from http://www.sysinternals.com is an invaluable debugging tool as it can show you the file accesses (and the results) in realtime. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Adding support for JSPs in Apache
Hi, I'm adding support for JSPs on our server, so we can host a human rights search engine (http://www.hurisearch.org/) which is powered by Fast search technology. I assume that it's possible to get JSP pages running in the same manner as PHP pages do on Apache, and I'm wondering if there's a howto somewhere that will explain the steps I need to take to do just that.. Thanks, Morten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem compiling JSPs with Tomcat as Windows Service
Hi, When I deploy a web application to a Windows 2K server running Tomcat 5.0.28 and JDK 1.5, I see Unable to compile JSP errors on every JSP page, but only when Tomcat is running as a Windows service. When I run Tomcat from the console window, all pages compile and display correctly. I had read in another posting that this might have something to do with permissions. It said to make sure JAVA_HOME, TOMCAT_HOME, and PATH were defined as system variables, not user variables. This is the case, and I'm still seeing problems. Another posting recommended moving the Java lib/tools.jar file to the common/lib folder in Tomcat. That didn't seem to help either. Does anyone have any other ideas? Thanks! Trevor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem compiling JSPs with Tomcat as Windows Service
Am Freitag, 1. Juli 2005 22:30 schrieb Trevor Quinn: When I deploy a web application to a Windows 2K server running Tomcat 5.0.28 and JDK 1.5, I see Unable to compile JSP errors on every JSP page, but only when Tomcat is running as a Windows service. When I run Tomcat from the console window, all pages compile and display correctly. I had read in another posting that this might have something to do with permissions. It said to make sure JAVA_HOME, TOMCAT_HOME, and PATH were defined as system variables, not user variables. This is the case, and I'm still seeing problems. Another posting recommended moving the Java lib/tools.jar file to the common/lib folder in Tomcat. That didn't seem to help either. Does anyone have any other ideas? Thanks! Make sure that the account your tomcat service runs under (propably SYSTEM) has the appropriate permissions on the tomcat installation directories. Especially it must be granted writing permissions to the directories where tomcat puts the files created during JSP compilation (i. e. %CATALINA_BASE%\work by default). Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] wildcard servlet mapping also catching jsps
Hi Guys, Having a real ball ache with a requirement. We want to handle any URL with a Spring controller (servlet for those not into Spring). Therefore http://ourserver/wacky/url http://ourserver/something We want coming to our controller. Why? Because we have fancy page lookup and redirect services that the servlet should use to send out the resultant JSP or redirect. We run IIS - JK - Tomcat. To achieve getting arbitrary URLs into our controller we have 1. Mapping in JK's conf, i.e /*=ajp13 to route everything to the ajp13 tomcat worker. 2. Mapping in application web.xml for the controller servlet with mapping /* (everything!) 3. The Spring controller too needs a mapping itself /* but that's not really important I think. So we make one of those requests. And sure enough it gets to our controller servlet. We're happy. Until what happens next. The controller, sends back a JSP view, probably via request forwarding or whatever. However, the web.xml /* mapping to the controller picks up the JSP request/forward whatever, and so the JSP is never run as we're in a loop. Why oh why can't servlet-mapping elements allow for exclusions I don't know. Perhaps someone out there has an amazing idea that will ease the pain here :) Looking forward to solutions if indeed there are any. All the best, Allistair PS: I tried an ugly hack by adding the Tomcat JSP Servlet to my application web.xml and mapping *.jsp to it - did not work. FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT]: Adding content/JSPs on the fly: file.separtor
Hi - I think it would be better to use java.io.File.separator (which will be identical to file.separator, but is clearer and compile-time checked for typos (as opposed to the string file.separator )). Tim egan0019 wrote: When building file path strings, should one always use the System.getProperty(file.separator) return value? Is this to differentiate between Windows(\) and unix/linux/solaris(/ separators? I haven't seen that property before. And, are there any other things I should know about to make my file system accessing code portable? Yes, I am new to java. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Adding content/JSPs on the fly
I'm scheming on a little project, and one of the things I want to be able to do is simply add content to the application. The typical way to add content is also rather static -- add it to the WAR and redeploy. That's not particularly dynamic tho, and doesn't really facilitate changing content from the web app. One of the things I'd like to be able to create on the fly are JSPs that are then served by the container. Now, Kenneth Jensen may have answered my question for me by providing this snippet: ServletContext context = getServletConfig().getServletContext(); String slash = System.getProperty(file.separator); keystore = context.getRealPath(/) + WEB-INF + slash + getInitParameter(keystorefile); The key being the getRealPath(/) code. So, my question is do you think that it's reasonable and fairly portable to leverage that technique to find where on the system a webapp is deployed and use that as a base path to create new resources to be served by the container? I'm aware that it is possible for a web app to be deployed in an unexploded WAR, and I would simply make it a precondition that this not be the case (and for 99% of most systems, it simply isn't an issue). But, shouldn't this pretty much work with most common servlet containers? Thanx for any insight... Regards, Will Hartung ([EMAIL PROTECTED]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Adding content/JSPs on the fly
It sounds reasonable, but probably isn't tested or by design, so probably best to just have a go. Re portability, the best advice I can offer is an old chestnut: read the servlet spec. This is particularly relevant in this case. The spec is generally pretty good at telling you you pretty accurately if (a) what you want to do should/must be supported or (b) what you want do do is forbidden. Of course there are some areas that it does not have a view either way on, but I find it to be an invaluable document - I have it on shortcut from my taskbar and consult it often. It's at least as useful as the javadocs or TC docs. For those of you that don't know where to find it, it's here, under specifications. http://java.sun.com/products/servlet/reference/api/index.html Choose the servlet spec version appropriate to your TC version as described in the table on the tomcat home page: http://jakarta.apache.org/tomcat/index.html Just one more specific point on your note Will - I would have thought if anything that you want it to be a precondition that the webapp NOT be deployed as a war. I've a feeling that if TC explodes the war, then it might not check the exploded FS for changes. Don't take this as gospel though, this is a hazy half-remembered bit of info. -Original Message- From: Will Hartung [mailto:[EMAIL PROTECTED] Sent: Friday 27 May 2005 18:31 To: Tomcat Users List Subject: Adding content/JSPs on the fly I'm scheming on a little project, and one of the things I want to be able to do is simply add content to the application. The typical way to add content is also rather static -- add it to the WAR and redeploy. That's not particularly dynamic tho, and doesn't really facilitate changing content from the web app. One of the things I'd like to be able to create on the fly are JSPs that are then served by the container. Now, Kenneth Jensen may have answered my question for me by providing this snippet: ServletContext context = getServletConfig().getServletContext(); String slash = System.getProperty(file.separator); keystore = context.getRealPath(/) + WEB-INF + slash + getInitParameter(keystorefile); The key being the getRealPath(/) code. So, my question is do you think that it's reasonable and fairly portable to leverage that technique to find where on the system a webapp is deployed and use that as a base path to create new resources to be served by the container? I'm aware that it is possible for a web app to be deployed in an unexploded WAR, and I would simply make it a precondition that this not be the case (and for 99% of most systems, it simply isn't an issue). But, shouldn't this pretty much work with most common servlet containers? Thanx for any insight... Regards, Will Hartung ([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]
[OT]: Adding content/JSPs on the fly: file.separtor
When building file path strings, should one always use the System.getProperty(file.separator) return value? Is this to differentiate between Windows(\) and unix/linux/solaris(/ separators? I haven't seen that property before. And, are there any other things I should know about to make my file system accessing code portable? Yes, I am new to java. On 27 May 2005, Will Hartung wrote: I'm scheming on a little project, and one of the things I want to be able to do is simply add content to the application. The typical way to add content is also rather static -- add it to the WAR and redeploy. That's not particularly dynamic tho, and doesn't really facilitate changing content from the web app. One of the things I'd like to be able to create on the fly are JSPs that are then served by the container. Now, Kenneth Jensen may have answered my question for me by providing this snippet: ServletContext context = getServletConfig().getServletContext(); String slash = System.getProperty(file.separator); keystore = context.getRealPath(/) + WEB-INF + slash + getInitParameter(keystorefile); The key being the getRealPath(/) code. So, my question is do you think that it's reasonable and fairly portable to leverage that technique to find where on the system a webapp is deployed and use that as a base path to create new resources to be served by the container? I'm aware that it is possible for a web app to be deployed in an unexploded WAR, and I would simply make it a precondition that this not be the case (and for 99% of most systems, it simply isn't an issue). But, shouldn't this pretty much work with most common servlet containers? Thanx for any insight... Regards, Will Hartung ([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: Adding content/JSPs on the fly
From: Steve Kirk [EMAIL PROTECTED] Sent: Friday, May 27, 2005 11:44 AM It sounds reasonable, but probably isn't tested or by design, so probably best to just have a go. Re portability, the best advice I can offer is an old chestnut: read the servlet spec. This is particularly relevant in this case. The spec is generally pretty good at telling you you pretty accurately if (a) what you want to do should/must be supported or (b) what you want do do is forbidden. Of course there are some areas that it does not have a view either way on, but I find it to be an invaluable document - I have it on shortcut from my taskbar and consult it often. It's at least as useful as the javadocs or TC docs. For those of you that don't know where to find it, it's here, under specifications. http://java.sun.com/products/servlet/reference/api/index.html Choose the servlet spec version appropriate to your TC version as described in the table on the tomcat home page: http://jakarta.apache.org/tomcat/index.html I'm reasonably familiar with the specification. One of the notable bits about it is simply the fact that within the spec, you're pretty much not guaranteed writeable access to the file system at all (save for a temporary area, and it's simply that -- temporary). But the reality is that most engines give you access to the disk that way. Just one more specific point on your note Will - I would have thought if anything that you want it to be a precondition that the webapp NOT be deployed as a war. I've a feeling that if TC explodes the war, then it might not check the exploded FS for changes. Don't take this as gospel though, this is a hazy half-remembered bit of info. As far as I know, the Servlet spec doesn't have a deployment method outside of a WAR. It's pretty much a container behavior to actually explode the WAR on to the file system, yet, most obviously do for performance reasons. But it does bring up a basic problem, for example, if by some fluke the app is redeployed, all of that new data is blasted away by the WAR..that would be Bad. But I can't see another (easy) way to create JSPs on the fly, or in fact to create any other content that can be served directly the server. It's an annoying nit of the spec, to me, that it doesn't expose this behavior to the developer. For example, unlike EJBs (which has a specified limitation on accessing the disk), the Servlet spec does allow you to access the disk, though perhaps not within the WAR hierarchy. But, there is no way to, say, forward to a static resource that the server can then handle in its own internally optimal way. Rather, I have to open the static resource, determine the content type (I can get that from the Servlet spec), and then feed it into the output stream, when in fact it would simply be easier to do req.serveStatic(/tmp/mynewgraphic.gif) or some such thing, or be able to forward outside of the web app (i.e. to a actual file rather than a URL). Simply, the application structure and such are pretty much isolated from the developer. I can't add anything dynamically to the security domain, for example, which means if I want that kind of capability in my application, I have to essentially implement ALL of the container security -- mapping, role checks, etc. Container security is an all or nothing. Be happy with its limited funcitonality or dump it entirely. So, now if I want dynamic templating in my Webapp, I, technically, have to dump JSP completely and switch to something like Velocity. All of the power of JSP, tag libraries, etc. is gone. I imagine that I could mimic the JSP environment, compile the JSP myself, compile the java myself, load the class myself and feed the output into the standard output stream, but that seems like a silly wheel to reinvent when I have a full container here that DOES THAT ALREADY, doncha think? Mind, I may still just Do It, open up paths to the disk and plonk files and JSPs in place and see what happens, but it's a flaming hoop I wish I didn't have to jump through. Regards, Will Hartung ([EMAIL PROTECTED]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding content/JSPs on the fly
Could you instead store the JSP in a database? Let's say you have a table with the following structure: jsp_nameString jsp_content BLOB jsp_name is your primary key and is literally a JSP name. Now, create a servlet filter that examines the path that was requested and pulls out the file name part... so the path might be /my/app/page1.jsp, you just want the page.jsp part. Now, get the BLOB from the database based on that JSP name. Convert the BLOB to a string and stick it in request, then forward to a JSP that is the following: %=(String)request.getAttribute(theJSPContent)% And that's that. You could create a screen specifically for uploading a JSP and storing it in the database. Would something like this suite your needs? I realize it's not as straight-forward as one might like, but it's not too bad either. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com Will Hartung wrote: From: Steve Kirk [EMAIL PROTECTED] Sent: Friday, May 27, 2005 11:44 AM It sounds reasonable, but probably isn't tested or by design, so probably best to just have a go. Re portability, the best advice I can offer is an old chestnut: read the servlet spec. This is particularly relevant in this case. The spec is generally pretty good at telling you you pretty accurately if (a) what you want to do should/must be supported or (b) what you want do do is forbidden. Of course there are some areas that it does not have a view either way on, but I find it to be an invaluable document - I have it on shortcut from my taskbar and consult it often. It's at least as useful as the javadocs or TC docs. For those of you that don't know where to find it, it's here, under specifications. http://java.sun.com/products/servlet/reference/api/index.html Choose the servlet spec version appropriate to your TC version as described in the table on the tomcat home page: http://jakarta.apache.org/tomcat/index.html I'm reasonably familiar with the specification. One of the notable bits about it is simply the fact that within the spec, you're pretty much not guaranteed writeable access to the file system at all (save for a temporary area, and it's simply that -- temporary). But the reality is that most engines give you access to the disk that way. Just one more specific point on your note Will - I would have thought if anything that you want it to be a precondition that the webapp NOT be deployed as a war. I've a feeling that if TC explodes the war, then it might not check the exploded FS for changes. Don't take this as gospel though, this is a hazy half-remembered bit of info. As far as I know, the Servlet spec doesn't have a deployment method outside of a WAR. It's pretty much a container behavior to actually explode the WAR on to the file system, yet, most obviously do for performance reasons. But it does bring up a basic problem, for example, if by some fluke the app is redeployed, all of that new data is blasted away by the WAR..that would be Bad. But I can't see another (easy) way to create JSPs on the fly, or in fact to create any other content that can be served directly the server. It's an annoying nit of the spec, to me, that it doesn't expose this behavior to the developer. For example, unlike EJBs (which has a specified limitation on accessing the disk), the Servlet spec does allow you to access the disk, though perhaps not within the WAR hierarchy. But, there is no way to, say, forward to a static resource that the server can then handle in its own internally optimal way. Rather, I have to open the static resource, determine the content type (I can get that from the Servlet spec), and then feed it into the output stream, when in fact it would simply be easier to do req.serveStatic(/tmp/mynewgraphic.gif) or some such thing, or be able to forward outside of the web app (i.e. to a actual file rather than a URL). Simply, the application structure and such are pretty much isolated from the developer. I can't add anything dynamically to the security domain, for example, which means if I want that kind of capability in my application, I have to essentially implement ALL of the container security -- mapping, role checks, etc. Container security is an all or nothing. Be happy with its limited funcitonality or dump it entirely. So, now if I want dynamic templating in my Webapp, I, technically, have to dump JSP completely and switch to something like Velocity. All of the power of JSP, tag libraries, etc. is gone. I imagine that I could mimic the JSP environment, compile the JSP myself, compile the java myself, load the class myself and feed the output into the standard output stream, but that seems like a silly wheel to reinvent when I have a full container here that DOES THAT ALREADY, doncha think? Mind, I may still just Do It, open up paths to the disk and plonk files and JSPs in place and see what happens, but it's a flaming hoop
Re: Adding content/JSPs on the fly
From: Frank W. Zammetti [EMAIL PROTECTED] Sent: Friday, May 27, 2005 1:04 PM Could you instead store the JSP in a database? ... snip ... Now, get the BLOB from the database based on that JSP name. Convert the BLOB to a string and stick it in request, then forward to a JSP that is the following: %=(String)request.getAttribute(theJSPContent)% If all I was interested in was displaying static data, then yes. But if I wanted access to the actual templating ability of JSP, then that doesn't help. Look at it this way. Let's say that I were using Velocity for templating instead of JSP. And let's say I have a VelocityServlet to handle it, and some url is mapped, say mywebapp/vt. So, for the HomePage Velocity template, the URL would be: http://host.com/mywebapp/vt/HomePage The Servlet gets the request, strips off the HomePage, finds the HomePage template file (or database record), fires up Velocity, renders it and spits it out response.getOutputStream. But here's the deal. I had to write the mapping code, the fetching code, the rendering code (at least the call to the renderer), and the output code. Velocity supports this, all well and good, it's not really a horrible problem. The detail, though, is that I have essentially duplicated a large chunk of what Tomcat and any compliant servlet container ALREADY provides. I had to reinvent that wheel. Doesn't that seem like a waste of time to you? Now, clearly, Tomcat implements a JSPServlet. The Jasper project is simply that. Identical pretty much to a VelocityServlet. I can tie *.vm to VelocityServlet, and they work identically to JSPs in pretty much every way and form. JSPs aren't anything special, in the big scheme of things (they ARE more complicated, however). So, if I wanted to provide the capability of dynamic JSPs (i.e. JSPs served from some source other than the WAR and webapp, say a database or a file outside of the hierarchy), I essentially have to bundle and refactor Jasper into my webapp. When I deploy my webapp on to a stock Tomcat (or, ideally, any other compliant container), the user now gets two copies of Jasper -- the installed version and my version in the webapp. Doesn't that seem redundant? It just seems like a painful hoop to jump through. I'd like to better leverage the container than how it will let me now, essentially tap in to how it gets its resources, and I'd like that to be possible through the Servlet API, via, say, a Resource Listener or somesuch thing. Regards, Will Hartung ([EMAIL PROTECTED]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Adding content/JSPs on the fly
OK glad you've got that off yr chest ;) I can sort of see yr point, but these are not issues that have troubled me personally. I tend to look at TC from the point of view of I'm just pleased that someone else wrote TC for me for free and it works v well at what it is designed for. Every product has limitations, and can't cover every feature that we would all like, and I find it amazing that TC has so few limitations given that it is produced on the backs of volunteer contributions. I'd rather have one TC that 2 IIS's ;) If you're serious about pursuing a solution for this, Maybe there's an alternative, how about this. (It's not pretty but saves some of the reinvention that you describe). Let's say it's an acceptable limitatio to create all your new JSPs to a separate webapp folder. This webapp only has a single servlet initially, which is a type of Invoker that you write yourself, eg /dynamicWebApp/JspInvoker, which could be mapped to serve all request URIs of the form /dynamicWebApp/*.jsp Now, when /dynamicWebApp/dnynamicFile.jsp is invoked, the JspInvoker looks to see if a JSP called dynamicFile.jsp exists under that special folder. If it does, then your code translates/compiles/instantiates it (if not done already) and the request is forwarded to it's doPost method. I'm not saying this is easy, but it could be done. You'd be reinventing the classloading and service methods rather than all the other stuff. You might be forced to use SingleSignOn depending on your app, which could be a negative. Perhaps my answer is worse than yours ;) If its any consolation, one of the annoyances I have encountered in the last few months is that I have a particular webapp feature that I can't code well because Java does not provide multiple inheritance. I've done it, but the code is ugly. I've tried 99 ways of doing it different but don't have a better one. However, I realise that full multiple inheritance was deliberately excluded from Java for specific reasons, so I have to decide whether to stop using Java or accept it as good at what it is designed for. And that's an easy choice to make :) -Original Message- From: Will Hartung [mailto:[EMAIL PROTECTED] Sent: Friday 27 May 2005 20:38 To: Tomcat Users List Subject: Re: Adding content/JSPs on the fly From: Steve Kirk [EMAIL PROTECTED] Sent: Friday, May 27, 2005 11:44 AM It sounds reasonable, but probably isn't tested or by design, so probably best to just have a go. Re portability, the best advice I can offer is an old chestnut: read the servlet spec. This is particularly relevant in this case. The spec is generally pretty good at telling you you pretty accurately if (a) what you want to do should/must be supported or (b) what you want do do is forbidden. Of course there are some areas that it does not have a view either way on, but I find it to be an invaluable document - I have it on shortcut from my taskbar and consult it often. It's at least as useful as the javadocs or TC docs. For those of you that don't know where to find it, it's here, under specifications. http://java.sun.com/products/servlet/reference/api/index.html Choose the servlet spec version appropriate to your TC version as described in the table on the tomcat home page: http://jakarta.apache.org/tomcat/index.html I'm reasonably familiar with the specification. One of the notable bits about it is simply the fact that within the spec, you're pretty much not guaranteed writeable access to the file system at all (save for a temporary area, and it's simply that -- temporary). But the reality is that most engines give you access to the disk that way. Just one more specific point on your note Will - I would have thought if anything that you want it to be a precondition that the webapp NOT be deployed as a war. I've a feeling that if TC explodes the war, then it might not check the exploded FS for changes. Don't take this as gospel though, this is a hazy half-remembered bit of info. As far as I know, the Servlet spec doesn't have a deployment method outside of a WAR. It's pretty much a container behavior to actually explode the WAR on to the file system, yet, most obviously do for performance reasons. But it does bring up a basic problem, for example, if by some fluke the app is redeployed, all of that new data is blasted away by the WAR..that would be Bad. But I can't see another (easy) way to create JSPs on the fly, or in fact to create any other content that can be served directly the server. It's an annoying nit of the spec, to me, that it doesn't expose this behavior to the developer. For example, unlike EJBs (which has a specified limitation on accessing the disk), the Servlet spec does allow you to access the disk, though perhaps not within the WAR hierarchy. But, there is no way to, say, forward to a static resource that the server can
Problem with precompiled JSPs
Hello, I have an application that is currently running under JBoss 3.2.x with Jetty that I would like to get running on Tomcat 5.X. I have precompiled all of the JSP's and mapped them to there respective JSP path in the web.xml. Here is a sample fragment of the web.xml: ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app id=WebApp display-namemjc_campus_tour/display-name servlet servlet-nametourArea0/servlet-name display-nametourArea0/display-name servlet-classcom.atomogy.virtualtour.view.pages.tourArea0_jsp/servlet-class /servlet servlet servlet-nametourArea1/servlet-name display-nametourArea1/display-name servlet-classcom.atomogy.virtualtour.view.pages.tourArea1_jsp/servlet-class /servlet servlet servlet-nametourArea2/servlet-name display-nametourArea2/display-name servlet-classcom.atomogy.virtualtour.view.pages.tourArea2_jsp/servlet-class /servlet servlet servlet-nametourArea3/servlet-name display-nametourArea3/display-name servlet-classcom.atomogy.virtualtour.view.pages.tourArea3_jsp/servlet-class /servlet servlet servlet-namefooter/servlet-name display-namefooter/display-name servlet-classcom.atomogy.virtualtour.view.include.footer_jsp/servlet-class /servlet servlet servlet-nameheader/servlet-name display-nameheader/display-name servlet-classcom.atomogy.virtualtour.view.include.header_jsp/servlet-class /servlet servlet-mapping servlet-nametourArea0/servlet-name url-pattern/pages/tourArea0.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nametourArea1/servlet-name url-pattern/pages/tourArea1.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nametourArea2/servlet-name url-pattern/pages/tourArea2.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nametourArea3/servlet-name url-pattern/pages/tourArea3.jsp/url-pattern /servlet-mapping servlet-mapping servlet-namefooter/servlet-name url-pattern/include/footer.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameheader/servlet-name url-pattern/include/header.jsp/url-pattern /servlet-mapping welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list /web-app The error message that I get when trying to run the application on Tomcat is as follows: 2005-05-26 09:33:03 StandardWrapperValve[tourArea0]: Servlet.service() for servlet tourArea0 threw exception java.lang.NoSuchMethodError: org.apache.jasper.runtime.JspRuntimeLibrary.include(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;Ljavax/servlet/jsp/JspWriter;Z)V at com.atomogy.virtualtour.view.pages.tourArea0_jsp._jspService(tourArea0_jsp.java:43) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at
Re: Problem with precompiled JSPs
Hello again, Is anyone using precompiled JSP's in a similar way or have knowledge of others using precompiled JSP's in Tomacat that is similar to the usage below? Any response is welcomed... ;-) Mike Baliel wrote: Hello, I have an application that is currently running under JBoss 3.2.x with Jetty that I would like to get running on Tomcat 5.X. I have precompiled all of the JSP's and mapped them to there respective JSP path in the web.xml. Here is a sample fragment of the web.xml: ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app id=WebApp display-namemjc_campus_tour/display-name servlet servlet-nametourArea0/servlet-name display-nametourArea0/display-name servlet-classcom.atomogy.virtualtour.view.pages.tourArea0_jsp/servlet-class /servlet servlet servlet-nametourArea1/servlet-name display-nametourArea1/display-name servlet-classcom.atomogy.virtualtour.view.pages.tourArea1_jsp/servlet-class /servlet servlet servlet-nametourArea2/servlet-name display-nametourArea2/display-name servlet-classcom.atomogy.virtualtour.view.pages.tourArea2_jsp/servlet-class /servlet servlet servlet-nametourArea3/servlet-name display-nametourArea3/display-name servlet-classcom.atomogy.virtualtour.view.pages.tourArea3_jsp/servlet-class /servlet servlet servlet-namefooter/servlet-name display-namefooter/display-name servlet-classcom.atomogy.virtualtour.view.include.footer_jsp/servlet-class /servlet servlet servlet-nameheader/servlet-name display-nameheader/display-name servlet-classcom.atomogy.virtualtour.view.include.header_jsp/servlet-class /servlet servlet-mapping servlet-nametourArea0/servlet-name url-pattern/pages/tourArea0.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nametourArea1/servlet-name url-pattern/pages/tourArea1.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nametourArea2/servlet-name url-pattern/pages/tourArea2.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nametourArea3/servlet-name url-pattern/pages/tourArea3.jsp/url-pattern /servlet-mapping servlet-mapping servlet-namefooter/servlet-name url-pattern/include/footer.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameheader/servlet-name url-pattern/include/header.jsp/url-pattern /servlet-mapping welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list /web-app The error message that I get when trying to run the application on Tomcat is as follows: 2005-05-26 09:33:03 StandardWrapperValve[tourArea0]: Servlet.service() for servlet tourArea0 threw exception java.lang.NoSuchMethodError: org.apache.jasper.runtime.JspRuntimeLibrary.include(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;Ljavax/servlet/jsp/JspWriter;Z)V at com.atomogy.virtualtour.view.pages.tourArea0_jsp._jspService(tourArea0_jsp.java:43) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at
Re: how to access JSPs using servername/~username
No, see http://jakarta.apache.org/tomcat/tomcat-5.0-doc/deployer-howto.html There is a feature that allows you to set context configuration inside a WAR file. [by creating a META-INF/context.xml file. ] Whether this would work with userdirs too , I don't know (and have not tested) -Tim Nikola Milutinovic wrote: Tim Funk wrote: ~user/public_html/META-INF/context.xml might do the trick. So, the magical name of the UserDir context is context? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to access JSPs using servername/~username
Hi, I used to access the html webpages using servername.(http://servername/~username) But I am not able to access JSPs in the above fashion. What could be added into server.xml so that I can access jsps using servername.(http://servername/~username) -- With Regards, Akhthar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to access JSPs using servername/~username
Akhthar Parvez. K wrote: Hi, I used to access the html webpages using servername.(http://servername/~username) But I am not able to access JSPs in the above fashion. What could be added into server.xml so that I can access jsps using servername.(http://servername/~username) There is no ellegant solution, like in Apache HTTPD (UserDir directive). Firstly, Tomcat doesn't really care about users on the system or their home directories. Secondly, it deals with Web Applications, known as Contexts, rather than directories. Sure, you can keep your JSPs in a directory, but they can also be in a WAR file. So, with Tomcat there is no UserDir concept. What I usually do, is one VHost - one user account and then create webapps dir for TC web applications. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to access JSPs using servername/~username
No this is not true http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html Its says ... == Many web servers can automatically map a request URI starting with a tilde character (~) and a username to a directory (commonly named public_html) in that user's home directory on the server. You can accomplish the same thing in Catalina by using a special Listener element like this (on a Unix system that uses the /etc/passwd file to identify valid users): Host name=localhost ... ... Listener className=org.apache.catalina.startup.UserConfig directoryName=public_html userClass=org.apache.catalina.startup.PasswdUserDatabase/ ... /Host On a server where /etc/passwd is not in use, you can request Catalina to consider all directories found in a specified base directory (such as c:\Homes in this example) to be considered user home directories for the purposes of this directive: Host name=localhost ... ... Listener className=org.apache.catalina.startup.UserConfig directoryName=public_html homeBase=c:\Homes userClass=org.apache.catalina.startup.HomesUserDatabase/ ... /Host If a user home directory has been set up for a user named craigmcc, then its contents will be visible from a client browser by making a request to a URL like: http://www.mycompany.com:8080/~craigmcc == -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: 12 May 2005 12:47 To: Tomcat Users List Subject: Re: how to access JSPs using servername/~username Akhthar Parvez. K wrote: Hi, I used to access the html webpages using servername.(http://servername/~username) But I am not able to access JSPs in the above fashion. What could be added into server.xml so that I can access jsps using servername.(http://servername/~username) There is no ellegant solution, like in Apache HTTPD (UserDir directive). Firstly, Tomcat doesn't really care about users on the system or their home directories. Secondly, it deals with Web Applications, known as Contexts, rather than directories. Sure, you can keep your JSPs in a directory, but they can also be in a WAR file. So, with Tomcat there is no UserDir concept. What I usually do, is one VHost - one user account and then create webapps dir for TC web applications. Nix. - 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: how to access JSPs using servername/~username
There is the concept of user dirs ... http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html See the section User Web Applications -Tim Nikola Milutinovic wrote: Akhthar Parvez. K wrote: Hi, I used to access the html webpages using servername.(http://servername/~username) But I am not able to access JSPs in the above fashion. What could be added into server.xml so that I can access jsps using servername.(http://servername/~username) There is no ellegant solution, like in Apache HTTPD (UserDir directive). Firstly, Tomcat doesn't really care about users on the system or their home directories. Secondly, it deals with Web Applications, known as Contexts, rather than directories. Sure, you can keep your JSPs in a directory, but they can also be in a WAR file. So, with Tomcat there is no UserDir concept. What I usually do, is one VHost - one user account and then create webapps dir for TC web applications. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to access JSPs using servername/~username
Tim Funk wrote: There is the concept of user dirs ... http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html See the section User Web Applications I stand corrected. I still prefer explicit context mappings. How would you deploy JNDI resources in userdir case? Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to access JSPs using servername/~username
~user/public_html/META-INF/context.xml might do the trick. -Tim Nikola Milutinovic wrote: Tim Funk wrote: There is the concept of user dirs ... http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html See the section User Web Applications I stand corrected. I still prefer explicit context mappings. How would you deploy JNDI resources in userdir case? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to access JSPs using servername/~username
Tim Funk wrote: ~user/public_html/META-INF/context.xml might do the trick. So, the magical name of the UserDir context is context? Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5
It is not possible. I have asked here for months and nothing has worked. The compiler flags than the docs say to use are not passed to the compiler, so you can not use Ant as the docs say. I think it is an IBM conspiricy. It took IBM a year to implement inner classes back in the jdk 1.1 era, so I suspect it will take the same time before that IBM compiler supports Java 5 features. Netbeans will comile them in the IDE with Java 5, but Tomcat won't compile them with Java 5. - Original Message - From: Stefan Parnet [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Subject: Howto configure tomcat to compile JSPs with Sun JDK 1.5 Date: Wed, 27 Apr 2005 15:20:32 +0200 Hello, I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot compile my JSPs. So I want the tomcat to compile the JSP's with the Sun JDK 1.5 compiler. I searched the web, but I did not find any instructions how to configure the tomcat to do so. Can anyone help me? Thanks Stefan This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. E-mail messages are not necessarily secure. Renesas does not accept responsibility for any changes made to this message after it was sent. Please note that this email message has been swept by Renesas for the presence of computer viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ___ Get your free email from http://www.dellmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Please correct docs - Compile JSPs w/ JDK 1.5
Please correct the documentation to reflect that this does not work. It would save a lot of time and lots of emails here about the same issue. Thanks, Milo -- ___ Get your free email from http://www.dellmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Howto configure tomcat to compile JSPs with Sun JDK 1.5
Hello Lutz is right : you may define your JRE under Eclipse Under (sorry for my mistakes : i use a french version and try to translate in english) Window - Preferences - Installed JRE you may use an other JRE that the one installed under Eclipse Hope this will help you Jean-Claude -Message d'origine- De : Stefan Parnet [mailto:[EMAIL PROTECTED] Envoyé : mercredi 27 avril 2005 16:14 À : Tomcat Users List Objet : Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5 Lutz Zetzsche schrieb: Hi Stefan, Am Mittwoch, 27. April 2005 15:20 schrieb Stefan Parnet: Hello, I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot compile my JSPs. So I want the tomcat to compile the JSP's with the Sun JDK 1.5 compiler. I searched the web, but I did not find any instructions how to configure the tomcat to do so. Can anyone help me? Do you integrate the Tomcat 5.5.9 into your Eclipse IDE or do you run it seperately? If you run Tomcat integrated into Eclipse, perhaps you can tell Eclipse which installed Tomcat and which installed JDK to use for your project. This is the way, I can do it with NetBeans IDE. Else, if you run Tomcat independently of the IDE, you must only set the environment variable for the JDK correctly before starting the server. I am running Tomcat 5.5.7 with JDK 1.5.0_02 and have to set the environment variable JRE_HOME so that Tomcat uses the right one of the installed JDKs. I set the JRE_HOME manually before starting Tomcat: export JRE_HOME=/usr/java/jre1.5.0_02/ (you must change the path to the path you use on your system) The environment variable JAVA_HOME could also play a role, although not in my case. :-) I hope, this information does help a little. Best wishes Lutz I have the environment variables JAVA_HOME and JRE_HOME already set to the JDK, but Tomcat still compiles JSPs with its built in Eclipse JDT Java compiler. This fact is mentioned in the Release Notes. There is also mentioned that it is possible to configure Tomcat to use another compiler. But there is no explanation how to configure it. Thanks for your answer. Stefan This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. E-mail messages are not necessarily secure. Renesas does not accept responsibility for any changes made to this message after it was sent. Please note that this email message has been swept by Renesas for the presence of computer viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5
Hello Jean-Claude, I don't use the Eclipse IDE. I do all my developments with the NetBeans IDE. But anyway, the IDE does not matter since Tomcat is running separately in an productive environment under Linux with Apache, mod_jk and Java 1.5_02 Tomcat 5.5 just uses Eclipse JDT compiler classes to compile JSPs. But it should be possible to change the config, so that Tomcat uses another compiler. At least, the releasenotes say so. But there is no useful howto at the tomcat web site or anywhere else. (at least I didn't find one) The problem is: 1. Tomcat 5.5 (without compatibility packages) runs only with Java 1.5 (JRE!) 2. The built in Java compiler to compile JSPs (and only JSPs) is the Eclipse JDT Compiler !!! JAVA 1.4 !!! == So Servlets using Java 1.5 features are runnig without problems because they are already compiled == JSPs with Java 1.5 features cannot be compiled (within tomcat) because the tomcat built-in compiler only knows Java 1.4 Stefan Serlet Jean-Claude schrieb: Hello Lutz is right : you may define your JRE under Eclipse Under (sorry for my mistakes : i use a french version and try to translate in english) Window - Preferences - Installed JRE you may use an other JRE that the one installed under Eclipse Hope this will help you Jean-Claude -Message d'origine- De : Stefan Parnet [mailto:[EMAIL PROTECTED] Envoyé : mercredi 27 avril 2005 16:14 À : Tomcat Users List Objet : Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5 Lutz Zetzsche schrieb: Hi Stefan, Am Mittwoch, 27. April 2005 15:20 schrieb Stefan Parnet: Hello, I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot compile my JSPs. So I want the tomcat to compile the JSP's with the Sun JDK 1.5 compiler. I searched the web, but I did not find any instructions how to configure the tomcat to do so. Can anyone help me? Do you integrate the Tomcat 5.5.9 into your Eclipse IDE or do you run it seperately? If you run Tomcat integrated into Eclipse, perhaps you can tell Eclipse which installed Tomcat and which installed JDK to use for your project. This is the way, I can do it with NetBeans IDE. Else, if you run Tomcat independently of the IDE, you must only set the environment variable for the JDK correctly before starting the server. I am running Tomcat 5.5.7 with JDK 1.5.0_02 and have to set the environment variable JRE_HOME so that Tomcat uses the right one of the installed JDKs. I set the JRE_HOME manually before starting Tomcat: export JRE_HOME=/usr/java/jre1.5.0_02/ (you must change the path to the path you use on your system) The environment variable JAVA_HOME could also play a role, although not in my case. :-) I hope, this information does help a little. Best wishes Lutz This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. E-mail messages are not necessarily secure. Renesas does not accept responsibility for any changes made to this message after it was sent. Please note that this email message has been swept by Renesas for the presence of computer viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5
Hi Stefan, Am Donnerstag, 28. April 2005 09:07 schrieb Stefan Parnet: The problem is: 1. Tomcat 5.5 (without compatibility packages) runs only with Java 1.5 (JRE!) 2. The built in Java compiler to compile JSPs (and only JSPs) is the Eclipse JDT Compiler !!! JAVA 1.4 !!! == So Servlets using Java 1.5 features are runnig without problems because they are already compiled == JSPs with Java 1.5 features cannot be compiled (within tomcat) because the tomcat built-in compiler only knows Java 1.4 Did you have a look at the how-to, which I mentioned yesterday? And if yes, why didn't it solve your problem? - http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html Best wishes Lutz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Howto configure tomcat to compile JSPs with Sun JDK 1.5
Hi Did you have a look at the how-to, which I mentioned yesterday? And if yes, why didn't it solve your problem? - http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html It works.. But there's a problem with compilerSourceVM - What JDK version are the source files compatible with? (Default JDK 1.4) compilerTargetVM - What JDK version are the generated files compatible with? (Default JDK 1.4) If you set those, you'll get a resource unavailable message for every page you try to access (regardless whether you set this to 1.4 or 1.5). I believe it has been fixed in the CSV since (I haven't found time to compile Tomcat on my own and try), and I didn't find anything about this in the 5.5.9 changelog. Regards Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Howto configure tomcat to compile JSPs with Sun JDK 1.5
Hello, I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot compile my JSPs. So I want the tomcat to compile the JSP's with the Sun JDK 1.5 compiler. I searched the web, but I did not find any instructions how to configure the tomcat to do so. Can anyone help me? Thanks Stefan This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. E-mail messages are not necessarily secure. Renesas does not accept responsibility for any changes made to this message after it was sent. Please note that this email message has been swept by Renesas for the presence of computer viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Precompiling JSPs fails
Hi, Im using Tomcat 5.5.9 and JDK 1.5.0_02. Im trying to precompile the Liferay Pro Portal 3.2 JSPs using the ant build script found on the apache web site: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html#Web%20Appl ication%20Compilation modified to add jars placed in common/lib/ext. JAVA_HOME is set to /usr/java/jdk1.5.0_02. When I run the ant script, I get a NullPointerException. Below is the script I am using and the output from the ant command. Any idea what I might be doing wrong? Thanks. -- Bud project name=Webapp Precompilation default=all basedir=. target name=jspc taskdef classname=org.apache.jasper.JspC name=jasper2 classpath id=jspc.classpath pathelement location=${java.home}/../lib/tools.jar/ fileset dir=${tomcat.home}/bin include name=*.jar/ /fileset fileset dir=${tomcat.home}/server/lib include name=*.jar/ /fileset fileset dir=${tomcat.home}/common/lib include name=*.jar/ /fileset fileset dir=${tomcat.home}/common/lib/ext include name=*.jar/ /fileset /classpath /taskdef jasper2 validateXml=false uriroot=${webapp.path} webXmlFragment=${webapp.path}/WEB-INF/generated_web.xml outputDir=${webapp.path}/WEB-INF/src / /target target name=compile mkdir dir=${webapp.path}/WEB-INF/classes/ mkdir dir=${webapp.path}/WEB-INF/lib/ javac destdir=${webapp.path}/WEB-INF/classes optimize=off debug=on failonerror=false srcdir=${webapp.path}/WEB-INF/src excludes=**/*.smap classpath pathelement location=${webapp.path}/WEB-INF/classes/ fileset dir=${webapp.path}/WEB-INF/lib include name=*.jar/ /fileset pathelement location=${tomcat.home}/common/classes/ fileset dir=${tomcat.home}/common/lib include name=*.jar/ /fileset fileset dir=${tomcat.home}/common/lib/ext include name=*.jar/ /fileset pathelement location=${tomcat.home}/shared/classes/ fileset dir=${tomcat.home}/shared/lib include name=*.jar/ /fileset fileset dir=${tomcat.home}/bin include name=*.jar/ /fileset /classpath include name=** / exclude name=tags/** / /javac /target target name=all depends=jspc,compile /target /project --- #ant -v -Dtomcat.home=/usr/local/tomcat/jakarta-tomcat-5.5.9 -Dwebapp.path=/usr/local/tomcat/jakarta-tomcat-5.5.9/webapps/liferay Apache Ant version 1.6.2 compiled on July 16 2004 Buildfile: build.xml Detected Java version: 1.5 in: /usr/java/jdk1.5.0_02/jre Detected OS: Linux parsing buildfile /usr/local/tomcat/jakarta-tomcat-5.5.9/bin/build.xml with URI = file:///usr/local/tomcat/jakarta-tomcat-5.5.9/bin/build.xml Project base dir set to: /usr/local/tomcat/jakarta-tomcat-5.5.9/bin Build sequence for target `all' is [jspc, compile, all] Complete build sequence is [jspc, compile, all, ] jspc: [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:123) [jasper2] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [jasper2] at org.apache.tools.ant.Task.perform(Task.java:364) [jasper2] at org.apache.tools.ant.Target.execute(Target.java:341) [jasper2] at org.apache.tools.ant.Target.performTasks(Target.java:369) [jasper2] at org.apache.tools.ant.Project.executeTarget(Project.java:1214) [jasper2] at org.apache.tools.ant.Project.executeTargets(Project.java:1062) [jasper2] at org.apache.tools.ant.Main.runBuild(Main.java:673) [jasper2] at org.apache.tools.ant.Main.startAnt(Main.java:188) [jasper2] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196) [jasper2] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55) [jasper2] Error in class org.apache.jasper.JspC BUILD FAILED /usr/local/tomcat/jakarta-tomcat-5.5.9/bin/build.xml:27: org.apache.jasper.JasperException at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:131) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:341) at org.apache.tools.ant.Target.performTasks
Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5
Hi Stefan, Am Mittwoch, 27. April 2005 15:20 schrieb Stefan Parnet: Hello, I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot compile my JSPs. So I want the tomcat to compile the JSP's with the Sun JDK 1.5 compiler. I searched the web, but I did not find any instructions how to configure the tomcat to do so. Can anyone help me? Do you integrate the Tomcat 5.5.9 into your Eclipse IDE or do you run it seperately? If you run Tomcat integrated into Eclipse, perhaps you can tell Eclipse which installed Tomcat and which installed JDK to use for your project. This is the way, I can do it with NetBeans IDE. Else, if you run Tomcat independently of the IDE, you must only set the environment variable for the JDK correctly before starting the server. I am running Tomcat 5.5.7 with JDK 1.5.0_02 and have to set the environment variable JRE_HOME so that Tomcat uses the right one of the installed JDKs. I set the JRE_HOME manually before starting Tomcat: export JRE_HOME=/usr/java/jre1.5.0_02/ (you must change the path to the path you use on your system) The environment variable JAVA_HOME could also play a role, although not in my case. :-) I hope, this information does help a little. Best wishes Lutz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5
Lutz Zetzsche schrieb: Hi Stefan, Am Mittwoch, 27. April 2005 15:20 schrieb Stefan Parnet: Hello, I installed Tomcat 5.5.9 and want to use Java 1.5 in my JSPs. Since Tomcat 5.5 uses the Eclipse JDT Compiler (Java 1.4), it cannot compile my JSPs. So I want the tomcat to compile the JSP's with the Sun JDK 1.5 compiler. I searched the web, but I did not find any instructions how to configure the tomcat to do so. Can anyone help me? Do you integrate the Tomcat 5.5.9 into your Eclipse IDE or do you run it seperately? If you run Tomcat integrated into Eclipse, perhaps you can tell Eclipse which installed Tomcat and which installed JDK to use for your project. This is the way, I can do it with NetBeans IDE. Else, if you run Tomcat independently of the IDE, you must only set the environment variable for the JDK correctly before starting the server. I am running Tomcat 5.5.7 with JDK 1.5.0_02 and have to set the environment variable JRE_HOME so that Tomcat uses the right one of the installed JDKs. I set the JRE_HOME manually before starting Tomcat: export JRE_HOME=/usr/java/jre1.5.0_02/ (you must change the path to the path you use on your system) The environment variable JAVA_HOME could also play a role, although not in my case. :-) I hope, this information does help a little. Best wishes Lutz I have the environment variables JAVA_HOME and JRE_HOME already set to the JDK, but Tomcat still compiles JSPs with its built in Eclipse JDT Java compiler. This fact is mentioned in the Release Notes. There is also mentioned that it is possible to configure Tomcat to use another compiler. But there is no explanation how to configure it. Thanks for your answer. Stefan This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. E-mail messages are not necessarily secure. Renesas does not accept responsibility for any changes made to this message after it was sent. Please note that this email message has been swept by Renesas for the presence of computer viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5
Hi Stefan, Am Mittwoch, 27. April 2005 16:14 schrieb Stefan Parnet: I have the environment variables JAVA_HOME and JRE_HOME already set to the JDK, but Tomcat still compiles JSPs with its built in Eclipse JDT Java compiler. This fact is mentioned in the Release Notes. There is also mentioned that it is possible to configure Tomcat to use another compiler. But there is no explanation how to configure it. Perhaps the following how-to contains the information, you missed in the release notes: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html Best wishes Lutz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSPs slow to compile?
I am running Liferay Portal Pro 3.3 under tomcat 5.5.9 on fedora fc3 running on a 1.2ghz p4 w/ 3gb ram. Initial page loads are taking on the order of 30 seconds. After the initial page load, it takes just a second to reload. 30 seconds seems like a long time to initially compile the page and load it. Do I potentially have something misconfigured? Also, I've tried to precompile the pages with the script in the docs on the tomcat website but the script fails with a NullPointerException. Has anyone else successfully precompiled JSPs under 5.5 with the script on this page: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html ? Thanks. -- Bud - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSPs slow to compile?
Hummm... Just changed the jasper init parameter development to false in conf/web.xml and now pages load in a couple of seconds or less. Why the huge difference? Any tips to make it even faster? -- Bud Bud Bach wrote: I am running Liferay Portal Pro 3.3 under tomcat 5.5.9 on fedora fc3 running on a 1.2ghz p4 w/ 3gb ram. Initial page loads are taking on the order of 30 seconds. After the initial page load, it takes just a second to reload. 30 seconds seems like a long time to initially compile the page and load it. Do I potentially have something misconfigured? Also, I've tried to precompile the pages with the script in the docs on the tomcat website but the script fails with a NullPointerException. Has anyone else successfully precompiled JSPs under 5.5 with the script on this page: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html ? Thanks. -- Bud - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSPs with Java 5 ?
Hello, When will Java 5 features be available in Jasper/Tcat5.5.x to compile JSPs??? Thanks, Milo -- ___ Get your free email from http://www.dellmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSPs with Java 5 ?
Am Dienstag, 5. April 2005 16:09 schrieb Milo Grains: When will Java 5 features be available in Jasper/Tcat5.5.x to compile JSPs??? They are available. But you will have to either configure tomcat to use javac from tools.jar to compile JSPs or replace the Eclipse JDT coming with the tomcat distibution with a more recent version. Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Compile JSPs with Java 5 features?
I've followed the directions in the docs to get 5.5.7 to compile JSPs with -source 1.5 features. It stays in -source 1.4 mode. I know the docs say the IBM compiler will be updated to handle Java 5 feature. When inner classes were introduced in jdk 1.1, it took IBM a year to implement inner classes in their compiler and IDE. Has anyone gotten this to work using the compiler flags and ant? Thanks for your help, Milo -- ___ Get your free email from http://www.dellmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need access to classes outside Tomcat for JSPs
Why do you want your classes outside of Tomcat? Copy the classes to your project when you build and eliminate the dependency. Or better yet, use a build environment like Ant to do the copying for you. As a bonus, it'll catch errors before you get to production and the webapp will be more portable. --David Dan wrote: Classpath problem. Really frustrating. I'm trying to duplicate a setup on system A to system B and can't get it working. My problem is when I access the JSP page, Tomcat complains of a ClassNotFound exception. This happens with all of my custom classes. If I create a simple JSP page with no custom classes the JSP compiles fine. When I manually execute the class via java com.xxx.MyClass it responds appropriately (my environment's CLASSPATH includes the custom library paths). My custom classes live outside of the Tomcat directory (see below) because I use these classes in other non-web based applications, so they need to be available system wide. I have melted my brain today trying to figure out why system A works with this configuration but system B gives me the ClassNotFound exception. I have even copied my entire Tomcat directory from system A to system B with no change. I thought perhaps I was starting the service with additional parameters but I don't see any in the registry settings. Does anyone have an educated guess as to why I can't get this thing to work the way it's working on the other system and/or how I can get this working with my custom classes OUTSIDE of Tomcat. Win2K SP4 Tomcat v5.0.27 as NT Service e:\java\tomcat e:\java\sdk (JDK 1.4.2) e:\java\library\custom\ (custom libraries) e:\java\library\basic (libraries from other sources) - 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: Need access to classes outside Tomcat for JSPs
Do people read anymore? As previously stated in the original post, these classes need to be available to other non-web, non TomCat applications. I do not want to have to maintain two different repositories. Also as previously stated I have the desired configuration running on another box but I cannot duplicate the setup on this box. If your only advice is to move them into TomCat, then please don't even bother replying. At 08:21 AM 3/1/2005, David wrote: Why do you want your classes outside of Tomcat? Copy the classes to your project when you build and eliminate the dependency. Or better yet, use a build environment like Ant to do the copying for you. As a bonus, it'll catch errors before you get to production and the webapp will be more portable. --David Dan wrote: Classpath problem. Really frustrating. I'm trying to duplicate a setup on system A to system B and can't get it working. My problem is when I access the JSP page, Tomcat complains of a ClassNotFound exception. This happens with all of my custom classes. If I create a simple JSP page with no custom classes the JSP compiles fine. When I manually execute the class via java com.xxx.MyClass it responds appropriately (my environment's CLASSPATH includes the custom library paths). My custom classes live outside of the Tomcat directory (see below) because I use these classes in other non-web based applications, so they need to be available system wide. I have melted my brain today trying to figure out why system A works with this configuration but system B gives me the ClassNotFound exception. I have even copied my entire Tomcat directory from system A to system B with no change. I thought perhaps I was starting the service with additional parameters but I don't see any in the registry settings. Does anyone have an educated guess as to why I can't get this thing to work the way it's working on the other system and/or how I can get this working with my custom classes OUTSIDE of Tomcat. Win2K SP4 Tomcat v5.0.27 as NT Service e:\java\tomcat e:\java\sdk (JDK 1.4.2) e:\java\library\custom\ (custom libraries) e:\java\library\basic (libraries from other sources) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need access to classes outside Tomcat for JSPs
1. Yes people do read, and offer advice based on whether a) they can and b) how rude the poster is. You fall into (b) right now, so good luck. 2. Tomcat, not TomCat. 3. This is a voluntary user list and you should not expect to receive help as you seem to. -Original Message- From: Dan [mailto:[EMAIL PROTECTED] Sent: 01 March 2005 13:55 To: Tomcat Users List Subject: Re: Need access to classes outside Tomcat for JSPs Do people read anymore? As previously stated in the original post, these classes need to be available to other non-web, non TomCat applications. I do not want to have to maintain two different repositories. Also as previously stated I have the desired configuration running on another box but I cannot duplicate the setup on this box. If your only advice is to move them into TomCat, then please don't even bother replying. At 08:21 AM 3/1/2005, David wrote: Why do you want your classes outside of Tomcat? Copy the classes to your project when you build and eliminate the dependency. Or better yet, use a build environment like Ant to do the copying for you. As a bonus, it'll catch errors before you get to production and the webapp will be more portable. --David Dan wrote: Classpath problem. Really frustrating. I'm trying to duplicate a setup on system A to system B and can't get it working. My problem is when I access the JSP page, Tomcat complains of a ClassNotFound exception. This happens with all of my custom classes. If I create a simple JSP page with no custom classes the JSP compiles fine. When I manually execute the class via java com.xxx.MyClass it responds appropriately (my environment's CLASSPATH includes the custom library paths). My custom classes live outside of the Tomcat directory (see below) because I use these classes in other non-web based applications, so they need to be available system wide. I have melted my brain today trying to figure out why system A works with this configuration but system B gives me the ClassNotFound exception. I have even copied my entire Tomcat directory from system A to system B with no change. I thought perhaps I was starting the service with additional parameters but I don't see any in the registry settings. Does anyone have an educated guess as to why I can't get this thing to work the way it's working on the other system and/or how I can get this working with my custom classes OUTSIDE of Tomcat. Win2K SP4 Tomcat v5.0.27 as NT Service e:\java\tomcat e:\java\sdk (JDK 1.4.2) e:\java\library\custom\ (custom libraries) e:\java\library\basic (libraries from other sources) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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]
Re: Need access to classes outside Tomcat for JSPs
You can redirect the tomcat's work directory to your classes. That should work for you ! Viorel Dragomir . .. --- - Original Message - From: Allistair Crossley To: Tomcat Users List Sent: Tuesday, March 01, 2005 15:56 Subject: RE: Need access to classes outside Tomcat for JSPs 1. Yes people do read, and offer advice based on whether a) they can and b) how rude the poster is. You fall into (b) right now, so good luck. 2. Tomcat, not TomCat. 3. This is a voluntary user list and you should not expect to receive help as you seem to. -Original Message- From: Dan [mailto:[EMAIL PROTECTED] Sent: 01 March 2005 13:55 To: Tomcat Users List Subject: Re: Need access to classes outside Tomcat for JSPs Do people read anymore? As previously stated in the original post, these classes need to be available to other non-web, non TomCat applications. I do not want to have to maintain two different repositories. Also as previously stated I have the desired configuration running on another box but I cannot duplicate the setup on this box. If your only advice is to move them into TomCat, then please don't even bother replying. At 08:21 AM 3/1/2005, David wrote: Why do you want your classes outside of Tomcat? Copy the classes to your project when you build and eliminate the dependency. Or better yet, use a build environment like Ant to do the copying for you. As a bonus, it'll catch errors before you get to production and the webapp will be more portable. --David Dan wrote: Classpath problem. Really frustrating. I'm trying to duplicate a setup on system A to system B and can't get it working. My problem is when I access the JSP page, Tomcat complains of a ClassNotFound exception. This happens with all of my custom classes. If I create a simple JSP page with no custom classes the JSP compiles fine. When I manually execute the class via java com.xxx.MyClass it responds appropriately (my environment's CLASSPATH includes the custom library paths). My custom classes live outside of the Tomcat directory (see below) because I use these classes in other non-web based applications, so they need to be available system wide. I have melted my brain today trying to figure out why system A works with this configuration but system B gives me the ClassNotFound exception. I have even copied my entire Tomcat directory from system A to system B with no change. I thought perhaps I was starting the service with additional parameters but I don't see any in the registry settings. Does anyone have an educated guess as to why I can't get this thing to work the way it's working on the other system and/or how I can get this working with my custom classes OUTSIDE of Tomcat. Win2K SP4 Tomcat v5.0.27 as NT Service e:\java\tomcat e:\java\sdk (JDK 1.4.2) e:\java\library\custom\ (custom libraries) e:\java\library\basic (libraries from other sources) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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]
RE: Need access to classes outside Tomcat for JSPs
Everybody take it easy. We've all at least thought what Dan posted, at one time or another, especially when dealing with Tomcat documentation (official or otherwise) and the pro-this or pro-that solution folks. There's no need to escalate this into a flame war. I only wish I was far enough along to help, but I've only gotten Tomcat to recognize webapps (well, really just JSP files, but that's b/c of my inexperience and lack of time right now) outside of $CATALINA_HOME. I DO HOWEVER, suspect that a solution is to be had somewhere in your web.xml file (as opposed to server.xml, which is not as fine-tuned for your needs), but these are guesses. So, assuming you're under other pressures, as most of us are, and not just being rude for rudeness' sake, does anyone have a clue how to do this without throwing the baby out with the bath water as the first reply suggested? Think community, -Matt On Tue, 1 Mar 2005, Allistair Crossley wrote: 1. Yes people do read, and offer advice based on whether a) they can and b) how rude the poster is. You fall into (b) right now, so good luck. 2. Tomcat, not TomCat. 3. This is a voluntary user list and you should not expect to receive help as you seem to. -Original Message- From: Dan [mailto:[EMAIL PROTECTED] Sent: 01 March 2005 13:55 To: Tomcat Users List Subject: Re: Need access to classes outside Tomcat for JSPs Do people read anymore? As previously stated in the original post, these classes need to be available to other non-web, non TomCat applications. I do not want to have to maintain two different repositories. Also as previously stated I have the desired configuration running on another box but I cannot duplicate the setup on this box. If your only advice is to move them into TomCat, then please don't even bother replying. At 08:21 AM 3/1/2005, David wrote: Why do you want your classes outside of Tomcat? Copy the classes to your project when you build and eliminate the dependency. Or better yet, use a build environment like Ant to do the copying for you. As a bonus, it'll catch errors before you get to production and the webapp will be more portable. --David Dan wrote: Classpath problem. Really frustrating. I'm trying to duplicate a setup on system A to system B and can't get it working. My problem is when I access the JSP page, Tomcat complains of a ClassNotFound exception. This happens with all of my custom classes. If I create a simple JSP page with no custom classes the JSP compiles fine. When I manually execute the class via java com.xxx.MyClass it responds appropriately (my environment's CLASSPATH includes the custom library paths). My custom classes live outside of the Tomcat directory (see below) because I use these classes in other non-web based applications, so they need to be available system wide. I have melted my brain today trying to figure out why system A works with this configuration but system B gives me the ClassNotFound exception. I have even copied my entire Tomcat directory from system A to system B with no change. I thought perhaps I was starting the service with additional parameters but I don't see any in the registry settings. Does anyone have an educated guess as to why I can't get this thing to work the way it's working on the other system and/or how I can get this working with my custom classes OUTSIDE of Tomcat. Win2K SP4 Tomcat v5.0.27 as NT Service e:\java\tomcat e:\java\sdk (JDK 1.4.2) e:\java\library\custom\ (custom libraries) e:\java\library\basic (libraries from other sources) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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] Matthew Kozak Rutgers University-Camden [EMAIL PROTECTED] ** They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -Ben Franklin ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need access to classes outside Tomcat for JSPs
I sent one through, but it has not come in yet (copied below) ... Right, a well formed web application is packaged with its dependent classes. Tomcat loads classes from either WEB-INF/classes folder or the lib folder in the form of a JAR for your webapp, or other places like common/lib and shared/lib. It does not use your system classpath. The previous poster was absolutely right with his advice. You need to sort out your build environment. You can still have 1 source respository, but when you build (via Ant let's say since it's the most ubiquitous) you direct compiled classes into your 2 locations. You could perhaps wrap them in a JAR for Tomcat's purposes, it's up to you. Having the same classes twice is no bad thing - having source twice is. -Original Message- From: Matt [mailto:[EMAIL PROTECTED] Sent: 01 March 2005 14:15 To: Tomcat Users List Subject: RE: Need access to classes outside Tomcat for JSPs Everybody take it easy. We've all at least thought what Dan posted, at one time or another, especially when dealing with Tomcat documentation (official or otherwise) and the pro-this or pro-that solution folks. There's no need to escalate this into a flame war. I only wish I was far enough along to help, but I've only gotten Tomcat to recognize webapps (well, really just JSP files, but that's b/c of my inexperience and lack of time right now) outside of $CATALINA_HOME. I DO HOWEVER, suspect that a solution is to be had somewhere in your web.xml file (as opposed to server.xml, which is not as fine-tuned for your needs), but these are guesses. So, assuming you're under other pressures, as most of us are, and not just being rude for rudeness' sake, does anyone have a clue how to do this without throwing the baby out with the bath water as the first reply suggested? Think community, -Matt On Tue, 1 Mar 2005, Allistair Crossley wrote: 1. Yes people do read, and offer advice based on whether a) they can and b) how rude the poster is. You fall into (b) right now, so good luck. 2. Tomcat, not TomCat. 3. This is a voluntary user list and you should not expect to receive help as you seem to. -Original Message- From: Dan [mailto:[EMAIL PROTECTED] Sent: 01 March 2005 13:55 To: Tomcat Users List Subject: Re: Need access to classes outside Tomcat for JSPs Do people read anymore? As previously stated in the original post, these classes need to be available to other non-web, non TomCat applications. I do not want to have to maintain two different repositories. Also as previously stated I have the desired configuration running on another box but I cannot duplicate the setup on this box. If your only advice is to move them into TomCat, then please don't even bother replying. At 08:21 AM 3/1/2005, David wrote: Why do you want your classes outside of Tomcat? Copy the classes to your project when you build and eliminate the dependency. Or better yet, use a build environment like Ant to do the copying for you. As a bonus, it'll catch errors before you get to production and the webapp will be more portable. --David Dan wrote: Classpath problem. Really frustrating. I'm trying to duplicate a setup on system A to system B and can't get it working. My problem is when I access the JSP page, Tomcat complains of a ClassNotFound exception. This happens with all of my custom classes. If I create a simple JSP page with no custom classes the JSP compiles fine. When I manually execute the class via java com.xxx.MyClass it responds appropriately (my environment's CLASSPATH includes the custom library paths). My custom classes live outside of the Tomcat directory (see below) because I use these classes in other non-web based applications, so they need to be available system wide. I have melted my brain today trying to figure out why system A works with this configuration but system B gives me the ClassNotFound exception. I have even copied my entire Tomcat directory from system A to system B with no change. I thought perhaps I was starting the service with additional parameters but I don't see any in the registry settings. Does anyone have an educated guess as to why I can't get this thing to work the way it's working on the other system and/or how I can get this working with my custom classes OUTSIDE of Tomcat. Win2K SP4 Tomcat v5.0.27 as NT Service e:\java\tomcat e:\java\sdk (JDK 1.4.2) e:\java\library\custom\ (custom libraries) e:\java\library\basic (libraries from other sources) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e
RE: Need access to classes outside Tomcat for JSPs
Right, a well formed web application is packaged with its dependent classes. Tomcat loads classes from either WEB-INF/classes folder or the lib folder in the form of a JAR for your webapp, or other places like common/lib and shared/lib. It does not use your system classpath. The previous poster was absolutely right with his advice. You need to sort out your build environment. You can still have 1 source respository, but when you build (via Ant let's say since it's the most ubiquitous) you direct compiled classes into your 2 locations. You could perhaps wrap them in a JAR for Tomcat's purposes, it's up to you. Having the same classes twice is no bad thing - having source twice is. Allistair. -Original Message- From: Dan [mailto:[EMAIL PROTECTED] Sent: 01 March 2005 13:55 To: Tomcat Users List Subject: Re: Need access to classes outside Tomcat for JSPs Do people read anymore? As previously stated in the original post, these classes need to be available to other non-web, non TomCat applications. I do not want to have to maintain two different repositories. Also as previously stated I have the desired configuration running on another box but I cannot duplicate the setup on this box. If your only advice is to move them into TomCat, then please don't even bother replying. At 08:21 AM 3/1/2005, David wrote: Why do you want your classes outside of Tomcat? Copy the classes to your project when you build and eliminate the dependency. Or better yet, use a build environment like Ant to do the copying for you. As a bonus, it'll catch errors before you get to production and the webapp will be more portable. --David Dan wrote: Classpath problem. Really frustrating. I'm trying to duplicate a setup on system A to system B and can't get it working. My problem is when I access the JSP page, Tomcat complains of a ClassNotFound exception. This happens with all of my custom classes. If I create a simple JSP page with no custom classes the JSP compiles fine. When I manually execute the class via java com.xxx.MyClass it responds appropriately (my environment's CLASSPATH includes the custom library paths). My custom classes live outside of the Tomcat directory (see below) because I use these classes in other non-web based applications, so they need to be available system wide. I have melted my brain today trying to figure out why system A works with this configuration but system B gives me the ClassNotFound exception. I have even copied my entire Tomcat directory from system A to system B with no change. I thought perhaps I was starting the service with additional parameters but I don't see any in the registry settings. Does anyone have an educated guess as to why I can't get this thing to work the way it's working on the other system and/or how I can get this working with my custom classes OUTSIDE of Tomcat. Win2K SP4 Tomcat v5.0.27 as NT Service e:\java\tomcat e:\java\sdk (JDK 1.4.2) e:\java\library\custom\ (custom libraries) e:\java\library\basic (libraries from other sources) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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]