jar files
This probably sounds like a very newbie question, but for your own application classes, (not third party), is there any particular reason to jar them and put them into WEB-INF/lib vs compiling them as class files to WEB-INF/classes? The classloader won't blindly just load the whole jar will it? For an applet, using Jars makes some sense to avoid continually downloading class files, what are the advantages for web applications? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jar files
Personally - I prefer jar files. Its one file to keep track of. Instead of 100's of .class files. When you start building up your library - you start to get a large directory of WEB-INF/classes. It much easier to manage them as jar files. -Tim Mott Leroy wrote: This probably sounds like a very newbie question, but for your own application classes, (not third party), is there any particular reason to jar them and put them into WEB-INF/lib vs compiling them as class files to WEB-INF/classes? The classloader won't blindly just load the whole jar will it? For an applet, using Jars makes some sense to avoid continually downloading class files, what are the advantages for web applications? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jar files
Ultimately, after a build, it's just a war file, so that's not really an issue for me. Tim Funk wrote: Personally - I prefer jar files. Its one file to keep track of. Instead of 100's of .class files. When you start building up your library - you start to get a large directory of WEB-INF/classes. It much easier to manage them as jar files. -Tim Mott Leroy wrote: This probably sounds like a very newbie question, but for your own application classes, (not third party), is there any particular reason to jar them and put them into WEB-INF/lib vs compiling them as class files to WEB-INF/classes? The classloader won't blindly just load the whole jar will it? For an applet, using Jars makes some sense to avoid continually downloading class files, what are the advantages for web applications? - 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]
Exception when using TLD files in JAR files included with web application
Hi, I am evaluating the migration to Tomcat from Resin and encounted the following problem. The following exception is raised when I am trying to use tag libraries packaged as JAR files in the web application with both Tomcat 5.5.9 or 5.5.11 (I have the JAR file with the tld in META-INF/tlds directory): My JSP page: jsp:root xmlns:jsp=http://java.sun.com/JSP/Page; xmlns:ui=http://www.metatv.com/common/ui/tags-test; version=2.0 test:dosomething/ /jsp:root Exception: org.apache.jasper.JasperException: /test.jsp(7,25) Could not add one or more tag libraries. org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand ler.java:39) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java :405) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java :86) org.apache.jasper.compiler.JspDocumentParser.parse(JspDocumentParser.jav a:211) org.apache.jasper.compiler.ParserController.doParse(ParserController.jav a:196) org.apache.jasper.compiler.ParserController.parse(ParserController.java: 100) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146) 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.ja va:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) I've configured Tomcat for multiple instances and besides the above problem the rest looks okay. I did not have this problem with Resin. So, is this a bug in Tomcat or am I missing something? Thanks, Seva - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.9: [JSTL] The absolute uri: http://java.sun.com/jstl/c cannot be resolved in either web.xml or the jar files deployed with this application
Greetings, I'm running Tomcat 5.5.9 on Win2K, JDK1.5 and have observed that there is a problem resolving the JSTL taglibs when using their specified absolute uri. I believe I have everything installed correctly because if I use the relative location to the .tld instead of the uri it works fine. I had the same problem with Tomcat 5.5.7 and found others had similar issues when pre-compiling. http://marc.theaimsgroup.com/?l=tomcat-userm=110857231722295w=2 Which pointed to this bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=33373 So I downloaded 5.5.9 in the hopes that it may have been fixed, but it doesn't appear so. Is this still an issue in 5.5.9, or do I have to configure something else. Have I missed any documentation notes about this problem? /robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.9: [JSTL] The absolute uri: http://java.sun.com/jstl/c cannot be resolved in either web.xml or the jar files deployed with this application
I think this is what you need now: %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; % Note the extra /jsp/ Digby Robert Taylor wrote: Greetings, I'm running Tomcat 5.5.9 on Win2K, JDK1.5 and have observed that there is a problem resolving the JSTL taglibs when using their specified absolute uri. I believe I have everything installed correctly because if I use the relative location to the .tld instead of the uri it works fine. I had the same problem with Tomcat 5.5.7 and found others had similar issues when pre-compiling. http://marc.theaimsgroup.com/?l=tomcat-userm=110857231722295w=2 Which pointed to this bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=33373 So I downloaded 5.5.9 in the hopes that it may have been fixed, but it doesn't appear so. Is this still an issue in 5.5.9, or do I have to configure something else. Have I missed any documentation notes about this problem? /robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.9: [JSTL] The absolute uri: http://java.sun.com/jstl/c cannot be resolved in either web.xml or the jar files deployed with this application
Digby, thanks. That was it. Next time I'll think instead of cutting and pasting. /robert Digby wrote: I think this is what you need now: %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; % Note the extra /jsp/ Digby Robert Taylor wrote: Greetings, I'm running Tomcat 5.5.9 on Win2K, JDK1.5 and have observed that there is a problem resolving the JSTL taglibs when using their specified absolute uri. I believe I have everything installed correctly because if I use the relative location to the .tld instead of the uri it works fine. I had the same problem with Tomcat 5.5.7 and found others had similar issues when pre-compiling. http://marc.theaimsgroup.com/?l=tomcat-userm=110857231722295w=2 Which pointed to this bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=33373 So I downloaded 5.5.9 in the hopes that it may have been fixed, but it doesn't appear so. Is this still an issue in 5.5.9, or do I have to configure something else. Have I missed any documentation notes about this problem? /robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
MISSING jar files and empty directories after installing TOMCAT 5.5.7 Help !!!
Can someone tell me why these files are missing after installing tomcat5.5.7? Installed instatlled tomcat 5.5.7 from jakarta-tomcat-5.5.7.tar.gz (downloaded from Apache.org) and installed jdk1.5.0_02 MISSING jasper-compiler.jar - jasper-runtime.jar - jsp-api.jar - naming-common.jar - naming-factory.jar - naming-factory-dbcp.jar - naming-java.jar - naming-resources.jar - servlet-api.jar - tomcat-i18n-**.jar - catalina.jar - catalina-ant.jar - catalina-optional.jar commons-modeler.jar - servlets-x.jar - tomcat-coyote.jar - tomcat-http.jar - tomcat-ajp.jar - tomcat-util.jar - EMPTY DIRECTORIES: $CATALINA_HOME/common/classes and $CATALINA_HOME/common/endorsed are empty $CATALINA_HOME/server/classes, and $CATALINA_HOME/server/lib $CATALINA_BASE/shared/classes, and $CATALINA_BASE/shared/lib. Common - $CATALINA_HOME/commons/i18n has the following: tomcat-i18n-en.jar, tomcat-i18n-es.jar, tomcat-i18n-fr.jar and tomcat-i18n-ja.jar $CATALINA_HOME/common/lib only includes the following: commons-el.jar - jasper-compiler-jdt.jar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: MISSING jar files and empty directories after installing TOMCAT 5.5.7 Help !!!
Maybe http://marc.theaimsgroup.com/?l=tomcat-userm=104978978819668w=2 Mark Parveen Pasha wrote: Can someone tell me why these files are missing after installing tomcat5.5.7? Installed instatlled tomcat 5.5.7 from jakarta-tomcat-5.5.7.tar.gz (downloaded from Apache.org) and installed jdk1.5.0_02 MISSING jasper-compiler.jar - jasper-runtime.jar - jsp-api.jar - naming-common.jar - naming-factory.jar - naming-factory-dbcp.jar - naming-java.jar - naming-resources.jar - servlet-api.jar - tomcat-i18n-**.jar - catalina.jar - catalina-ant.jar - catalina-optional.jar commons-modeler.jar - servlets-x.jar - tomcat-coyote.jar - tomcat-http.jar - tomcat-ajp.jar - tomcat-util.jar - EMPTY DIRECTORIES: $CATALINA_HOME/common/classes and $CATALINA_HOME/common/endorsed are empty $CATALINA_HOME/server/classes, and $CATALINA_HOME/server/lib $CATALINA_BASE/shared/classes, and $CATALINA_BASE/shared/lib. Common - $CATALINA_HOME/commons/i18n has the following: tomcat-i18n-en.jar, tomcat-i18n-es.jar, tomcat-i18n-fr.jar and tomcat-i18n-ja.jar $CATALINA_HOME/common/lib only includes the following: commons-el.jar - jasper-compiler-jdt.jar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to prioritize WEB-INF\lib jar files loading order
Hi all, Is there a possibility to assign to Tomcat class loader priority in the way it loads the jar in WEB-INF\lib? My application uses axis.jar in WEB-INF\lib. However, some classes from axis.jar had had to be rewritten (i.e. Calendar serializer and deserializer). I'd like to include them in my application specific jar file, which is also in WEB-INF\lib. It appears that Tomcat (4.1) class loader load the jars in an undocumented and not guaranteed alphabetic order. Though, I don't want to rely on this hypothetical behaviour. Thanks for your help I found a similar thread in the mailing list archive, but it has been closed 3 years ago. I hope someone got a solution in the meantime. Regards, ATN. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to prioritize WEB-INF\lib jar files loading order
On Fri, 25 Mar 2005 18:02:49 +0100, Etienne Klajnerman [EMAIL PROTECTED] wrote: Hi all, Is there a possibility to assign to Tomcat class loader priority in the way it loads the jar in WEB-INF\lib? My application uses axis.jar in WEB-INF\lib. However, some classes from axis.jar had had to be rewritten (i.e. Calendar serializer and deserializer). Wouldn't it be a lot easier just to replace the calsses in axis.jar that were rewritten? Afterall a .jar is just an archive. Regards, -- Jason Bainbridge http://kde.org - [EMAIL PROTECTED] Personal Site - http://jasonbainbridge.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to prioritize WEB-INF\lib jar files loading order
The classes directory has a higher precendence than the jar files. -Tim Etienne Klajnerman wrote: Hi all, Is there a possibility to assign to Tomcat class loader priority in the way it loads the jar in WEB-INF\lib? My application uses axis.jar in WEB-INF\lib. However, some classes from axis.jar had had to be rewritten (i.e. Calendar serializer and deserializer). I'd like to include them in my application specific jar file, which is also in WEB-INF\lib. It appears that Tomcat (4.1) class loader load the jars in an undocumented and not guaranteed alphabetic order. Though, I don't want to rely on this hypothetical behaviour. Thanks for your help I found a similar thread in the mailing list archive, but it has been closed 3 years ago. I hope someone got a solution in the meantime. Regards, ATN. - 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]
stop task do not release jar files
Hi all, Repost due to typ error. I use Ant stop task to stop the context and delete the files in the application context folder. But it is unable to delete the jar files. Tomcat 4.1.30 rgds Antony Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
stop task do not release jar files
Hi all, I use Anto stop task to stop the context and delete the files in the application context folder. But it is unable to delete the jar files. Tomcat 4.1.30 rgds Antony Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Classloading, jar-files in shared/lib works only when webapp is placed in $CATALINA_HOME/webapps (tomcat 5.0.28)
I tested a very simple servlet application and found that classes in jar-files that are placed in $CATALINA_HOME/shared/lib works just fine when the application is placed under the $CATALINA_HOME/webapps directory. However, if the application is placed elsewhere on the disc, let us say in d:/myTomcat5Test/exploded and then a context configuration file is is created, let us say $CATALINA_HOME/conf/Catalina/localhost/myTomcat5Test.xml and pointing the docBase to d:/myTomcat5Test/exploded, then the application will throw a ClassNotFoundException. This is what the context snippet looks like * Context path=/myTomcat5Test docBase=d:/myTomcat5Test/exploded debug=0 privileged=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_myTomcat5Test_log. suffix=.txt timestamp=true/ /Context When testing the same application under Tomcat4, everyting works just fine. Any ideas why folks ? Regards Erik On 2004-09-17 [EMAIL PROTECTED] wrote: Hello Sorry to drag this issue on but, I still don't get Tomcat 5 to recognize classes in jar files located in $CATALINA_HOME/shared/lib I tried my orginal application (which was running fine under Tomcat 4.1.x, both on Windows and Linux) with Tomcat 5.0.28 and then with 5.0.16, both under Windows and Linux, but the problem with the ClassNotFoundEception still occurred. Then I decided to reduce as many potential problem areas as possible, by writing a new very simple application consisting of only one html page and one servlet, and only one external jar-file. (My original application was quite large with many jar dependencies) So I started up my IDE, created the new application, created the servlet, deployed in tomcat 4.1.x and, placed the jar-file in /shared/lib and of course it works. Then I deployed under Tomcat 5.0.28, but no, it does not work. After moving the jarfile to /common/lib it works though. This really puzzels me. What can I do to get to the bottom with this ? Is there any specific configuration that I could have missed ? Any other test cases I should perform ? Should I send my code to someone for inspection ? Any help is appreciated On 2004-09-01 Shapira Yoav wrote: Hi, Oh yeah, that reminds me, we might have a bug still present with classloading from shared/lib in 5.0.x. Try a much earlier version, e.g. 5.0.16, and let us know if that works. Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 01, 2004 3:58 PM To: [EMAIL PROTECTED] Subject: What is the difference in classloading between tomcat 4.1.x and 5.0.x In a web application running under Tomcat, I have defined a filter in the web.xml file. The filter is pointing to a class that is packed in a jar- file, and the jar-file is kept in the $CATALINA_HOME/shared/lib directory. In Tomcat 4.1.x the application is working without any problems. When trying to run the same application under Tomcat 5.0.28 a java.lang.ClassNotFoundException is thrown. If the jar-file is placed in $CATALINA_HOME/common/lib, then the class is found and the application runs without problem. The same issue appears when using Listeners in the web.xml file. I have also tried the same setup with 5.0.27 which leads to the same result. What is it that has changed between 4.1x and 5.0.x, in regards to classloading, in order to cause this problem ? Any help in understanding this problem is appreciated. Regards Erik ** stacktrace ** 2004-09-01 17:35:07 NamingContextListener[/Catalina/localhost/webdialInstance]: Resource parameters for UserTransaction = null 2004-09-01 17:35:07 StandardContext[/webdialInstance]Exception starting filter Compress java.lang.ClassNotFoundException: se.erit.web.servlet.filters.gzip.GZIPFilter at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade r.ja va:1340) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade r.ja va:1189) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationF ilte rConfig.java:211) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applicati onFi lterConfig.java:308) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilt erCo nfig.java:79) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.ja va:3 698) at org.apache.catalina.core.StandardContext.start(StandardContext.java:434 9) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.j ava: 823) at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:12 1) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(Container Base .java:143) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ContainerBase.addChild
RE: Classloading, jar-files in shared/lib works only when webapp is placed in $CATALINA_HOME/webapps (tomcat 5.0.28)
What happens if you put the jar file(s) in %yourWebApp%/WEB-INF/lib? Tom Vekemans -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: jeudi 23 septembre 2004 14:25 To: Tomcat Users List Subject: Classloading, jar-files in shared/lib works only when webapp is placed in $CATALINA_HOME/webapps (tomcat 5.0.28) I tested a very simple servlet application and found that classes in jar-files that are placed in $CATALINA_HOME/shared/lib works just fine when the application is placed under the $CATALINA_HOME/webapps directory. However, if the application is placed elsewhere on the disc, let us say in d:/myTomcat5Test/exploded and then a context configuration file is is created, let us say $CATALINA_HOME/conf/Catalina/localhost/myTomcat5Test.xml and pointing the docBase to d:/myTomcat5Test/exploded, then the application will throw a ClassNotFoundException. This is what the context snippet looks like * Context path=/myTomcat5Test docBase=d:/myTomcat5Test/exploded debug=0 privileged=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_myTomcat5Test_log. suffix=.txt timestamp=true/ /Context When testing the same application under Tomcat4, everyting works just fine. Any ideas why folks ? Regards Erik On 2004-09-17 [EMAIL PROTECTED] wrote: Hello Sorry to drag this issue on but, I still don't get Tomcat 5 to recognize classes in jar files located in $CATALINA_HOME/shared/lib I tried my orginal application (which was running fine under Tomcat 4.1.x, both on Windows and Linux) with Tomcat 5.0.28 and then with 5.0.16, both under Windows and Linux, but the problem with the ClassNotFoundEception still occurred. Then I decided to reduce as many potential problem areas as possible, by writing a new very simple application consisting of only one html page and one servlet, and only one external jar-file. (My original application was quite large with many jar dependencies) So I started up my IDE, created the new application, created the servlet, deployed in tomcat 4.1.x and, placed the jar-file in /shared/lib and of course it works. Then I deployed under Tomcat 5.0.28, but no, it does not work. After moving the jarfile to /common/lib it works though. This really puzzels me. What can I do to get to the bottom with this ? Is there any specific configuration that I could have missed ? Any other test cases I should perform ? Should I send my code to someone for inspection ? Any help is appreciated On 2004-09-01 Shapira Yoav wrote: Hi, Oh yeah, that reminds me, we might have a bug still present with classloading from shared/lib in 5.0.x. Try a much earlier version, e.g. 5.0.16, and let us know if that works. Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 01, 2004 3:58 PM To: [EMAIL PROTECTED] Subject: What is the difference in classloading between tomcat 4.1.x and 5.0.x In a web application running under Tomcat, I have defined a filter in the web.xml file. The filter is pointing to a class that is packed in a jar- file, and the jar-file is kept in the $CATALINA_HOME/shared/lib directory. In Tomcat 4.1.x the application is working without any problems. When trying to run the same application under Tomcat 5.0.28 a java.lang.ClassNotFoundException is thrown. If the jar-file is placed in $CATALINA_HOME/common/lib, then the class is found and the application runs without problem. The same issue appears when using Listeners in the web.xml file. I have also tried the same setup with 5.0.27 which leads to the same result. What is it that has changed between 4.1x and 5.0.x, in regards to classloading, in order to cause this problem ? Any help in understanding this problem is appreciated. Regards Erik ** stacktrace ** 2004-09-01 17:35:07 NamingContextListener[/Catalina/localhost/webdialInstance]: Resource parameters for UserTransaction = null 2004-09-01 17:35:07 StandardContext[/webdialInstance]Exception starting filter Compress java.lang.ClassNotFoundException: se.erit.web.servlet.filters.gzip.GZIPFilter at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa de r.ja va:1340) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa de r.ja va:1189) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(Applicatio nF ilte rConfig.java:211) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applica ti onFi lterConfig.java:308) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFi lt erCo nfig.java:79) at org.apache.catalina.core.StandardContext.filterStart(StandardContext. ja va:3 698) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4 34 9
RE: Classloading, jar-files in shared/lib works only when webapp is placed in $CATALINA_HOME/webapps (tomcat 5.0.28)
Then it works just fine. It also works when the jar is placed in the $CATALINA_HOME/common/lib /Erik On 2004-09-23 Vekemans Tom wrote: What happens if you put the jar file(s) in %yourWebApp%/WEB-INF/lib? Tom Vekemans -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: jeudi 23 septembre 2004 14:25 To: Tomcat Users List Subject: Classloading, jar-files in shared/lib works only when webapp is placed in $CATALINA_HOME/webapps (tomcat 5.0.28) I tested a very simple servlet application and found that classes in jar-files that are placed in $CATALINA_HOME/shared/lib works just fine when the application is placed under the $CATALINA_HOME/webapps directory. However, if the application is placed elsewhere on the disc, let us say in d:/myTomcat5Test/exploded and then a context configuration file is is created, let us say $CATALINA_HOME/conf/Catalina/localhost/myTomcat5Test.xml and pointing the docBase to d:/myTomcat5Test/exploded, then the application will throw a ClassNotFoundException. This is what the context snippet looks like * Context path=/myTomcat5Test docBase=d:/myTomcat5Test/exploded debug=0 privileged=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_myTomcat5Test_log. suffix=.txt timestamp=true/ /Context When testing the same application under Tomcat4, everyting works just fine. Any ideas why folks ? Regards Erik On 2004-09-17 [EMAIL PROTECTED] wrote: Hello Sorry to drag this issue on but, I still don't get Tomcat 5 to recognize classes in jar files located in $CATALINA_HOME/shared/lib I tried my orginal application (which was running fine under Tomcat 4.1.x, both on Windows and Linux) with Tomcat 5.0.28 and then with 5.0.16, both under Windows and Linux, but the problem with the ClassNotFoundEception still occurred. Then I decided to reduce as many potential problem areas as possible, by writing a new very simple application consisting of only one html page and one servlet, and only one external jar-file. (My original application was quite large with many jar dependencies) So I started up my IDE, created the new application, created the servlet, deployed in tomcat 4.1.x and, placed the jar-file in /shared/lib and of course it works. Then I deployed under Tomcat 5.0.28, but no, it does not work. After moving the jarfile to /common/lib it works though. This really puzzels me. What can I do to get to the bottom with this ? Is there any specific configuration that I could have missed ? Any other test cases I should perform ? Should I send my code to someone for inspection ? Any help is appreciated On 2004-09-01 Shapira Yoav wrote: Hi, Oh yeah, that reminds me, we might have a bug still present with classloading from shared/lib in 5.0.x. Try a much earlier version, e.g. 5.0.16, and let us know if that works. Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 01, 2004 3:58 PM To: [EMAIL PROTECTED] Subject: What is the difference in classloading between tomcat 4.1.x and 5.0.x In a web application running under Tomcat, I have defined a filter in the web.xml file. The filter is pointing to a class that is packed in a jar- file, and the jar-file is kept in the $CATALINA_HOME/shared/lib directory. In Tomcat 4.1.x the application is working without any problems. When trying to run the same application under Tomcat 5.0.28 a java.lang.ClassNotFoundException is thrown. If the jar-file is placed in $CATALINA_HOME/common/lib, then the class is found and the application runs without problem. The same issue appears when using Listeners in the web.xml file. I have also tried the same setup with 5.0.27 which leads to the same result. What is it that has changed between 4.1x and 5.0.x, in regards to classloading, in order to cause this problem ? Any help in understanding this problem is appreciated. Regards Erik ** stacktrace ** 2004-09-01 17:35:07 NamingContextListener[/Catalina/localhost/webdialInstance]: Resource parameters for UserTransaction = null 2004-09-01 17:35:07 StandardContext[/webdialInstance]Exception starting filter Compress java.lang.ClassNotFoundException: se.erit.web.servlet.filters.gzip.GZIPFilter at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa de r.ja va:1340) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa de r.ja va:1189) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(Applicatio nF ilte rConfig.java:211) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applica ti onFi lterConfig.java:308) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFi lt erCo nfig.java:79) at org.apache.catalina.core.StandardContext.filterStart(StandardContext. ja va:3 698
RE: Classloading, jar-files in shared/lib works only when webapp is placed in $CATALINA_HOME/webapps (tomcat 5.0.28), could it be caused by privileged=true
When creating my context snippet, i used the snippet for the tomcat admin application as a template. I just realized that I did not remove the attribute ' privileged=true ' When removing this attribute, the application works as expected, that is, classes in jar-files which are located in $CATALINA_HOME/shared/lib are found by the application. So I suppose that this attribute affects the way that tomcat loads classes for applications. Anyway, things now work as expected. Regards Erik On 2004-09-23 [EMAIL PROTECTED] wrote: Then it works just fine. It also works when the jar is placed in the $CATALINA_HOME/common/lib /Erik On 2004-09-23 Vekemans Tom wrote: What happens if you put the jar file(s) in %yourWebApp%/WEB-INF/lib? Tom Vekemans -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: jeudi 23 septembre 2004 14:25 To: Tomcat Users List Subject: Classloading, jar-files in shared/lib works only when webapp is placed in $CATALINA_HOME/webapps (tomcat 5.0.28) I tested a very simple servlet application and found that classes in jar-files that are placed in $CATALINA_HOME/shared/lib works just fine when the application is placed under the $CATALINA_HOME/webapps directory. However, if the application is placed elsewhere on the disc, let us say in d:/myTomcat5Test/exploded and then a context configuration file is is created, let us say $CATALINA_HOME/conf/Catalina/localhost/myTomcat5Test.xml and pointing the docBase to d:/myTomcat5Test/exploded, then the application will throw a ClassNotFoundException. This is what the context snippet looks like * Context path=/myTomcat5Test docBase=d:/myTomcat5Test/exploded debug=0 privileged=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_myTomcat5Test_log. suffix=.txt timestamp=true/ /Context When testing the same application under Tomcat4, everyting works just fine. Any ideas why folks ? Regards Erik On 2004-09-17 [EMAIL PROTECTED] wrote: Hello Sorry to drag this issue on but, I still don't get Tomcat 5 to recognize classes in jar files located in $CATALINA_HOME/shared/lib I tried my orginal application (which was running fine under Tomcat 4.1.x, both on Windows and Linux) with Tomcat 5.0.28 and then with 5.0.16, both under Windows and Linux, but the problem with the ClassNotFoundEception still occurred. Then I decided to reduce as many potential problem areas as possible, by writing a new very simple application consisting of only one html page and one servlet, and only one external jar-file. (My original application was quite large with many jar dependencies) So I started up my IDE, created the new application, created the servlet, deployed in tomcat 4.1.x and, placed the jar-file in /shared/lib and of course it works. Then I deployed under Tomcat 5.0.28, but no, it does not work. After moving the jarfile to /common/lib it works though. This really puzzels me. What can I do to get to the bottom with this ? Is there any specific configuration that I could have missed ? Any other test cases I should perform ? Should I send my code to someone for inspection ? Any help is appreciated On 2004-09-01 Shapira Yoav wrote: Hi, Oh yeah, that reminds me, we might have a bug still present with classloading from shared/lib in 5.0.x. Try a much earlier version, e.g. 5.0.16, and let us know if that works. Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 01, 2004 3:58 PM To: [EMAIL PROTECTED] Subject: What is the difference in classloading between tomcat 4.1.x and 5.0.x In a web application running under Tomcat, I have defined a filter in the web.xml file. The filter is pointing to a class that is packed in a jar- file, and the jar-file is kept in the $CATALINA_HOME/shared/lib directory. In Tomcat 4.1.x the application is working without any problems. When trying to run the same application under Tomcat 5.0.28 a java.lang.ClassNotFoundException is thrown. If the jar-file is placed in $CATALINA_HOME/common/lib, then the class is found and the application runs without problem. The same issue appears when using Listeners in the web.xml file. I have also tried the same setup with 5.0.27 which leads to the same result. What is it that has changed between 4.1x and 5.0.x, in regards to classloading, in order to cause this problem ? Any help in understanding this problem is appreciated. Regards Erik ** stacktrace ** 2004-09-01 17:35:07 NamingContextListener[/Catalina/localhost/webdialInstance]: Resource parameters for UserTransaction = null 2004-09-01 17:35:07 StandardContext[/webdialInstance]Exception starting filter Compress java.lang.ClassNotFoundException: se.erit.web.servlet.filters.gzip.GZIPFilter
which jar files help accomplish JNDI/LDAP/ADS authentication in 4.1.12
I have a configuration of tomcat 4.1.17 which uses a JNDI realm to authenticate to Active Directory Server. It works well. Unfortunately, I must accomplish the same thing in a configuration of Tomcat 4.1.12 in order to be in step with a vendor supplied tool. 4.1.12 is not able to accomplish this particular goal due to a problem in the way it issues an error message inappropriately javax.naming.PartialResultException and then fails to authenticate. I would like to know which jar files I need to copy from my tomcat 4.1.17 to replace in my 4.1.12 in order to accomplish the JNDI/LDAP processing. I've already copied the common/lib/jndi.jar and common/lib/naming-factory.jar and they haven't been enough to fix the problem. I need to move as little as possible so as to maintain the 4.1.12 integrity for my vendor supplied tool. Any suggestions would be so appreciated. Thanks, [EMAIL PROTECTED]
Re: Location of third party jar files.
Kyle A. Boyd wrote: Yes, it is in tomcat/webapps/MyServer/WEB-INF/lib/. If I move it to tomcat/common/lib/ and restart Tomcat everything works ok. Kyle Kyle, The right approach is to put web app specific jars in the WEB-INF/lib directory. Seldomly you need to put stuff in the commons/lib directory. You probably have a corrupted jar file or you have bad permissions on the WEB-INF/lib directory. Check that the user running Tomcat can access the dir correctly. /rob -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Location of third party jar files.
Hi, Hmm, that's very strange. The only reason that comes to mind for this is other JavaMail API classes repackaged in a JAR either in common/lib or your WEB-INF/lib. For example, j2ee.jar contains these classes and should be avoided for this reason. Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 5:04 PM To: Tomcat Users List Subject: Re: Location of third party jar files. Yes, it is in tomcat/webapps/MyServer/WEB-INF/lib/. If I move it to tomcat/common/lib/ and restart Tomcat everything works ok. Kyle Shapira, Yoav wrote: Hi, And, is Sun's mail.jar in WEB-INF/lib? Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 3:57 PM To: Tomcat Users List Subject: Re: Location of third party jar files. Here is the exception: 2004-09-08 12:40:30 StandardWrapperValve[invoker]: Servlet.service() for servlet invoker threw exception java.lang.NoClassDefFoundError: javax/mail/MessagingException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:115) at com.brit.comm.EmailManager.addSender(EmailManager.java:646) at com.brit.comm.EmailManager.readPropertiesFile(EmailManager.java:618) at com.brit.comm.EmailManager.init(EmailManager.java:82) at com.brit.MiniRIS.Comm.Email.init(Email.java:91) at com.brit.MiniRIS.Servlet.MiniRisMonitor.getEmailManager(MiniRisMonito r. java :359) at com.brit.MiniRIS.Servlet.AdminServlet.showAdminServlet(AdminServlet.j av a:63 3) at com.brit.MiniRIS.Servlet.AdminServlet.parseHeader(AdminServlet.java:3 45 ) at com.brit.MiniRIS.Servlet.AdminServlet.doGet(AdminServlet.java:221) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServl et .jav a:419) at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java :1 33) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl ic atio nFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF il terC hain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV al ve.j ava:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eC onte xt.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a: 520) at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard Co ntex tValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV al ve.j ava:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eC onte xt.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a: 520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j av a:13 7) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eC onte xt.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j av a:11 7) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eC onte xt.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a: 520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve .jav a:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eC onte xt.java:104) at org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperVal ve .jav a:169) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eC onte xt.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a: 520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16 0) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.ja va :675 ) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP oo l.ja va:683) at java.lang.Thread.run(Thread.java:479) Kyle Shapira, Yoav wrote: Hi, What's the stack trace for the NoClassDefFoundError? Don't mistake that for a ClassNotFoundException. Yoav Shapira Millennium Research
RE: Location of third party jar files.
Not sure if you could tell this from a stacktrace or not, but where do you get your Mail Session from? If you've set up a JNDI resource, as described on http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html, then mail.jar will need to be in common/lib. -Original Message- From: Roberto Cosenza [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 2:23 AM To: Tomcat Users List Subject: Re: Location of third party jar files. Kyle A. Boyd wrote: Yes, it is in tomcat/webapps/MyServer/WEB-INF/lib/. If I move it to tomcat/common/lib/ and restart Tomcat everything works ok. Kyle Kyle, The right approach is to put web app specific jars in the WEB-INF/lib directory. Seldomly you need to put stuff in the commons/lib directory. You probably have a corrupted jar file or you have bad permissions on the WEB-INF/lib directory. Check that the user running Tomcat can access the dir correctly. /rob -- Roberto Cosenza Infoflex Connect AB, Sweden Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861 -- Nordic Messaging Technologies is a trademark of Infoflex Connect. Please visit www.nordicmessaging.se for more information about our carrier-grade messaging products. - 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]
Location of third party jar files.
We are using a couple of third party jar files. I can only get our application to see them if I add them to the tomcat/common/lib/ directory. This is inconvenient for our setup. Is there any other way for Tomcat to find the jar files in the classpath (works with Tomcat 3.2), a .xml file, or with a symbolic link? We are using Tomcat 5.0.27. Thanks, Kyle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Location of third party jar files.
Hi, The right and best way is to include copies of them in your WEB-INF/lib directory. Don't symlink, don't put them in common/lib or shared/lib, don't put them on the bootstrap classpath. Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 1:19 PM To: [EMAIL PROTECTED] Subject: Location of third party jar files. We are using a couple of third party jar files. I can only get our application to see them if I add them to the tomcat/common/lib/ directory. This is inconvenient for our setup. Is there any other way for Tomcat to find the jar files in the classpath (works with Tomcat 3.2), a .xml file, or with a symbolic link? We are using Tomcat 5.0.27. Thanks, Kyle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Location of third party jar files.
I believe Yoav said earlier it was OK to put JDBC drivers into common/lib. Or did I misunderstand, there was a bit of back and forth on the topic. Search Archives for Tomcat 4.1: JSP pages don't always compile the first time? Shapira, Yoav wrote: Hi, The right and best way is to include copies of them in your WEB-INF/lib directory. Don't symlink, don't put them in common/lib or shared/lib, don't put them on the bootstrap classpath. Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 1:19 PM To: [EMAIL PROTECTED] Subject: Location of third party jar files. We are using a couple of third party jar files. I can only get our application to see them if I add them to the tomcat/common/lib/ directory. This is inconvenient for our setup. Is there any other way for Tomcat to find the jar files in the classpath (works with Tomcat 3.2), a .xml file, or with a symbolic link? We are using Tomcat 5.0.27. Thanks, Kyle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Location of third party jar files.
Hi, I feel like I'm repeating myself endlessly into the void sometimes ;) As I said below, the best way is in WEB-INF/lib. If you want to stick stuff in common/lib, you can. If you want to use the Tomcat container-provided connection pooling, you must put the JDBC driver in common/lib. But that's not the best way IMHO (obviously a subjective call). Yoav Shapira Millennium Research Informatics -Original Message- From: Jeffrey Barnett [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 2:18 PM To: Tomcat Users List Subject: Re: Location of third party jar files. I believe Yoav said earlier it was OK to put JDBC drivers into common/lib. Or did I misunderstand, there was a bit of back and forth on the topic. Search Archives for Tomcat 4.1: JSP pages don't always compile the first time? Shapira, Yoav wrote: Hi, The right and best way is to include copies of them in your WEB-INF/lib directory. Don't symlink, don't put them in common/lib or shared/lib, don't put them on the bootstrap classpath. Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 1:19 PM To: [EMAIL PROTECTED] Subject: Location of third party jar files. We are using a couple of third party jar files. I can only get our application to see them if I add them to the tomcat/common/lib/ directory. This is inconvenient for our setup. Is there any other way for Tomcat to find the jar files in the classpath (works with Tomcat 3.2), a .xml file, or with a symbolic link? We are using Tomcat 5.0.27. Thanks, Kyle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Location of third party jar files.
I believe you'd *need* to put them there (common/lib) if you were using a container-managed connection pool. -Original Message- From: Jeffrey Barnett [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 1:18 PM To: Tomcat Users List Subject: Re: Location of third party jar files. I believe Yoav said earlier it was OK to put JDBC drivers into common/lib. Or did I misunderstand, there was a bit of back and forth on the topic. Search Archives for Tomcat 4.1: JSP pages don't always compile the first time? Shapira, Yoav wrote: Hi, The right and best way is to include copies of them in your WEB-INF/lib directory. Don't symlink, don't put them in common/lib or shared/lib, don't put them on the bootstrap classpath. Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 1:19 PM To: [EMAIL PROTECTED] Subject: Location of third party jar files. We are using a couple of third party jar files. I can only get our application to see them if I add them to the tomcat/common/lib/ directory. This is inconvenient for our setup. Is there any other way for Tomcat to find the jar files in the classpath (works with Tomcat 3.2), a .xml file, or with a symbolic link? We are using Tomcat 5.0.27. Thanks, Kyle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: Location of third party jar files.
That was my point earlier. Or is there something so inherently wrong with using /common/lib that you would forgo the pooling option? Mike Curwen wrote: I believe you'd *need* to put them there (common/lib) if you were using a container-managed connection pool. -Original Message- From: Jeffrey Barnett [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 1:18 PM To: Tomcat Users List Subject: Re: Location of third party jar files. I believe Yoav said earlier it was OK to put JDBC drivers into common/lib. Or did I misunderstand, there was a bit of back and forth on the topic. Search Archives for Tomcat 4.1: JSP pages don't always compile the first time? Shapira, Yoav wrote: Hi, The right and best way is to include copies of them in your WEB-INF/lib directory. Don't symlink, don't put them in common/lib or shared/lib, don't put them on the bootstrap classpath. Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 1:19 PM To: [EMAIL PROTECTED] Subject: Location of third party jar files. We are using a couple of third party jar files. I can only get our application to see them if I add them to the tomcat/common/lib/ directory. This is inconvenient for our setup. Is there any other way for Tomcat to find the jar files in the classpath (works with Tomcat 3.2), a .xml file, or with a symbolic link? We are using Tomcat 5.0.27. Thanks, Kyle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: Location of third party jar files.
Hi, Under some circumstances, it's preferable to bundle your own pooling library with your app rather than use the container-provided one. It's trivial to drop commons-dbcp.jar (and its one dependency, commons-pool.jar) into your WAR and configure your own connection pooling. Advantages: - You deploy in one WAR, same to all containers - The extra step of copying the JDBC jar to your common/lib directory (which is of course different on every server implementation) is not needed - You don't need to worry about possible bugs in the container's implementation of connection pooling (history shows these are plentiful in some containers) - You don't need to learn each container's syntax for connection pooling configuration Disadvantages: - You need to package a new WAR if the database URL (or user name, or password) changes. With container-provided pooling, you can just change the container's configuration in this case, much easier. Personally I go package DBCP with my app WARs frequently, because I'm a big fan of easy portability. Even though I know Tomcat inside and out for the most part, I don't want to learn the same connection pooling configuration stuff for every container I use. One WAR works everywhere, it's great. Yoav Shapira Millennium Research Informatics -Original Message- From: Jeffrey Barnett [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 2:34 PM To: Tomcat Users List Subject: Re: Location of third party jar files. That was my point earlier. Or is there something so inherently wrong with using /common/lib that you would forgo the pooling option? Mike Curwen wrote: I believe you'd *need* to put them there (common/lib) if you were using a container-managed connection pool. -Original Message- From: Jeffrey Barnett [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 1:18 PM To: Tomcat Users List Subject: Re: Location of third party jar files. I believe Yoav said earlier it was OK to put JDBC drivers into common/lib. Or did I misunderstand, there was a bit of back and forth on the topic. Search Archives for Tomcat 4.1: JSP pages don't always compile the first time? Shapira, Yoav wrote: Hi, The right and best way is to include copies of them in your WEB-INF/lib directory. Don't symlink, don't put them in common/lib or shared/lib, don't put them on the bootstrap classpath. Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 1:19 PM To: [EMAIL PROTECTED] Subject: Location of third party jar files. We are using a couple of third party jar files. I can only get our application to see them if I add them to the tomcat/common/lib/ directory. This is inconvenient for our setup. Is there any other way for Tomcat to find the jar files in the classpath (works with Tomcat 3.2), a .xml file, or with a symbolic link? We are using Tomcat 5.0.27. Thanks, Kyle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Location of third party jar files.
Ok, I moved them to tomcat/webapps/MyServer/WEB-INF/lib/ and I am now getting a java.lang.NoClassDefFoundError Kyle Shapira, Yoav wrote: Hi, The right and best way is to include copies of them in your WEB-INF/lib directory. Don't symlink, don't put them in common/lib or shared/lib, don't put them on the bootstrap classpath. Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 1:19 PM To: [EMAIL PROTECTED] Subject: Location of third party jar files. We are using a couple of third party jar files. I can only get our application to see them if I add them to the tomcat/common/lib/ directory. This is inconvenient for our setup. Is there any other way for Tomcat to find the jar files in the classpath (works with Tomcat 3.2), a .xml file, or with a symbolic link? We are using Tomcat 5.0.27. Thanks, Kyle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Location of third party jar files.
Hi, What's the stack trace for the NoClassDefFoundError? Don't mistake that for a ClassNotFoundException. Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 2:51 PM To: Tomcat Users List Subject: Re: Location of third party jar files. Ok, I moved them to tomcat/webapps/MyServer/WEB-INF/lib/ and I am now getting a java.lang.NoClassDefFoundError Kyle Shapira, Yoav wrote: Hi, The right and best way is to include copies of them in your WEB-INF/lib directory. Don't symlink, don't put them in common/lib or shared/lib, don't put them on the bootstrap classpath. Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 1:19 PM To: [EMAIL PROTECTED] Subject: Location of third party jar files. We are using a couple of third party jar files. I can only get our application to see them if I add them to the tomcat/common/lib/ directory. This is inconvenient for our setup. Is there any other way for Tomcat to find the jar files in the classpath (works with Tomcat 3.2), a .xml file, or with a symbolic link? We are using Tomcat 5.0.27. Thanks, Kyle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Location of third party jar files.
Here is the exception: 2004-09-08 12:40:30 StandardWrapperValve[invoker]: Servlet.service() for servlet invoker threw exception java.lang.NoClassDefFoundError: javax/mail/MessagingException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:115) at com.brit.comm.EmailManager.addSender(EmailManager.java:646) at com.brit.comm.EmailManager.readPropertiesFile(EmailManager.java:618) at com.brit.comm.EmailManager.init(EmailManager.java:82) at com.brit.MiniRIS.Comm.Email.init(Email.java:91) at com.brit.MiniRIS.Servlet.MiniRisMonitor.getEmailManager(MiniRisMonitor.java:359) at com.brit.MiniRIS.Servlet.AdminServlet.showAdminServlet(AdminServlet.java:633) at com.brit.MiniRIS.Servlet.AdminServlet.parseHeader(AdminServlet.java:345) at com.brit.MiniRIS.Servlet.AdminServlet.doGet(AdminServlet.java:221) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:419) at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) 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:117) 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.valves.RequestDumperValve.invoke(RequestDumperValve.java:169) 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.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:479) Kyle Shapira, Yoav wrote: Hi, What's the stack trace for the NoClassDefFoundError? Don't mistake that for a ClassNotFoundException. Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 2:51 PM To: Tomcat Users List Subject: Re: Location of third party jar files. Ok, I moved them to tomcat/webapps/MyServer/WEB-INF/lib/ and I am now getting a java.lang.NoClassDefFoundError Kyle Shapira, Yoav wrote: Hi, The right and best way is to include copies of them in your WEB-INF/lib directory. Don't symlink, don't put them in common/lib or shared/lib, don't put them on the bootstrap classpath. Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 1:19 PM To: [EMAIL PROTECTED] Subject: Location of third party jar files. We are using a couple of third party jar files. I can only get our application to see them if I add them to the tomcat/common/lib/ directory. This is inconvenient for our setup. Is there any other way for Tomcat to find the jar files in the classpath (works with Tomcat 3.2), a .xml file, or with a symbolic link? We
RE: Location of third party jar files.
Hi, And, is Sun's mail.jar in WEB-INF/lib? Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 3:57 PM To: Tomcat Users List Subject: Re: Location of third party jar files. Here is the exception: 2004-09-08 12:40:30 StandardWrapperValve[invoker]: Servlet.service() for servlet invoker threw exception java.lang.NoClassDefFoundError: javax/mail/MessagingException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:115) at com.brit.comm.EmailManager.addSender(EmailManager.java:646) at com.brit.comm.EmailManager.readPropertiesFile(EmailManager.java:618) at com.brit.comm.EmailManager.init(EmailManager.java:82) at com.brit.MiniRIS.Comm.Email.init(Email.java:91) at com.brit.MiniRIS.Servlet.MiniRisMonitor.getEmailManager(MiniRisMonitor. java :359) at com.brit.MiniRIS.Servlet.AdminServlet.showAdminServlet(AdminServlet.jav a:63 3) at com.brit.MiniRIS.Servlet.AdminServlet.parseHeader(AdminServlet.java:345 ) at com.brit.MiniRIS.Servlet.AdminServlet.doGet(AdminServlet.java:221) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet .jav a:419) at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:1 33) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic atio nFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terC hain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal ve.j ava:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte xt.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo ntex tValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal ve.j ava:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte xt.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a:13 7) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte xt.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a:11 7) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte xt.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve .jav a:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte xt.java:104) at org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve .jav a:169) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte xt.java:102) 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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java :675 ) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo l.ja va:683) at java.lang.Thread.run(Thread.java:479) Kyle Shapira, Yoav wrote: Hi, What's the stack trace for the NoClassDefFoundError? Don't mistake that for a ClassNotFoundException. Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 2:51 PM To: Tomcat Users List Subject: Re: Location of third party jar files. Ok, I moved them to tomcat/webapps/MyServer/WEB-INF/lib/ and I am now getting a java.lang.NoClassDefFoundError Kyle Shapira, Yoav wrote: Hi, The right and best way is to include copies of them in your WEB-INF/lib directory. Don't symlink, don't put them in common/lib or shared/lib, don't put them on the bootstrap classpath. Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 1:19 PM To: [EMAIL PROTECTED
Re: Location of third party jar files.
Yes, it is in tomcat/webapps/MyServer/WEB-INF/lib/. If I move it to tomcat/common/lib/ and restart Tomcat everything works ok. Kyle Shapira, Yoav wrote: Hi, And, is Sun's mail.jar in WEB-INF/lib? Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 3:57 PM To: Tomcat Users List Subject: Re: Location of third party jar files. Here is the exception: 2004-09-08 12:40:30 StandardWrapperValve[invoker]: Servlet.service() for servlet invoker threw exception java.lang.NoClassDefFoundError: javax/mail/MessagingException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:115) at com.brit.comm.EmailManager.addSender(EmailManager.java:646) at com.brit.comm.EmailManager.readPropertiesFile(EmailManager.java:618) at com.brit.comm.EmailManager.init(EmailManager.java:82) at com.brit.MiniRIS.Comm.Email.init(Email.java:91) at com.brit.MiniRIS.Servlet.MiniRisMonitor.getEmailManager(MiniRisMonitor. java :359) at com.brit.MiniRIS.Servlet.AdminServlet.showAdminServlet(AdminServlet.jav a:63 3) at com.brit.MiniRIS.Servlet.AdminServlet.parseHeader(AdminServlet.java:345 ) at com.brit.MiniRIS.Servlet.AdminServlet.doGet(AdminServlet.java:221) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet .jav a:419) at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:1 33) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic atio nFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terC hain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal ve.j ava:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte xt.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo ntex tValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal ve.j ava:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte xt.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a:13 7) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte xt.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a:11 7) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte xt.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve .jav a:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte xt.java:104) at org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve .jav a:169) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC onte xt.java:102) 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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java :675 ) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo l.ja va:683) at java.lang.Thread.run(Thread.java:479) Kyle Shapira, Yoav wrote: Hi, What's the stack trace for the NoClassDefFoundError? Don't mistake that for a ClassNotFoundException. Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 2:51 PM To: Tomcat Users List Subject: Re: Location of third party jar files. Ok, I moved them to tomcat/webapps/MyServer/WEB-INF/lib/ and I am now getting a java.lang.NoClassDefFoundError Kyle Shapira, Yoav wrote: Hi, The right and best way is to include copies of them in your WEB-INF/lib directory. Don't symlink, don't put them in common/lib or shared/lib, don't put them on the bootstrap classpath. Yoav Shapira Millennium Research Informatics -Original Message- From: Kyle A. Boyd [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08
n00b cannot get jar files to work.
How do I get jar files to work? Learning Tomcat I have a simple HelloServlet class. When compiled and the class file is inserted into the directory /opt/tomcat/webapps/test/WEB-INF/classes/example and the web.xml file given below is placed in /opt/tomcat/webapps/test/WEB-INF/ and tomcat is restarted then the url http://localhost:8080/test/hello page reads: Hello, world! But if the same class is placed in a jar file and this jar file is inserted into any of the following directories and given permissions tomcat:tomcat /opt/tomcat/webapps/test/WEB-INF/lib /opt/tomcat/common/lib /opt/tomcat/shared/lib when tomcat is restarted and the same url is addressed first there is Blank page the second time the page is refreshed there is Status 500: javax.servlet.ServletException: Wrapper cannot find servlet class example.HelloServlet or a class it depends on and the third and all subsequent times the page is refreshed there is Status 400: Servlet hello is not available How do I get jar files to work? Thank you. -- Michael Appendix: web.xml file: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 servlet servlet-namehello/servlet-name servlet-classexample.HelloServlet/servlet-class /servlet servlet-mapping url-pattern/hello/url-pattern servlet-namehello/servlet-name /servlet-mapping /web-app HelloServlet.java: package example; import java.io.*; import java.util.*; import javax.servlet.http.*; import javax.servlet.*; public class HelloServlet extends HttpServlet { public void doGet ( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException { res.setContentType(text/html); PrintWriter pw = res.getWriter(); pw.println(!DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.0 Transitional//EN\); pw.println(); pw.println(head); pw.println(meta http-equiv=\Content-Type\ content=\text/html; charset=ISO-8859-1\); pw.println(); pw.println(!-- The Servlet expression tags interpolate script variables into the HTML --); pw.println(); pw.println(titleHello, world!/title); pw.println(/head); pw.println(); pw.println(body bgcolor=white); pw.println(); pw.println(h1Hello, world!/h1); pw.println(); pw.println(/body); pw.close(); } public HelloServlet() {} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: n00b cannot get jar files to work.
Hi, The class itself and web.xml look fine (though we usually tell people to put servlet-name before url-pattern in the servlet-mapping element, for backwards compatibility and/or historical reasons). There's no reason it should work in a jar. Webapps/test/WEB-INF/lib is the right place to put that jar. What are tomcat:tomcat permissions? The permissions should be such that the server user can read the jar. Yoav Shapira Millennium Research Informatics -Original Message- From: Michael Labhard [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 12:39 PM To: [EMAIL PROTECTED] Subject: n00b cannot get jar files to work. How do I get jar files to work? Learning Tomcat I have a simple HelloServlet class. When compiled and the class file is inserted into the directory /opt/tomcat/webapps/test/WEB-INF/classes/example and the web.xml file given below is placed in /opt/tomcat/webapps/test/WEB-INF/ and tomcat is restarted then the url http://localhost:8080/test/hello page reads: Hello, world! But if the same class is placed in a jar file and this jar file is inserted into any of the following directories and given permissions tomcat:tomcat /opt/tomcat/webapps/test/WEB-INF/lib /opt/tomcat/common/lib /opt/tomcat/shared/lib when tomcat is restarted and the same url is addressed first there is Blank page the second time the page is refreshed there is Status 500: javax.servlet.ServletException: Wrapper cannot find servlet class example.HelloServlet or a class it depends on and the third and all subsequent times the page is refreshed there is Status 400: Servlet hello is not available How do I get jar files to work? Thank you. -- Michael Appendix: web.xml file: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 servlet servlet-namehello/servlet-name servlet-classexample.HelloServlet/servlet-class /servlet servlet-mapping url-pattern/hello/url-pattern servlet-namehello/servlet-name /servlet-mapping /web-app HelloServlet.java: package example; import java.io.*; import java.util.*; import javax.servlet.http.*; import javax.servlet.*; public class HelloServlet extends HttpServlet { public void doGet ( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException { res.setContentType(text/html); PrintWriter pw = res.getWriter(); pw.println(!DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.0 Transitional//EN\); pw.println(); pw.println(head); pw.println(meta http-equiv=\Content-Type\ content=\text/html; charset=ISO-8859-1\); pw.println(); pw.println(!-- The Servlet expression tags interpolate script variables into the HTML --); pw.println(); pw.println(titleHello, world!/title); pw.println(/head); pw.println(); pw.println(body bgcolor=white); pw.println(); pw.println(h1Hello, world!/h1); pw.println(); pw.println(/body); pw.close(); } public HelloServlet() {} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: n00b cannot get jar files to work.
Thank you for the reply. I assume that you meant the opposite when you wrote, There's no reason it should work in a jar, and it SHOULD work in a jar. When tomcat was installed it inserted a user and a group both named tomcat on my machine (I'm using Gentoo Linux 2.6.4). However, I changed the permissions to the jar file to my own permissions and group users but that did not help. Anything else I can investigate? I'm really stuck and have been working for days on just this one problem of getting Tomcat to see classes in jar files. Any help would be much appreciated. -- Michael On Thursday 27 May 2004 09:48 am, Shapira, Yoav wrote: Hi, The class itself and web.xml look fine (though we usually tell people to put servlet-name before url-pattern in the servlet-mapping element, for backwards compatibility and/or historical reasons). There's no reason it should work in a jar. Webapps/test/WEB-INF/lib is the right place to put that jar. What are tomcat:tomcat permissions? The permissions should be such that the server user can read the jar. Yoav Shapira Millennium Research Informatics -Original Message- From: Michael Labhard [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 12:39 PM To: [EMAIL PROTECTED] Subject: n00b cannot get jar files to work. How do I get jar files to work? Learning Tomcat I have a simple HelloServlet class. When compiled and the class file is inserted into the directory /opt/tomcat/webapps/test/WEB-INF/classes/example and the web.xml file given below is placed in /opt/tomcat/webapps/test/WEB-INF/ and tomcat is restarted then the url http://localhost:8080/test/hello page reads: Hello, world! But if the same class is placed in a jar file and this jar file is inserted into any of the following directories and given permissions tomcat:tomcat /opt/tomcat/webapps/test/WEB-INF/lib /opt/tomcat/common/lib /opt/tomcat/shared/lib when tomcat is restarted and the same url is addressed first there is Blank page the second time the page is refreshed there is Status 500: javax.servlet.ServletException: Wrapper cannot find servlet class example.HelloServlet or a class it depends on and the third and all subsequent times the page is refreshed there is Status 400: Servlet hello is not available How do I get jar files to work? Thank you. -- Michael Appendix: web.xml file: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 servlet servlet-namehello/servlet-name servlet-classexample.HelloServlet/servlet-class /servlet servlet-mapping url-pattern/hello/url-pattern servlet-namehello/servlet-name /servlet-mapping /web-app HelloServlet.java: package example; import java.io.*; import java.util.*; import javax.servlet.http.*; import javax.servlet.*; public class HelloServlet extends HttpServlet { public void doGet ( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException { res.setContentType(text/html); PrintWriter pw = res.getWriter(); pw.println(!DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.0 Transitional//EN\); pw.println(); pw.println(head); pw.println(meta http-equiv=\Content-Type\ content=\text/html; charset=ISO-8859-1\); pw.println(); pw.println(!-- The Servlet expression tags interpolate script variables into the HTML --); pw.println(); pw.println(titleHello, world!/title); pw.println(/head); pw.println(); pw.println(body bgcolor=white); pw.println(); pw.println(h1Hello, world!/h1); pw.println(); pw.println(/body); pw.close(); } public HelloServlet() {} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail
RE: n00b cannot get jar files to work.
Hi, Try installing it from the normal distribution at jakarta.apache.org, not an RPM or another package specific to your system. The normal distro installation is simple: download and unzip to a directory of your choice. It doesn't created any new users or groups and doesn't require special permissions setup. Yoav Shapira Millennium Research Informatics -Original Message- From: Michael Labhard [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 12:58 PM To: Tomcat Users List Subject: Re: n00b cannot get jar files to work. Thank you for the reply. I assume that you meant the opposite when you wrote, There's no reason it should work in a jar, and it SHOULD work in a jar. When tomcat was installed it inserted a user and a group both named tomcat on my machine (I'm using Gentoo Linux 2.6.4). However, I changed the permissions to the jar file to my own permissions and group users but that did not help. Anything else I can investigate? I'm really stuck and have been working for days on just this one problem of getting Tomcat to see classes in jar files. Any help would be much appreciated. -- Michael On Thursday 27 May 2004 09:48 am, Shapira, Yoav wrote: Hi, The class itself and web.xml look fine (though we usually tell people to put servlet-name before url-pattern in the servlet-mapping element, for backwards compatibility and/or historical reasons). There's no reason it should work in a jar. Webapps/test/WEB-INF/lib is the right place to put that jar. What are tomcat:tomcat permissions? The permissions should be such that the server user can read the jar. Yoav Shapira Millennium Research Informatics -Original Message- From: Michael Labhard [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 12:39 PM To: [EMAIL PROTECTED] Subject: n00b cannot get jar files to work. How do I get jar files to work? Learning Tomcat I have a simple HelloServlet class. When compiled and the class file is inserted into the directory /opt/tomcat/webapps/test/WEB-INF/classes/example and the web.xml file given below is placed in /opt/tomcat/webapps/test/WEB-INF/ and tomcat is restarted then the url http://localhost:8080/test/hello page reads: Hello, world! But if the same class is placed in a jar file and this jar file is inserted into any of the following directories and given permissions tomcat:tomcat /opt/tomcat/webapps/test/WEB-INF/lib /opt/tomcat/common/lib /opt/tomcat/shared/lib when tomcat is restarted and the same url is addressed first there is Blank page the second time the page is refreshed there is Status 500: javax.servlet.ServletException: Wrapper cannot find servlet class example.HelloServlet or a class it depends on and the third and all subsequent times the page is refreshed there is Status 400: Servlet hello is not available How do I get jar files to work? Thank you. -- Michael Appendix: web.xml file: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 servlet servlet-namehello/servlet-name servlet-classexample.HelloServlet/servlet-class /servlet servlet-mapping url-pattern/hello/url-pattern servlet-namehello/servlet-name /servlet-mapping /web-app HelloServlet.java: package example; import java.io.*; import java.util.*; import javax.servlet.http.*; import javax.servlet.*; public class HelloServlet extends HttpServlet { public void doGet ( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException { res.setContentType(text/html); PrintWriter pw = res.getWriter(); pw.println(!DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.0 Transitional//EN\); pw.println(); pw.println(head); pw.println(meta http-equiv=\Content-Type\ content=\text/html; charset=ISO-8859-1\); pw.println(); pw.println(!-- The Servlet expression tags interpolate script variables into the HTML --); pw.println(); pw.println(titleHello, world!/title); pw.println(/head); pw.println(); pw.println(body bgcolor=white); pw.println(); pw.println(h1Hello, world!/h1); pw.println(); pw.println(/body); pw.close(); } public HelloServlet() {} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed
Re: n00b cannot get jar files to work.
Yoav, Trying to learn something here. From what I am reading, I can create several servlets, place them in a jar and put this jar in WEB-INF/lib . Then these servlets are available in my context? Just add mappings! That is what I am reading from this thread. My current understanding is different than this. Doug - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, May 27, 2004 1:01 PM Subject: RE: n00b cannot get jar files to work. Hi, Try installing it from the normal distribution at jakarta.apache.org, not an RPM or another package specific to your system. The normal distro installation is simple: download and unzip to a directory of your choice. It doesn't created any new users or groups and doesn't require special permissions setup. Yoav Shapira Millennium Research Informatics -Original Message- From: Michael Labhard [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 12:58 PM To: Tomcat Users List Subject: Re: n00b cannot get jar files to work. Thank you for the reply. I assume that you meant the opposite when you wrote, There's no reason it should work in a jar, and it SHOULD work in a jar. When tomcat was installed it inserted a user and a group both named tomcat on my machine (I'm using Gentoo Linux 2.6.4). However, I changed the permissions to the jar file to my own permissions and group users but that did not help. Anything else I can investigate? I'm really stuck and have been working for days on just this one problem of getting Tomcat to see classes in jar files. Any help would be much appreciated. -- Michael On Thursday 27 May 2004 09:48 am, Shapira, Yoav wrote: Hi, The class itself and web.xml look fine (though we usually tell people to put servlet-name before url-pattern in the servlet-mapping element, for backwards compatibility and/or historical reasons). There's no reason it should work in a jar. Webapps/test/WEB-INF/lib is the right place to put that jar. What are tomcat:tomcat permissions? The permissions should be such that the server user can read the jar. Yoav Shapira Millennium Research Informatics -Original Message- From: Michael Labhard [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 12:39 PM To: [EMAIL PROTECTED] Subject: n00b cannot get jar files to work. How do I get jar files to work? Learning Tomcat I have a simple HelloServlet class. When compiled and the class file is inserted into the directory /opt/tomcat/webapps/test/WEB-INF/classes/example and the web.xml file given below is placed in /opt/tomcat/webapps/test/WEB-INF/ and tomcat is restarted then the url http://localhost:8080/test/hello page reads: Hello, world! But if the same class is placed in a jar file and this jar file is inserted into any of the following directories and given permissions tomcat:tomcat /opt/tomcat/webapps/test/WEB-INF/lib /opt/tomcat/common/lib /opt/tomcat/shared/lib when tomcat is restarted and the same url is addressed first there is Blank page the second time the page is refreshed there is Status 500: javax.servlet.ServletException: Wrapper cannot find servlet class example.HelloServlet or a class it depends on and the third and all subsequent times the page is refreshed there is Status 400: Servlet hello is not available How do I get jar files to work? Thank you. -- Michael Appendix: web.xml file: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 servlet servlet-namehello/servlet-name servlet-classexample.HelloServlet/servlet-class /servlet servlet-mapping url-pattern/hello/url-pattern servlet-namehello/servlet-name /servlet-mapping /web-app HelloServlet.java: package example; import java.io.*; import java.util.*; import javax.servlet.http.*; import javax.servlet.*; public class HelloServlet extends HttpServlet { public void doGet ( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException { res.setContentType(text/html); PrintWriter pw = res.getWriter(); pw.println(!DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.0 Transitional//EN\); pw.println(); pw.println(head); pw.println(meta http-equiv=\Content-Type\ content=\text/html; charset=ISO-8859-1\); pw.println(); pw.println(!-- The Servlet expression tags interpolate script variables into the HTML --); pw.println(); pw.println(titleHello, world!/title); pw.println(/head); pw.println(); pw.println(body bgcolor=white); pw.println(); pw.println(h1Hello, world!/h1); pw.println(); pw.println(/body
Re: n00b cannot get jar files to work.
Yoav: I would except the machine I am working on is an amd64 Opteron processor and I doubt that the binaries would work. Gentoo built tomcat from the 5.0.18 source and that what I am working with. Any way to confirm that tomcat's classpath actually contains the jar file? -- Michael Hi, Try installing it from the normal distribution at jakarta.apache.org, not an RPM or another package specific to your system. The normal distro installation is simple: download and unzip to a directory of your choice. It doesn't created any new users or groups and doesn't require special permissions setup. Yoav Shapira Millennium Research Informatics - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: n00b cannot get jar files to work.
Hi, I would except the machine I am working on is an amd64 Opteron processor and I doubt that the binaries would work. Gentoo built tomcat from the 5.0.18 source and that what I am working with. Why do you doubt they'd work? I'd give them a shot if I were you -- after all, that IS on of the main points of Java ;) Any way to confirm that tomcat's classpath actually contains the jar file? Displaying the runtime classpath of a webapp can be a bit tricky. It's NOT System.getProperty(java.class.path). The classloader how-to document that ships with tomcat descibres the classpath and loading order. You can configure the logging system to tell you what jars it's deploying on startup. Trying to learn something here. From what I am reading, I can create several servlets, place them in a jar and put this jar in WEB-INF/lib . Then these servlets are available in my context? Just add mappings! That is what I am reading from this thread. My current understanding is different than this. Not just mappings, but also servlet elements. But yes, of course, the rest is correct. What was your understanding?? Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: n00b cannot get jar files to work.
Yoav, So use to doing imports that I didn't think (key words here) about Tomcat making the servlets available from a jar. Was thinking that it would have to be imported to be used. Learn something new each day. Thanks Wonder if the manifest or index of the jar is not correct? That could cause problems. Doug - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, May 27, 2004 1:51 PM Subject: RE: n00b cannot get jar files to work. Hi, I would except the machine I am working on is an amd64 Opteron processor and I doubt that the binaries would work. Gentoo built tomcat from the 5.0.18 source and that what I am working with. Why do you doubt they'd work? I'd give them a shot if I were you -- after all, that IS on of the main points of Java ;) Any way to confirm that tomcat's classpath actually contains the jar file? Displaying the runtime classpath of a webapp can be a bit tricky. It's NOT System.getProperty(java.class.path). The classloader how-to document that ships with tomcat descibres the classpath and loading order. You can configure the logging system to tell you what jars it's deploying on startup. Trying to learn something here. From what I am reading, I can create several servlets, place them in a jar and put this jar in WEB-INF/lib . Then these servlets are available in my context? Just add mappings! That is what I am reading from this thread. My current understanding is different than this. Not just mappings, but also servlet elements. But yes, of course, the rest is correct. What was your understanding?? Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: n00b cannot get jar files to work.
Why do you doubt they'd work? I'd give them a shot if I were you -- after all, that IS on of the main points of Java ;) Oh, I see. It didn't occur to me that Tomcat was itself written in java. But, of course! So I downloaded the binaries and used them for the same tests just as you recommended, however there was no difference at all in the results. The jar file still does not work. By the way, I have double and triple checked that the jar file does indeed contain the very same class. -- Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: n00b cannot get jar files to work.
On Thursday 27 May 2004 11:04 am, Parsons Technical Services wrote: Wonder if the manifest or index of the jar is not correct? That could cause problems. The jar manifest is empty: Manifest-Version: 1.0 Created-By: 1.4.2-rc1 (Blackdown Java-Linux Team) I think this is right. Only signed files should be listed. -- Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: n00b cannot get jar files to work.
Hi, I have no more ideas, but I'm curious as to what JDK you're using. Yoav Shapira Millennium Research Informatics -Original Message- From: Michael Labhard [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 2:27 PM To: Tomcat Users List Subject: Re: n00b cannot get jar files to work. On Thursday 27 May 2004 11:04 am, Parsons Technical Services wrote: Wonder if the manifest or index of the jar is not correct? That could cause problems. The jar manifest is empty: Manifest-Version: 1.0 Created-By: 1.4.2-rc1 (Blackdown Java-Linux Team) I think this is right. Only signed files should be listed. -- Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: n00b cannot get jar files to work.
Yoav: As happens the realization of the solution came to me as a result of our exchanges. I had improperly built the jar file. The servlet was in a package example but the jar file did not contain a directory example that contained the class. It just contained the class. What I should have done is created the jar file and then EXPANDED it in the tomcat webapps class location. Then it would have been clear that the problem was the structure of the jar. Once the jar had a valid structure everything worked. This is the JDK I'm using: blackdown-jdk-1.4.2_rc1. Thank you very much for helping me with this. -- Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: n00b cannot get jar files to work.
Hi, No problem, glad to help -- those little things can be frustrating ;) Yoav Shapira Millennium Research Informatics -Original Message- From: Michael Labhard [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 3:05 PM To: Tomcat Users List Subject: Re: n00b cannot get jar files to work. Yoav: As happens the realization of the solution came to me as a result of our exchanges. I had improperly built the jar file. The servlet was in a package example but the jar file did not contain a directory example that contained the class. It just contained the class. What I should have done is created the jar file and then EXPANDED it in the tomcat webapps class location. Then it would have been clear that the problem was the structure of the jar. Once the jar had a valid structure everything worked. This is the JDK I'm using: blackdown-jdk-1.4.2_rc1. Thank you very much for helping me with this. -- Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Symlinks and jar files
Hey thanks, I removed the symlinks and put the webapp.xml file into the $CATALINA_HOME/conf/Catalina/localhost/ dir Irwin Williams -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 2:09 PM To: Tomcat Users List Subject: RE: Symlinks and jar files Hi, You're misusing the context path attribute completely, so correct that. You don't need to define a symlink in the webapps directory since you have the dspace.xml file. You don't need the Resources className=... in tomcat 5. Yoav Shapira Millennium Research Informatics -Original Message- From: Irwin Williams [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 2:05 PM To: Tomcat Users List Subject: Symlinks and jar files Hi all, I am trying to implement a web app called Dspace. For which, I am using Tomcat (v5) as a standalone servlet container on RH Linux. Everything else in the configuration seems to work fine, but when I try to plug the app into Tomcat via symlinking, Tomcat doesn't seem to find the relevant class files in the prescribed jar packages. In the $CATALINA_HOME/webapps directory, I have defined a symlink, /dspace, which points to /$DSPACE_INSTALL_DIR/jsp. And, in $CATALINA_HOME/conf/Catalina/localhost/dspace.xml, I have defined the context as: ?xml version='1.0' encoding='utf-8'? Context path=$DSPACE_INSTALL_DIR docBase=dspace debug=0 reloadable=true crossContext=true allowLinking=true Resources className=org.apache.naming.resources.FileDirContext/ /Context For example, one of the required files is called 'SimpleAuthenticator.class', and its located in a jar file called dspace.jar. Dspace.jar is located in /WEB-INF/lib. There are other jar files in this directory. Thus, I am wondering if Tomcat has to be explicitly told to look in this jar container, to identify the class as part of the web application. Any help in this regard is appreciated, Regards Irwin Williams -Original Message- From: Chris Purcell [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 12:11 PM To: [EMAIL PROTECTED] Subject: Re: mod_jk In the Apache error.log file, I get this when I restart Apache... [Fri May 14 12:13:40 2004] [notice] SIGHUP received. Attempting to restart No worker file and no worker options in httpd.conf \nuse JkWorkerFile to set workers\n [Fri May 14 12:13:41 2004] [notice] Apache/2.0.49 (Unix) mod_ssl/2.0.49 OpenSSL/0.9.7d configured -- resuming normal operations Does anyone know what that error means? Thanks, Chris Tomcat 4.1.30 Apache 2.0.49 tomcat-connectors-jk-1.2.5 (mod_jk) Red Hat Enterprise Linux ES 3.0 I have Tomcat and Apache both up and running okay, but I'm having a problem with mod_jk. When I try to execute .jsp pages from Apache I get a 500 Internal Server Error. I think this is a configuration issue somewhere in Tomcat. These are the changes I've made /usr/local/apache2/conf/httpd.conf... LoadModule jk_module modules/mod_jk.so Include /usr/local/tomcat/conf/auto/mod_jk.conf /usr/local/tomcat/conf/server.xml... I took the default file and just added two lines... Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/local/apache2/modules/mod_jk.so / !-- Define the default virtual host -- Host name=tux.foo.org debug=0 appBase=webapps unpackWARs=true autoDeploy=true Listener className=org.apache.ajp.tomcat4.config.ApacheConfig append=true forwardAll=false modJk=/usr/local/apache2/modules/mod_jk.so / /usr/local/tomcat/conf/jk/workers.properties. worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 Anyone know whats up? Thanks, Chris - 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] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail
Symlinks and jar files
Hi all, I am trying to implement a web app called Dspace. For which, I am using Tomcat (v5) as a standalone servlet container on RH Linux. Everything else in the configuration seems to work fine, but when I try to plug the app into Tomcat via symlinking, Tomcat doesn't seem to find the relevant class files in the prescribed jar packages. In the $CATALINA_HOME/webapps directory, I have defined a symlink, /dspace, which points to /$DSPACE_INSTALL_DIR/jsp. And, in $CATALINA_HOME/conf/Catalina/localhost/dspace.xml, I have defined the context as: ?xml version='1.0' encoding='utf-8'? Context path=$DSPACE_INSTALL_DIR docBase=dspace debug=0 reloadable=true crossContext=true allowLinking=true Resources className=org.apache.naming.resources.FileDirContext/ /Context For example, one of the required files is called 'SimpleAuthenticator.class', and its located in a jar file called dspace.jar. Dspace.jar is located in /WEB-INF/lib. There are other jar files in this directory. Thus, I am wondering if Tomcat has to be explicitly told to look in this jar container, to identify the class as part of the web application. Any help in this regard is appreciated, Regards Irwin Williams -Original Message- From: Chris Purcell [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 12:11 PM To: [EMAIL PROTECTED] Subject: Re: mod_jk In the Apache error.log file, I get this when I restart Apache... [Fri May 14 12:13:40 2004] [notice] SIGHUP received. Attempting to restart No worker file and no worker options in httpd.conf \nuse JkWorkerFile to set workers\n [Fri May 14 12:13:41 2004] [notice] Apache/2.0.49 (Unix) mod_ssl/2.0.49 OpenSSL/0.9.7d configured -- resuming normal operations Does anyone know what that error means? Thanks, Chris Tomcat 4.1.30 Apache 2.0.49 tomcat-connectors-jk-1.2.5 (mod_jk) Red Hat Enterprise Linux ES 3.0 I have Tomcat and Apache both up and running okay, but I'm having a problem with mod_jk. When I try to execute .jsp pages from Apache I get a 500 Internal Server Error. I think this is a configuration issue somewhere in Tomcat. These are the changes I've made /usr/local/apache2/conf/httpd.conf... LoadModule jk_module modules/mod_jk.so Include /usr/local/tomcat/conf/auto/mod_jk.conf /usr/local/tomcat/conf/server.xml... I took the default file and just added two lines... Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/local/apache2/modules/mod_jk.so / !-- Define the default virtual host -- Host name=tux.foo.org debug=0 appBase=webapps unpackWARs=true autoDeploy=true Listener className=org.apache.ajp.tomcat4.config.ApacheConfig append=true forwardAll=false modJk=/usr/local/apache2/modules/mod_jk.so / /usr/local/tomcat/conf/jk/workers.properties. worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 Anyone know whats up? Thanks, Chris - 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: Symlinks and jar files
Hi, You're misusing the context path attribute completely, so correct that. You don't need to define a symlink in the webapps directory since you have the dspace.xml file. You don't need the Resources className=... in tomcat 5. Yoav Shapira Millennium Research Informatics -Original Message- From: Irwin Williams [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 2:05 PM To: Tomcat Users List Subject: Symlinks and jar files Hi all, I am trying to implement a web app called Dspace. For which, I am using Tomcat (v5) as a standalone servlet container on RH Linux. Everything else in the configuration seems to work fine, but when I try to plug the app into Tomcat via symlinking, Tomcat doesn't seem to find the relevant class files in the prescribed jar packages. In the $CATALINA_HOME/webapps directory, I have defined a symlink, /dspace, which points to /$DSPACE_INSTALL_DIR/jsp. And, in $CATALINA_HOME/conf/Catalina/localhost/dspace.xml, I have defined the context as: ?xml version='1.0' encoding='utf-8'? Context path=$DSPACE_INSTALL_DIR docBase=dspace debug=0 reloadable=true crossContext=true allowLinking=true Resources className=org.apache.naming.resources.FileDirContext/ /Context For example, one of the required files is called 'SimpleAuthenticator.class', and its located in a jar file called dspace.jar. Dspace.jar is located in /WEB-INF/lib. There are other jar files in this directory. Thus, I am wondering if Tomcat has to be explicitly told to look in this jar container, to identify the class as part of the web application. Any help in this regard is appreciated, Regards Irwin Williams -Original Message- From: Chris Purcell [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 12:11 PM To: [EMAIL PROTECTED] Subject: Re: mod_jk In the Apache error.log file, I get this when I restart Apache... [Fri May 14 12:13:40 2004] [notice] SIGHUP received. Attempting to restart No worker file and no worker options in httpd.conf \nuse JkWorkerFile to set workers\n [Fri May 14 12:13:41 2004] [notice] Apache/2.0.49 (Unix) mod_ssl/2.0.49 OpenSSL/0.9.7d configured -- resuming normal operations Does anyone know what that error means? Thanks, Chris Tomcat 4.1.30 Apache 2.0.49 tomcat-connectors-jk-1.2.5 (mod_jk) Red Hat Enterprise Linux ES 3.0 I have Tomcat and Apache both up and running okay, but I'm having a problem with mod_jk. When I try to execute .jsp pages from Apache I get a 500 Internal Server Error. I think this is a configuration issue somewhere in Tomcat. These are the changes I've made /usr/local/apache2/conf/httpd.conf... LoadModule jk_module modules/mod_jk.so Include /usr/local/tomcat/conf/auto/mod_jk.conf /usr/local/tomcat/conf/server.xml... I took the default file and just added two lines... Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/usr/local/apache2/modules/mod_jk.so / !-- Define the default virtual host -- Host name=tux.foo.org debug=0 appBase=webapps unpackWARs=true autoDeploy=true Listener className=org.apache.ajp.tomcat4.config.ApacheConfig append=true forwardAll=false modJk=/usr/local/apache2/modules/mod_jk.so / /usr/local/tomcat/conf/jk/workers.properties. worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 Anyone know whats up? Thanks, Chris - 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] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot access certian jar files in common/lib
Are you running tomcat as root? Is those jar's accessible under the group that Tomcat runs? Also delete upload.jar, and the /work dir and see if your manager app still works without the upload.jar. -Yan -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: May 9, 2004 11:47 To: Tomcat Users List Subject: Cannot access certian jar files in common/lib TAO Linux (Redhat clone) Tomcat 5.0.19 JDK 1.4.2 I have a problem that bugging me to death. I have 4 applications that are loaded along with some static files in ROOT. In each of my applications I use a globalresource to do database connections. The jar is in common/lib. I also use iText in several of the apps and the jar for it is also in common/lib . Now for the weird part. I wanted to use the file upload to push some files to the server. I looked into the code for the manager to get some ideas as well as the api. After writing the class I found that the upload.jar was in server/lib. So I moved it to common/lib and made sure there were no other copies. Really strange is that the manager app still works fine but none of my apps can find the classes from the upload jar.(Yes, many many restarts) For now I have a copy of the jar in the app and all is working fine but why would my app not be able to find the classes when the manager app can? Just another question for the twilight zone. Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot access certian jar files in common/lib
Running Tomcat as tomcat started with jsrv. All directories and files belong to tomcat and tomcat group. Deleted /work and renamed the upload jar. Manager app will fails on upload. Renamed jar back to jar and manager upload works fine. Doug - Original Message - From: Yansheng Lin [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, May 10, 2004 3:30 PM Subject: RE: Cannot access certian jar files in common/lib Are you running tomcat as root? Is those jar's accessible under the group that Tomcat runs? Also delete upload.jar, and the /work dir and see if your manager app still works without the upload.jar. -Yan -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: May 9, 2004 11:47 To: Tomcat Users List Subject: Cannot access certian jar files in common/lib TAO Linux (Redhat clone) Tomcat 5.0.19 JDK 1.4.2 I have a problem that bugging me to death. I have 4 applications that are loaded along with some static files in ROOT. In each of my applications I use a globalresource to do database connections. The jar is in common/lib. I also use iText in several of the apps and the jar for it is also in common/lib . Now for the weird part. I wanted to use the file upload to push some files to the server. I looked into the code for the manager to get some ideas as well as the api. After writing the class I found that the upload.jar was in server/lib. So I moved it to common/lib and made sure there were no other copies. Really strange is that the manager app still works fine but none of my apps can find the classes from the upload jar.(Yes, many many restarts) For now I have a copy of the jar in the app and all is working fine but why would my app not be able to find the classes when the manager app can? Just another question for the twilight zone. Doug - 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]
Cannot access certian jar files in common/lib
TAO Linux (Redhat clone) Tomcat 5.0.19 JDK 1.4.2 I have a problem that bugging me to death. I have 4 applications that are loaded along with some static files in ROOT. In each of my applications I use a globalresource to do database connections. The jar is in common/lib. I also use iText in several of the apps and the jar for it is also in common/lib . Now for the weird part. I wanted to use the file upload to push some files to the server. I looked into the code for the manager to get some ideas as well as the api. After writing the class I found that the upload.jar was in server/lib. So I moved it to common/lib and made sure there were no other copies. Really strange is that the manager app still works fine but none of my apps can find the classes from the upload jar.(Yes, many many restarts) For now I have a copy of the jar in the app and all is working fine but why would my app not be able to find the classes when the manager app can? Just another question for the twilight zone. Doug
FYI: Extra jar files under server/lib are bad!
Hi, I installed a jar file under server/lib to resolve a problem and spent the last few days trying to figure out why it did not work. Apparently, renaming the old jar file to 'xservlets-cgi.jar' is not good enough. beware! Andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Conflicting Jar Files
If I have a jar file in the lib folder of my application, and the same jar file in the commons/lib folder under Tomcat, which set of jar files will get priority when I run the application? Also, will Tomcat use jar files that are outside of it's context? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Conflicting Jar Files
Hi, If I have a jar file in the lib folder of my application, and the same jar file in the commons/lib folder under Tomcat, which set of jar files will get priority when I run the application? WEB-INF/lib. The order is here: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html. Also, will Tomcat use jar files that are outside of it's context? Yes, as you've surmised yourself: common/lib, common/endorsed, shared/lib, server/lib, $JAVA_HOME/jre/lib/ext, anything designated as JVM endorsed classloader directories. Yoav shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Of .war and .jar files - and .jsp class files
That's not quite what I meant, but I shan't want to bother people any more with this question. I can get along with what you told me in another email. Thanks for you time. Malcolm Warren On Thu, 1 Apr 2004 09:06:51 -0600, QM [EMAIL PROTECTED] wrote: : The automatically generated .class files in Tomcat are in the : org.apache.jsp package, but the folders /org/apache/jsp aren't there in : the file system, if you see what I mean. It would have been nice if the : package logic had been followed through. ? I'm not sure I follow. I just checked my own jar of precompiled JSPs and saw the following: org/apache/jsp/index_jsp.class (etc, etc ...) Perhaps I missed this in your original post: do you run Tomcat4 or 5? My knowledge of (Tomcat) precomp is solely from the 5.x series. -QM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Of .war and .jar files - and .jsp class files
Dear QM, Just a footnote to this problem, if you're interested. The difference between Tomcat and Jrun on this problem of packing up the automatcally-generated .class files for .jsps is considerable, and I have to say that in this case Jrun looks more logical. With Tomcat, as you have explained, in order to get it to work you have to create all the servlet mappings. This wasn't necessary in Jrun, because you simply put a .jar file in place of the unpacked classes, and the servlet container had no trouble finding them, because the .jar file was in exactly the same place as the unpacked .class files. For some reason there isn't this easy relationship between the location of the tomcat-generated .class files and the path through the file system. The automatically generated .class files in Tomcat are in the org.apache.jsp package, but the folders /org/apache/jsp aren't there in the file system, if you see what I mean. It would have been nice if the package logic had been followed through. Regards, Malcolm Warren On Wed, 31 Mar 2004 09:50:41 -0600, QM [EMAIL PROTECTED] wrote: On Wed, Mar 31, 2004 at 02:55:16PM +0200, Malcolm Warren wrote: : Now when I transfer everything to my production server I would like to : eliminate all of the .jsp pages from the application, and all of the .java : files, and just send a .jar file containing the .class files in : /work/Standalone/localhost/$applicationDir. You can do this. Sort of. That's what precompilation is all about. Please bear with me: - JSPs get compiled down to servlets, either by you (precompiling) or by the container (at runtime). - when the container compiles a JSP for you, it takes care of mapping the servlet to the context-relative URI that matches the JSP. So /x/y.jsp is mapped, behind the scenes, to some.package.x.y_jsp.class. To precompile the JSPs means you must tell Tomcat yourself which classes map to given URIs. Hence the autogenerated file full of servlet and servlet-mapping entries I described in my last message. - When you precompile, you have can even put the classes into a jar file, but that jar file must be in {dist}/WEB-INF/lib. That's the only way Tomcat's classloader will find the jar. - With the JSPs compiled down to code, and properly mapped in web.xml, you can remove the JSPs from your app. See http://jakarta.apache.org/tomcat/tomcat-5.0-doc/printer/jasper-howto.html#Web%20Application%20Compilation for more details on the precompilation process (assuming TC5). It mentions the generated web.xml fragment of which I spoke. : That way the compilation is already done, and nobody can study my .jsp : files. In theory I could just create a directory tree somewhere of : org/apache/jsp/ copy all the automatically generated .class files into : this directory tree and .jar it all up, and Tomcat should find them either : in /WEB-INF/lib or in /work/Standalone/localhost/$applicationDir, but it : doesn't. Close, except that the jar of JSPs must exist in {dist}/WEB-INF/lib. Tomcat won't load a jar from the context dir itself, aka .//localhost/$applicationDir. Just not how Tomcat works. ;) -QM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Of .war and .jar files - and .jsp class files
Reading http://jakarta.apache.org/tomcat/tomcat-5.0-doc/setup.html I have noticed this quote * *Java location*: The installer will use the registry or the JAVA_HOME environment variable to determine the base path of the JDK or a JRE. If only a JRE (or an incorrect path) is specified, Tomcat will run but will be unable to compile JSP pages at runtime. Either all webapps will need to be precompiled (this can be easily done using the Tomcat deployer), or the |lib\tools.jar| file from a JDK installation must be copied to the |common\lib| path of the Tomcat installation. /quote So your solution is named Tomcat deployer Hope this helps Niki Malcolm Warren wrote: I am changing from Jrun to Tomcat and I have just one problem remaining. Jrun gave an additional security possibility that I am unable to extend to Tomcat. In Jrun you do not need to place your .jsp files, nor the automatically generated .java files on your production server. I could simply .jar up the automatically generated .class files and place the .jar file in the /WEB-INF/jsp folder on the production server. That way I had 3 big advantages: 1) Nobody could look into my .jsp files. 2) Nobody could look into my .java files for my .jsps 3) Compilation on the production server of the .jsps was already done. - Everything was ready in the single .jar file. Now perhaps I am missing something, so please put me right. And I'm just starting now to use ant and I've never bothered with .war files because I don't distribute my programmes, they're just used on our production server. If I create a .war file for the production server then the .war file contains no compiled .jsps, just the original .jsp files - is that right? There seem to me to be obvious advantages to what I was able to do in Jrun - can I do something similar in Tomcat? In general I get many more security features with Tomcat 4.1, than I did with Jrun 3.1, but this particular possibility seems to me to be a good one. I have tried creating .jar files of the Tomcat's /work directory but without any success. Can anybody enlighten me? Thanks for any help. Regards, Malcolm Warren - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Of .war and .jar files - and .jsp class files
Hi, to say that in this case Jrun looks more logical. With Tomcat, as you have explained, in order to get it to work you have to create all the servlet mappings. In order to get what to work? Tomcat will run your JSPs without any mappings in web.xml (except the default JSP servlet of course, which is in the global web.xml). The automatically generated .class files in Tomcat are in the org.apache.jsp package, Only if you don't put them in your own packages, as mentioned in the FAQ. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Of .war and .jar files - and .jsp class files
: The automatically generated .class files in Tomcat are in the : org.apache.jsp package, but the folders /org/apache/jsp aren't there in : the file system, if you see what I mean. It would have been nice if the : package logic had been followed through. ? I'm not sure I follow. I just checked my own jar of precompiled JSPs and saw the following: org/apache/jsp/index_jsp.class (etc, etc ...) Perhaps I missed this in your original post: do you run Tomcat4 or 5? My knowledge of (Tomcat) precomp is solely from the 5.x series. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Of .war and .jar files - and .jsp class files
I am changing from Jrun to Tomcat and I have just one problem remaining. Jrun gave an additional security possibility that I am unable to extend to Tomcat. In Jrun you do not need to place your .jsp files, nor the automatically generated .java files on your production server. I could simply .jar up the automatically generated .class files and place the .jar file in the /WEB-INF/jsp folder on the production server. That way I had 3 big advantages: 1) Nobody could look into my .jsp files. 2) Nobody could look into my .java files for my .jsps 3) Compilation on the production server of the .jsps was already done. - Everything was ready in the single .jar file. Now perhaps I am missing something, so please put me right. And I'm just starting now to use ant and I've never bothered with .war files because I don't distribute my programmes, they're just used on our production server. If I create a .war file for the production server then the .war file contains no compiled .jsps, just the original .jsp files - is that right? There seem to me to be obvious advantages to what I was able to do in Jrun - can I do something similar in Tomcat? In general I get many more security features with Tomcat 4.1, than I did with Jrun 3.1, but this particular possibility seems to me to be a good one. I have tried creating .jar files of the Tomcat's /work directory but without any success. Can anybody enlighten me? Thanks for any help. Regards, Malcolm Warren - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Of .war and .jar files - and .jsp class files
Stick the class files in WEB-INF/classes in the appropriate package hierarchy. Eg. Com.mycompany.myclass in WEB-INF/classes/com/mycompany/myclass.class -Original Message- From: Malcolm Warren [mailto:[EMAIL PROTECTED] Sent: 31 March 2004 11:03 To: [EMAIL PROTECTED] Subject: Of .war and .jar files - and .jsp class files I am changing from Jrun to Tomcat and I have just one problem remaining. Jrun gave an additional security possibility that I am unable to extend to Tomcat. In Jrun you do not need to place your .jsp files, nor the automatically generated .java files on your production server. I could simply .jar up the automatically generated .class files and place the .jar file in the /WEB-INF/jsp folder on the production server. That way I had 3 big advantages: 1) Nobody could look into my .jsp files. 2) Nobody could look into my .java files for my .jsps 3) Compilation on the production server of the .jsps was already done. - Everything was ready in the single .jar file. Now perhaps I am missing something, so please put me right. And I'm just starting now to use ant and I've never bothered with .war files because I don't distribute my programmes, they're just used on our production server. If I create a .war file for the production server then the .war file contains no compiled .jsps, just the original .jsp files - is that right? There seem to me to be obvious advantages to what I was able to do in Jrun - can I do something similar in Tomcat? In general I get many more security features with Tomcat 4.1, than I did with Jrun 3.1, but this particular possibility seems to me to be a good one. I have tried creating .jar files of the Tomcat's /work directory but without any success. Can anybody enlighten me? Thanks for any help. Regards, Malcolm Warren - 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: Of .war and .jar files - and .jsp class files
On Wed, Mar 31, 2004 at 12:02:40PM +0200, Malcolm Warren wrote: : Jrun gave an additional security possibility that I am unable to extend to : Tomcat. In Jrun you do not need to place your .jsp files, nor the : automatically generated .java files on your production server. I could : simply .jar up the automatically generated .class files and place the .jar : file in the /WEB-INF/jsp folder on the production server. Tomcat does something similar: - As one poster already mentioned, keep all of your jar files in WEB-INF/lib. - make sure the JSPs are mapped to servlet paths in WEB-INF/web.xml. (I'm out on a limb here, but it sounds as if Jrun automagically loads your JSP jar file and creates the mappings for you.) If the latter sounds like a pain in the rear, there are Ant tasks to do the precompilation for you and generate the web.xml snippet. : If I create a .war file for the production server then the .war file : contains no compiled .jsps, just the original .jsp files - is that right? Not true. The war file contains whatever you put in it. JSPs, images, jars, whatever. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Of .war and .jar files - and .jsp class files
hi to all it mignt help you out a bit for the nobody could look! look at your %Tomcat_home%/conf/web.xml read the instruction you can disable listing there [EMAIL PROTECTED] administrateur http://entre-nous.qc.tc From: Martin Alley [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: Of .war and .jar files - and .jsp class files Date: Wed, 31 Mar 2004 12:44:14 +0100 Stick the class files in WEB-INF/classes in the appropriate package hierarchy. Eg. Com.mycompany.myclass in WEB-INF/classes/com/mycompany/myclass.class -Original Message- From: Malcolm Warren [mailto:[EMAIL PROTECTED] Sent: 31 March 2004 11:03 To: [EMAIL PROTECTED] Subject: Of .war and .jar files - and .jsp class files I am changing from Jrun to Tomcat and I have just one problem remaining. Jrun gave an additional security possibility that I am unable to extend to Tomcat. In Jrun you do not need to place your .jsp files, nor the automatically generated .java files on your production server. I could simply .jar up the automatically generated .class files and place the .jar file in the /WEB-INF/jsp folder on the production server. That way I had 3 big advantages: 1) Nobody could look into my .jsp files. 2) Nobody could look into my .java files for my .jsps 3) Compilation on the production server of the .jsps was already done. - Everything was ready in the single .jar file. Now perhaps I am missing something, so please put me right. And I'm just starting now to use ant and I've never bothered with .war files because I don't distribute my programmes, they're just used on our production server. If I create a .war file for the production server then the .war file contains no compiled .jsps, just the original .jsp files - is that right? There seem to me to be obvious advantages to what I was able to do in Jrun - can I do something similar in Tomcat? In general I get many more security features with Tomcat 4.1, than I did with Jrun 3.1, but this particular possibility seems to me to be a good one. I have tried creating .jar files of the Tomcat's /work directory but without any success. Can anybody enlighten me? Thanks for any help. Regards, Malcolm Warren - 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] _ MSN Messenger : discutez en direct avec vos amis ! http://messenger.fr.msn.ca/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Of .war and .jar files - and .jsp class files
Thank you very much for your answers, but they haven't quite hit the mark yet. Every .jsp page in Tomcat, as we all know, is compiled in /work/Standalone/localhost/ in an appropriate application folder e.g. _ is the folder in the case of the ROOT application. It's fine by me if this is done when I first access the page in a browser in my test environment. Now when I transfer everything to my production server I would like to eliminate all of the .jsp pages from the application, and all of the .java files, and just send a .jar file containing the .class files in /work/Standalone/localhost/$applicationDir. That way the compilation is already done, and nobody can study my .jsp files. In theory I could just create a directory tree somewhere of org/apache/jsp/ copy all the automatically generated .class files into this directory tree and .jar it all up, and Tomcat should find them either in /WEB-INF/lib or in /work/Standalone/localhost/$applicationDir, but it doesn't. Of course I could be missing the point entirely here, and I shouldn't even by thinking about doing these things, but as I say, in Jrun I could send the automatically generated .jsp .class files to the production environment in a nice .jar file and I had more security because noone could read the original .jsp files, although to be honest there aren't any people in my company who would be interested in reading them, but I feel more secure that way. Any more enlightenment on this would be very helpful. On Wed, 31 Mar 2004 06:00:22 -0600, QM [EMAIL PROTECTED] wrote: On Wed, Mar 31, 2004 at 12:02:40PM +0200, Malcolm Warren wrote: : Jrun gave an additional security possibility that I am unable to extend to : Tomcat. In Jrun you do not need to place your .jsp files, nor the : automatically generated .java files on your production server. I could : simply .jar up the automatically generated .class files and place the .jar : file in the /WEB-INF/jsp folder on the production server. Tomcat does something similar: - As one poster already mentioned, keep all of your jar files in WEB-INF/lib. - make sure the JSPs are mapped to servlet paths in WEB-INF/web.xml. (I'm out on a limb here, but it sounds as if Jrun automagically loads your JSP jar file and creates the mappings for you.) If the latter sounds like a pain in the rear, there are Ant tasks to do the precompilation for you and generate the web.xml snippet. : If I create a .war file for the production server then the .war file : contains no compiled .jsps, just the original .jsp files - is that right? Not true. The war file contains whatever you put in it. JSPs, images, jars, whatever. -QM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Of .war and .jar files - and .jsp class files
Hi, You can precompile your JSPs and include the class files in the WAR. In addition, no one can see the compiled .java files for your JSPs anyways because they're in tomcat's work directory, not in a web-accessible location. Yoav Shapira Millennium Research Informatics -Original Message- From: Malcolm Warren [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 31, 2004 7:55 AM To: Tomcat Users List Subject: Re: Of .war and .jar files - and .jsp class files Thank you very much for your answers, but they haven't quite hit the mark yet. Every .jsp page in Tomcat, as we all know, is compiled in /work/Standalone/localhost/ in an appropriate application folder e.g. _ is the folder in the case of the ROOT application. It's fine by me if this is done when I first access the page in a browser in my test environment. Now when I transfer everything to my production server I would like to eliminate all of the .jsp pages from the application, and all of the .java files, and just send a .jar file containing the .class files in /work/Standalone/localhost/$applicationDir. That way the compilation is already done, and nobody can study my .jsp files. In theory I could just create a directory tree somewhere of org/apache/jsp/ copy all the automatically generated .class files into this directory tree and .jar it all up, and Tomcat should find them either in /WEB-INF/lib or in /work/Standalone/localhost/$applicationDir, but it doesn't. Of course I could be missing the point entirely here, and I shouldn't even by thinking about doing these things, but as I say, in Jrun I could send the automatically generated .jsp .class files to the production environment in a nice .jar file and I had more security because noone could read the original .jsp files, although to be honest there aren't any people in my company who would be interested in reading them, but I feel more secure that way. Any more enlightenment on this would be very helpful. On Wed, 31 Mar 2004 06:00:22 -0600, QM [EMAIL PROTECTED] wrote: On Wed, Mar 31, 2004 at 12:02:40PM +0200, Malcolm Warren wrote: : Jrun gave an additional security possibility that I am unable to extend to : Tomcat. In Jrun you do not need to place your .jsp files, nor the : automatically generated .java files on your production server. I could : simply .jar up the automatically generated .class files and place the .jar : file in the /WEB-INF/jsp folder on the production server. Tomcat does something similar: - As one poster already mentioned, keep all of your jar files in WEB-INF/lib. - make sure the JSPs are mapped to servlet paths in WEB-INF/web.xml. (I'm out on a limb here, but it sounds as if Jrun automagically loads your JSP jar file and creates the mappings for you.) If the latter sounds like a pain in the rear, there are Ant tasks to do the precompilation for you and generate the web.xml snippet. : If I create a .war file for the production server then the .war file : contains no compiled .jsps, just the original .jsp files - is that right? Not true. The war file contains whatever you put in it. JSPs, images, jars, whatever. -QM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Of .war and .jar files - and .jsp class files
I think, he means that he can redistribute his application wihtout giving the person who will install the application on it's server the access to jps code. Obviously no one can access jsp code via web server. Niki Shapira, Yoav wrote: Hi, You can precompile your JSPs and include the class files in the WAR. In addition, no one can see the compiled .java files for your JSPs anyways because they're in tomcat's work directory, not in a web-accessible location. Yoav Shapira Millennium Research Informatics -Original Message- From: Malcolm Warren [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 31, 2004 7:55 AM To: Tomcat Users List Subject: Re: Of .war and .jar files - and .jsp class files Thank you very much for your answers, but they haven't quite hit the mark yet. Every .jsp page in Tomcat, as we all know, is compiled in /work/Standalone/localhost/ in an appropriate application folder e.g. _ is the folder in the case of the ROOT application. It's fine by me if this is done when I first access the page in a browser in my test environment. Now when I transfer everything to my production server I would like to eliminate all of the .jsp pages from the application, and all of the .java files, and just send a .jar file containing the .class files in /work/Standalone/localhost/$applicationDir. That way the compilation is already done, and nobody can study my .jsp files. In theory I could just create a directory tree somewhere of org/apache/jsp/ copy all the automatically generated .class files into this directory tree and .jar it all up, and Tomcat should find them either in /WEB-INF/lib or in /work/Standalone/localhost/$applicationDir, but it doesn't. Of course I could be missing the point entirely here, and I shouldn't even by thinking about doing these things, but as I say, in Jrun I could send the automatically generated .jsp .class files to the production environment in a nice .jar file and I had more security because noone could read the original .jsp files, although to be honest there aren't any people in my company who would be interested in reading them, but I feel more secure that way. Any more enlightenment on this would be very helpful. On Wed, 31 Mar 2004 06:00:22 -0600, QM [EMAIL PROTECTED] wrote: On Wed, Mar 31, 2004 at 12:02:40PM +0200, Malcolm Warren wrote: : Jrun gave an additional security possibility that I am unable to extend to : Tomcat. In Jrun you do not need to place your .jsp files, nor the : automatically generated .java files on your production server. I could : simply .jar up the automatically generated .class files and place the .jar : file in the /WEB-INF/jsp folder on the production server. Tomcat does something similar: - As one poster already mentioned, keep all of your jar files in WEB-INF/lib. - make sure the JSPs are mapped to servlet paths in WEB-INF/web.xml. (I'm out on a limb here, but it sounds as if Jrun automagically loads your JSP jar file and creates the mappings for you.) If the latter sounds like a pain in the rear, there are Ant tasks to do the precompilation for you and generate the web.xml snippet. : If I create a .war file for the production server then the .war file : contains no compiled .jsps, just the original .jsp files - is that right? Not true. The war file contains whatever you put in it. JSPs, images, jars, whatever. -QM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Of .war and .jar files - and .jsp class files
On Wed, Mar 31, 2004 at 02:55:16PM +0200, Malcolm Warren wrote: : Now when I transfer everything to my production server I would like to : eliminate all of the .jsp pages from the application, and all of the .java : files, and just send a .jar file containing the .class files in : /work/Standalone/localhost/$applicationDir. You can do this. Sort of. That's what precompilation is all about. Please bear with me: - JSPs get compiled down to servlets, either by you (precompiling) or by the container (at runtime). - when the container compiles a JSP for you, it takes care of mapping the servlet to the context-relative URI that matches the JSP. So /x/y.jsp is mapped, behind the scenes, to some.package.x.y_jsp.class. To precompile the JSPs means you must tell Tomcat yourself which classes map to given URIs. Hence the autogenerated file full of servlet and servlet-mapping entries I described in my last message. - When you precompile, you have can even put the classes into a jar file, but that jar file must be in {dist}/WEB-INF/lib. That's the only way Tomcat's classloader will find the jar. - With the JSPs compiled down to code, and properly mapped in web.xml, you can remove the JSPs from your app. See http://jakarta.apache.org/tomcat/tomcat-5.0-doc/printer/jasper-howto.html#Web%20Application%20Compilation for more details on the precompilation process (assuming TC5). It mentions the generated web.xml fragment of which I spoke. : That way the compilation is already done, and nobody can study my .jsp : files. In theory I could just create a directory tree somewhere of : org/apache/jsp/ copy all the automatically generated .class files into : this directory tree and .jar it all up, and Tomcat should find them either : in /WEB-INF/lib or in /work/Standalone/localhost/$applicationDir, but it : doesn't. Close, except that the jar of JSPs must exist in {dist}/WEB-INF/lib. Tomcat won't load a jar from the context dir itself, aka .//localhost/$applicationDir. Just not how Tomcat works. ;) -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Of .war and .jar files - and .jsp class files
Ok, thanks. That looks like what I'm looking for. Sorry I didn't catch on after your first missive. On Wed, 31 Mar 2004 09:50:41 -0600, QM [EMAIL PROTECTED] wrote: On Wed, Mar 31, 2004 at 02:55:16PM +0200, Malcolm Warren wrote: : Now when I transfer everything to my production server I would like to : eliminate all of the .jsp pages from the application, and all of the .java : files, and just send a .jar file containing the .class files in : /work/Standalone/localhost/$applicationDir. You can do this. Sort of. That's what precompilation is all about. Please bear with me: - JSPs get compiled down to servlets, either by you (precompiling) or by the container (at runtime). - when the container compiles a JSP for you, it takes care of mapping the servlet to the context-relative URI that matches the JSP. So /x/y.jsp is mapped, behind the scenes, to some.package.x.y_jsp.class. To precompile the JSPs means you must tell Tomcat yourself which classes map to given URIs. Hence the autogenerated file full of servlet and servlet-mapping entries I described in my last message. - When you precompile, you have can even put the classes into a jar file, but that jar file must be in {dist}/WEB-INF/lib. That's the only way Tomcat's classloader will find the jar. - With the JSPs compiled down to code, and properly mapped in web.xml, you can remove the JSPs from your app. See http://jakarta.apache.org/tomcat/tomcat-5.0-doc/printer/jasper-howto.html#Web%20Application%20Compilation for more details on the precompilation process (assuming TC5). It mentions the generated web.xml fragment of which I spoke. : That way the compilation is already done, and nobody can study my .jsp : files. In theory I could just create a directory tree somewhere of : org/apache/jsp/ copy all the automatically generated .class files into : this directory tree and .jar it all up, and Tomcat should find them either : in /WEB-INF/lib or in /work/Standalone/localhost/$applicationDir, but it : doesn't. Close, except that the jar of JSPs must exist in {dist}/WEB-INF/lib. Tomcat won't load a jar from the context dir itself, aka .//localhost/$applicationDir. Just not how Tomcat works. ;) -QM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ClassNotDefError problems within JAR files under Tomcat 4.1.12
Nathan, I am developing an imaging servlet under Tomcat 4.1.12 using JAI 1.1.2. Every time I update my code to add new features, it will return with a NoClassDefFoundError until I restart Tomcat. At that point, it finds the 'missing' class and everything works as expected. I'm no expert on JAI, but I believe that it uses JNI and a native library to do some of it's dirty work. If that's the case, then you should make sure that the JAI JAR file and native library are loaded by a classloader outside (higher than) your webapp. There's documentation on the Tomcat site (and probably other servlet containers, too) that says that native libraries should only be loaded one time. IF they get loaded multiple times (as would happen if they were loaded by the webapp), strange behavior can result. Try putting jai.jar (or whatever) into TOMCAT_HOME/common/lib and jai.so (or whatever) in a convenient place where it can be found. (Sorry, dunno where that might be. Anyone else?) Hope that helps, -chris signature.asc Description: PGP signature signature.asc Description: OpenPGP digital signature
ClassNotDefError problems within JAR files under Tomcat 4.1.12
I am developing an imaging servlet under Tomcat 4.1.12 using JAI 1.1.2. Every time I update my code to add new features, it will return with a NoClassDefFoundError until I restart Tomcat. At that point, it finds the 'missing' class and everything works as expected. Only the superficial ImageIO classes are directly invoked (ImageReader, ImageWriter, ImageIO) - the NoClassDefFoundErrors are always for implementation specific classes (typically com.sun.media.*). I've verified that the files are in JAR files located under /WEB-INF/lib so they should be picked up by Tomcat on a reload. Are the JAR files not scanned for dependencies on a reload? I've never had this problem with classes that I create - I simply place them in /WEB-INF/classes/package specific path/ and they are picked up on a reload with having to restart the entire container. Here is the last error that I saw - this is typical of what I see when these errors occur java.lang.NoClassDefFoundError: com/sun/media/imageioimpl/plugins/jpeg2000/J2KReadState at com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReader.readHeader(J2KImageReader.java:285) at com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReader.getWidth(J2KImageReader.java:235) at edu.wisc.library.ltg.digitalCollections.JP2Image.(JP2Image.java:93) at edu.wisc.library.ltg.digitalCollections.ImageFactory.createImage(ImageFactory.java:73) at edu.wisc.library.ltg.digitalCollections.TestCollectionImpl.getResource(TestCollectionImpl.java:59) at edu.wisc.library.ltg.imageServlet.SimpleImageServlet.doGet(SimpleImageServlet.java:177) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:534) -- Nathan Rogers Library Technology Group 312F Memorial Library 728 State Street - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ClassNotDefError problems within JAR files under Tomcat 4.1.12
I just noticed a slight (but important typo). Sorry for the reply to my own message. It should say and they are picked up on a reload without having to restart the entire container. rather than what it actually does say. Spellcheckers should be smart enough to know what I mean, even if what I said was legal English. :) Nathan Rogers wrote: I am developing an imaging servlet under Tomcat 4.1.12 using JAI 1.1.2. Every time I update my code to add new features, it will return with a NoClassDefFoundError until I restart Tomcat. At that point, it finds the 'missing' class and everything works as expected. Only the superficial ImageIO classes are directly invoked (ImageReader, ImageWriter, ImageIO) - the NoClassDefFoundErrors are always for implementation specific classes (typically com.sun.media.*). I've verified that the files are in JAR files located under /WEB-INF/lib so they should be picked up by Tomcat on a reload. Are the JAR files not scanned for dependencies on a reload? I've never had this problem with classes that I create - I simply place them in /WEB-INF/classes/package specific path/ and they are picked up on a reload with having to restart the entire container. Here is the last error that I saw - this is typical of what I see when these errors occur java.lang.NoClassDefFoundError: com/sun/media/imageioimpl/plugins/jpeg2000/J2KReadState at com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReader.readHeader(J2KImageReader.java:285) at com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReader.getWidth(J2KImageReader.java:235) at edu.wisc.library.ltg.digitalCollections.JP2Image.(JP2Image.java:93) at edu.wisc.library.ltg.digitalCollections.ImageFactory.createImage(ImageFactory.java:73) at edu.wisc.library.ltg.digitalCollections.TestCollectionImpl.getResource(TestCollectionImpl.java:59) at edu.wisc.library.ltg.imageServlet.SimpleImageServlet.doGet(SimpleImageServlet.java:177) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:534) -- Nathan Rogers Library Technology Group 312F Memorial Library 728 State Street 261-1409 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
Re: using jar files in place of class files
That's was exactly the problem, jar-s start work in $CATALINA_HOME/webapps/app/WEB-INF/lib after setting write permission (770) for $CATALINA_TMPDIR, and not for the 'lib'. Thank you. Evgeny Gesin Javadesk --- Jon Wingfield [EMAIL PROTECTED] wrote: Also make sure that the user running tomcat has write permissions to $CATALINA_TMPDIR. That's where the JVM does its temporary io work. HTH, Jon Evgeny Gesin wrote: I set ownership tomcatUser:tomcatUser and permission 770 to the entire path $CATALINA_HOME/webapps/app/WEB-INF/lib, including jar files under 'lib', and then got that exception again. More advice? Evgeny Gesin Javadesk --- Filip Hanik (lists) [EMAIL PROTECTED] wrote: - Root Cause - java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native you have a permission issue on your filesystem, make sure the entire tomcat tree is owned by the user running tomcat Filip -Original Message- From: Evgeny Gesin [mailto:[EMAIL PROTECTED] Sent: Sunday, February 22, 2004 8:46 AM To: Tomcat Users List Subject: Re: using jar files in place of class files When I add any JAR in the WEB-INF/lib I got the following exception. Any advice? Evgeny Gesin Javadesk 2004-02-22 18:38:09 WebappLoader[/myapp]: Deploying class repositories to work directory /usr/java/tomcat/work/Catalina/127.0.0.1:80/myapp 2004-02-22 18:38:09 WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/myapp.jar to /usr/java/tomcat/webapps/myapp/WEB-INF/lib/myapp.jar 2004-02-22 18:38:10 ContextConfig[/myapp] Exception processing JAR at resource path /WEB-INF/lib/myapp.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/myapp.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3582) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) - Root Cause - java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1314) at java.io.File.createTempFile(File.java:1402) at java.io.File.createTempFile(File.java:1439) at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:169) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:164) at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:42) at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:68) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85) at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:6 9) at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:906) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166
RE: using jar files in place of class files
I set ownership tomcatUser:tomcatUser and permission 770 to the entire path $CATALINA_HOME/webapps/app/WEB-INF/lib, including jar files under 'lib', and then got that exception again. More advice? Evgeny Gesin Javadesk --- Filip Hanik (lists) [EMAIL PROTECTED] wrote: - Root Cause - java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native you have a permission issue on your filesystem, make sure the entire tomcat tree is owned by the user running tomcat Filip -Original Message- From: Evgeny Gesin [mailto:[EMAIL PROTECTED] Sent: Sunday, February 22, 2004 8:46 AM To: Tomcat Users List Subject: Re: using jar files in place of class files When I add any JAR in the WEB-INF/lib I got the following exception. Any advice? Evgeny Gesin Javadesk 2004-02-22 18:38:09 WebappLoader[/myapp]: Deploying class repositories to work directory /usr/java/tomcat/work/Catalina/127.0.0.1:80/myapp 2004-02-22 18:38:09 WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/myapp.jar to /usr/java/tomcat/webapps/myapp/WEB-INF/lib/myapp.jar 2004-02-22 18:38:10 ContextConfig[/myapp] Exception processing JAR at resource path /WEB-INF/lib/myapp.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/myapp.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3582) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) - Root Cause - java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1314) at java.io.File.createTempFile(File.java:1402) at java.io.File.createTempFile(File.java:1439) at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:169) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:164) at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:42) at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:68) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85) at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:6 9) at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:906) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3582) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400
Re: using jar files in place of class files
Also make sure that the user running tomcat has write permissions to $CATALINA_TMPDIR. That's where the JVM does its temporary io work. HTH, Jon Evgeny Gesin wrote: I set ownership tomcatUser:tomcatUser and permission 770 to the entire path $CATALINA_HOME/webapps/app/WEB-INF/lib, including jar files under 'lib', and then got that exception again. More advice? Evgeny Gesin Javadesk --- Filip Hanik (lists) [EMAIL PROTECTED] wrote: - Root Cause - java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native you have a permission issue on your filesystem, make sure the entire tomcat tree is owned by the user running tomcat Filip -Original Message- From: Evgeny Gesin [mailto:[EMAIL PROTECTED] Sent: Sunday, February 22, 2004 8:46 AM To: Tomcat Users List Subject: Re: using jar files in place of class files When I add any JAR in the WEB-INF/lib I got the following exception. Any advice? Evgeny Gesin Javadesk 2004-02-22 18:38:09 WebappLoader[/myapp]: Deploying class repositories to work directory /usr/java/tomcat/work/Catalina/127.0.0.1:80/myapp 2004-02-22 18:38:09 WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/myapp.jar to /usr/java/tomcat/webapps/myapp/WEB-INF/lib/myapp.jar 2004-02-22 18:38:10 ContextConfig[/myapp] Exception processing JAR at resource path /WEB-INF/lib/myapp.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/myapp.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3582) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) - Root Cause - java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1314) at java.io.File.createTempFile(File.java:1402) at java.io.File.createTempFile(File.java:1439) at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:169) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:164) at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:42) at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:68) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85) at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:6 9) at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:906) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3582) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400
using jar files in place of class files
I am not sure if it possible. I have a web app that has about 30 class files. I would like to be able to create a jar file that contains these class files for ease of distribution (about 10 laptops). Is this possible, and if so what do I need to put in the web.xml file to make it work? Thanks, -Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: using jar files in place of class files
On Sun, Feb 22, 2004 at 09:37:13AM -0500, Christopher Molnar wrote: : : I am not sure if it possible. I have a web app that has about 30 class : files. I would like to be able to create a jar file that contains these : class files for ease of distribution (about 10 laptops). Is this : possible, and if so what do I need to put in the web.xml file to make : it work? http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html section Quick Start aka, Servlet Spec 2.3, Section 9.5 -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: using jar files in place of class files
When I add any JAR in the WEB-INF/lib I got the following exception. Any advice? Evgeny Gesin Javadesk 2004-02-22 18:38:09 WebappLoader[/myapp]: Deploying class repositories to work directory /usr/java/tomcat/work/Catalina/127.0.0.1:80/myapp 2004-02-22 18:38:09 WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/myapp.jar to /usr/java/tomcat/webapps/myapp/WEB-INF/lib/myapp.jar 2004-02-22 18:38:10 ContextConfig[/myapp] Exception processing JAR at resource path /WEB-INF/lib/myapp.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/myapp.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3582) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) - Root Cause - java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1314) at java.io.File.createTempFile(File.java:1402) at java.io.File.createTempFile(File.java:1439) at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:169) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:164) at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:42) at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:68) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85) at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:69) at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:906) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3582) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) __ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
RE: using jar files in place of class files
- Root Cause - java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native you have a permission issue on your filesystem, make sure the entire tomcat tree is owned by the user running tomcat Filip -Original Message- From: Evgeny Gesin [mailto:[EMAIL PROTECTED] Sent: Sunday, February 22, 2004 8:46 AM To: Tomcat Users List Subject: Re: using jar files in place of class files When I add any JAR in the WEB-INF/lib I got the following exception. Any advice? Evgeny Gesin Javadesk 2004-02-22 18:38:09 WebappLoader[/myapp]: Deploying class repositories to work directory /usr/java/tomcat/work/Catalina/127.0.0.1:80/myapp 2004-02-22 18:38:09 WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/myapp.jar to /usr/java/tomcat/webapps/myapp/WEB-INF/lib/myapp.jar 2004-02-22 18:38:10 ContextConfig[/myapp] Exception processing JAR at resource path /WEB-INF/lib/myapp.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/myapp.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3582) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) - Root Cause - java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1314) at java.io.File.createTempFile(File.java:1402) at java.io.File.createTempFile(File.java:1439) at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:169) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:164) at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:42) at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:68) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85) at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:6 9) at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:906) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3582) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke
Annoying problem when using new jar files
Hi, This is my very first message for this tomcat users' list, so sorry for every mistakes I am going to make. I have apache+tomcat 4 installed on debian, and everything was working fine untill I tried to add a new .jar file. I have added new jar files before and everything has always worked fine. I don't understand why this time is different. The thing is that when I add the new jar file to the classpath and I restart tomcat, nothing fails; but when I try to execute the jsp, I get this error: Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] /opt/tomcat/work/Standalone/localhost/_/4.0/index_jsp.java:10: package XX does not exist [javac] import XX .*; When I take a look at catalina.out I find this: Compile failed; see the compiler error output for details. at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:317) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:466) at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:585) at java.lang.Thread.run(Thread.java:534) The problem is not so annoying so far, but I guess you all see when I say this: I have tried with another test.jar file and test.jsp and nothing fails!!! Why this test.jar works and the other one I want to work doesn't? I have tried to use this .jar file with the resin (another jsp server) and it also fails, may it be that the jar file is corrupted? I have created the jar file in two different computers and both fail. I have read the documentation about tomcat 4.1 and apache, but I have found nothing useful. I have thought about installing the new tomcat 5 but if the test.jar works it means tomcat 4 is working fine, or not? Can anybody help me with this? Thanks in advance, sorry for my rusty english. Gorka Garay Diseo y Desarrollo SISTEMASJUDO Ctra. Basurto - Castrejana, 70 48 002 Bilbao tel / fax (+34) 944 393 061 www.sistemasjudo.com
RE: Annoying problem when using new jar files
What´s import XX .*;? -- De: Gorka Garay[SMTP:[EMAIL PROTECTED] Responder:Tomcat Users List Enviada: segunda-feira, 29 de dezembro de 2003 8:19 Para: [EMAIL PROTECTED] Assunto: Annoying problem when using new jar files Hi, This is my very first message for this tomcat users' list, so sorry for every mistakes I am going to make. I have apache+tomcat 4 installed on debian, and everything was working fine untill I tried to add a new .jar file. I have added new jar files before and everything has always worked fine. I don't understand why this time is different. The thing is that when I add the new jar file to the classpath and I restart tomcat, nothing fails; but when I try to execute the jsp, I get this error: Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] /opt/tomcat/work/Standalone/localhost/_/4.0/index_jsp.java:10: package XX does not exist [javac] import XX .*; When I take a look at catalina.out I find this: Compile failed; see the compiler error output for details. at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:317) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java :473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java :190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicati onFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilter Chain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve. java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve. java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1 80) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValv e.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1 72) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.ja va:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:466) at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:585) at java.lang.Thread.run(Thread.java:534) The problem is not so annoying so far, but I guess you all see when I say this: I have tried with another test.jar file and test.jsp and nothing fails!!! Why this test.jar works and the other one I want to work doesn't? I have tried to use this .jar file with the resin (another jsp server) and it also fails, may it be that the jar file is corrupted? I have created the jar file in two different computers and both fail. I have read the documentation about tomcat 4.1 and apache
Re: Annoying problem when using new jar files
That´s the name of the package that I want to import to my jsp from the .jar file =D - Original Message - From: Edson Alves Pereira [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, December 29, 2003 1:59 PM Subject: RE: Annoying problem when using new jar files What´s import XX .*;? -- De: Gorka Garay[SMTP:[EMAIL PROTECTED] Responder: Tomcat Users List Enviada: segunda-feira, 29 de dezembro de 2003 8:19 Para: [EMAIL PROTECTED] Assunto: Annoying problem when using new jar files Hi, This is my very first message for this tomcat users' list, so sorry for every mistakes I am going to make. I have apache+tomcat 4 installed on debian, and everything was working fine untill I tried to add a new .jar file. I have added new jar files before and everything has always worked fine. I don't understand why this time is different. The thing is that when I add the new jar file to the classpath and I restart tomcat, nothing fails; but when I try to execute the jsp, I get this error: Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] /opt/tomcat/work/Standalone/localhost/_/4.0/index_jsp.java:10: package XX does not exist [javac] import XX .*; When I take a look at catalina.out I find this: Compile failed; see the compiler error output for details. at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:317) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java :473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java :190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicati onFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilter Chain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve. java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve. java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1 80) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValv e.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1 72) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.ja va:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:466) at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:585) at java.lang.Thread.run(Thread.java:534) The problem is not so annoying so far, but I guess you all see when I say this: I have tried with another test.jar file and test.jsp and nothing fails!!! Why this test.jar works and the other one I want to work doesn't? I have
Re: Annoying problem when using new jar files
Have you tried pre-compiling your jsp's with jasper? Do it from your ant build script. (assuming you use ant). --- Gorka Garay [EMAIL PROTECTED] wrote: That´s the name of the package that I want to import to my jsp from the .jar file =D - Original Message - From: Edson Alves Pereira [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, December 29, 2003 1:59 PM Subject: RE: Annoying problem when using new jar files What´s import XX .*;? -- De: Gorka Garay[SMTP:[EMAIL PROTECTED] Responder: Tomcat Users List Enviada: segunda-feira, 29 de dezembro de 2003 8:19 Para: [EMAIL PROTECTED] Assunto: Annoying problem when using new jar files Hi, This is my very first message for this tomcat users' list, so sorry for every mistakes I am going to make. I have apache+tomcat 4 installed on debian, and everything was working fine untill I tried to add a new .jar file. I have added new jar files before and everything has always worked fine. I don't understand why this time is different. The thing is that when I add the new jar file to the classpath and I restart tomcat, nothing fails; but when I try to execute the jsp, I get this error: Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] /opt/tomcat/work/Standalone/localhost/_/4.0/index_jsp.java:10: package XX does not exist [javac] import XX .*; When I take a look at catalina.out I find this: Compile failed; see the compiler error output for details. at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:317) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java :473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java :190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicati onFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilter Chain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve. java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve. java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1 80) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValv e.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1 72) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.ja va:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:466
RE: Annoying problem when using new jar files
Where did you put this jar file with XX? -- De: Gorka Garay[SMTP:[EMAIL PROTECTED] Responder:Tomcat Users List Enviada: segunda-feira, 29 de dezembro de 2003 9:23 Para: Tomcat Users List Assunto: Re: Annoying problem when using new jar files That´s the name of the package that I want to import to my jsp from the .jar file =D - Original Message - From: Edson Alves Pereira [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, December 29, 2003 1:59 PM Subject: RE: Annoying problem when using new jar files What´s import XX .*;? -- De: Gorka Garay[SMTP:[EMAIL PROTECTED] Responder: Tomcat Users List Enviada: segunda-feira, 29 de dezembro de 2003 8:19 Para: [EMAIL PROTECTED] Assunto: Annoying problem when using new jar files Hi, This is my very first message for this tomcat users' list, so sorry for every mistakes I am going to make. I have apache+tomcat 4 installed on debian, and everything was working fine untill I tried to add a new .jar file. I have added new jar files before and everything has always worked fine. I don't understand why this time is different. The thing is that when I add the new jar file to the classpath and I restart tomcat, nothing fails; but when I try to execute the jsp, I get this error: Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] /opt/tomcat/work/Standalone/localhost/_/4.0/index_jsp.java:10: package XX does not exist [javac] import XX .*; When I take a look at catalina.out I find this: Compile failed; see the compiler error output for details. at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:317) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java :473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java :190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicati onFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilter Chain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve. java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve. java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1 80) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValv e.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1 72) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.ja va:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995
Re: Annoying problem when using new jar files
Thanks all of you for your answers, but the problem is solved! The thing was that I was trying to import a package with a wrong name! What a stupid mistake I was making! Sorry for this. I feel embarrassed : ( - Original Message - From: Edson Alves Pereira [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, December 29, 2003 2:53 PM Subject: RE: Annoying problem when using new jar files Where did you put this jar file with XX? -- De: Gorka Garay[SMTP:[EMAIL PROTECTED] Responder: Tomcat Users List Enviada: segunda-feira, 29 de dezembro de 2003 9:23 Para: Tomcat Users List Assunto: Re: Annoying problem when using new jar files That´s the name of the package that I want to import to my jsp from the .jar file =D - Original Message - From: Edson Alves Pereira [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, December 29, 2003 1:59 PM Subject: RE: Annoying problem when using new jar files What´s import XX .*;? -- De: Gorka Garay[SMTP:[EMAIL PROTECTED] Responder: Tomcat Users List Enviada: segunda-feira, 29 de dezembro de 2003 8:19 Para: [EMAIL PROTECTED] Assunto: Annoying problem when using new jar files Hi, This is my very first message for this tomcat users' list, so sorry for every mistakes I am going to make. I have apache+tomcat 4 installed on debian, and everything was working fine untill I tried to add a new .jar file. I have added new jar files before and everything has always worked fine. I don't understand why this time is different. The thing is that when I add the new jar file to the classpath and I restart tomcat, nothing fails; but when I try to execute the jsp, I get this error: Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] /opt/tomcat/work/Standalone/localhost/_/4.0/index_jsp.java:10: package XX does not exist [javac] import XX .*; When I take a look at catalina.out I find this: Compile failed; see the compiler error output for details. at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:317) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java :473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java :190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicati onFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilter Chain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve. java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve. java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1 80) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValv e.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1 72) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995
RE: Annoying problem when using new jar files
Howdy, Don't feel embarrassed, it's a common mistake that not too many people would admit on this list ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Gorka Garay [mailto:[EMAIL PROTECTED] Sent: Monday, December 29, 2003 8:04 AM To: Tomcat Users List Subject: Re: Annoying problem when using new jar files Thanks all of you for your answers, but the problem is solved! The thing was that I was trying to import a package with a wrong name! What a stupid mistake I was making! Sorry for this. I feel embarrassed : ( - Original Message - From: Edson Alves Pereira [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, December 29, 2003 2:53 PM Subject: RE: Annoying problem when using new jar files Where did you put this jar file with XX? -- De: Gorka Garay[SMTP:[EMAIL PROTECTED] Responder: Tomcat Users List Enviada: segunda-feira, 29 de dezembro de 2003 9:23 Para: Tomcat Users List Assunto: Re: Annoying problem when using new jar files That´s the name of the package that I want to import to my jsp from the .jar file =D - Original Message - From: Edson Alves Pereira [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, December 29, 2003 1:59 PM Subject: RE: Annoying problem when using new jar files What´s import XX .*;? -- De: Gorka Garay[SMTP:[EMAIL PROTECTED] Responder: Tomcat Users List Enviada: segunda-feira, 29 de dezembro de 2003 8:19 Para: [EMAIL PROTECTED] Assunto: Annoying problem when using new jar files Hi, This is my very first message for this tomcat users' list, so sorry for every mistakes I am going to make. I have apache+tomcat 4 installed on debian, and everything was working fine untill I tried to add a new .jar file. I have added new jar files before and everything has always worked fine. I don't understand why this time is different. The thing is that when I add the new jar file to the classpath and I restart tomcat, nothing fails; but when I try to execute the jsp, I get this error: Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] /opt/tomcat/work/Standalone/localhost/_/4.0/index_jsp.java:10: package XX does not exist [javac] import XX .*; When I take a look at catalina.out I find this: Compile failed; see the compiler error output for details. at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:317) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java :473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java :190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicati onFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilter Chain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve. java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve. java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1 80) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValv e.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv okeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1
Urgent: referencing external jar files from a jar in WEB-INF/lib
Hello, I just posted a very similar question some time ago, but got no answer until now. see http://marc.theaimsgroup.com/?l=tomcat-userm=106337028016813w=2 I use Tomcat 4.1.27. My question was, if Tomcat ClassLoaders can evaluate the CLASS-PATH attribute set in the manifest of a jar file, to reference external jar files. In the meantime I saw that the common class loader (and also server and shared) can interprete the CLASS-PATH variable of the Manifest file of a jar file. Unfortunately it seems not to work if I put a jar file, that references an external jar file by means of the CLASS-PATH variable in the Manifest, in the WEB-INF/lib of my WAR file. Should this be possible, or not ? Are there any other methods (do I use the wrong one)? As I understood the servlet spec 2.3 chapter 9.7.1 it should be possible by means of the CLASS-PATH attribute: Snippet from the servlet spec 2.3 chapter 9.7.1 WebContainers should be able to recognize declared dependencies expressed in the manifest entry of any of the library JARs under the WEB-INF/lib entry in a WAR So the question is very urgent to me. Please help me. Cheers Karin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Database JAR files
Where's the best place to put the database driver JAR files so all web apps using JDBC can utilize them? Is it ../tomcat/common/classes or ../tomcat/common/lib or ../tomcat/server/lib Thanks, Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Database JAR files
Peter I would think: ../tomcat/common/lib Kind Regards Schalk Neethling Web Developer.Designer.Programmer.CEO Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.co.za This message contains information that is considered to be sensitive or confidential and may not be forwarded or diclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. :: -Original Message- :: From: Peter O'Reilly [mailto:[EMAIL PROTECTED] :: Sent: Saturday, November 08, 2003 7:02 PM :: To: [EMAIL PROTECTED] :: Subject: Database JAR files :: :: Where's the best place to put the database driver JAR files so all web apps :: using JDBC can utilize them? :: :: Is it :: ../tomcat/common/classes :: or :: ../tomcat/common/lib :: or :: ../tomcat/server/lib :: :: Thanks, :: Peter :: :: :: - :: 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: Database JAR files
My preference is /usr/java/lib Granted webapps use these files for the majority, but any other jdbc application can use jdbc as well. Putting them in a more global area will allow for great visibility. Just my thoughts. -Original Message- From: Schalk [mailto:[EMAIL PROTECTED] Sent: Saturday, November 08, 2003 10:10 AM To: 'Tomcat Users List' Subject: RE: Database JAR files Peter I would think: ../tomcat/common/lib Kind Regards Schalk Neethling Web Developer.Designer.Programmer.CEO Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.co.za This message contains information that is considered to be sensitive or confidential and may not be forwarded or diclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. :: -Original Message- :: From: Peter O'Reilly [mailto:[EMAIL PROTECTED] :: Sent: Saturday, November 08, 2003 7:02 PM :: To: [EMAIL PROTECTED] :: Subject: Database JAR files :: :: Where's the best place to put the database driver JAR files so all web apps :: using JDBC can utilize them? :: :: Is it :: ../tomcat/common/classes :: or :: ../tomcat/common/lib :: or :: ../tomcat/server/lib :: :: Thanks, :: Peter :: :: :: - :: 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]
unable to find tld's inside .jar files on 4.1.27
I'm suddenly getting: org.apache.jasper.JasperException: This absolute uri (http://jakarta.apache.org/struts/tags-tiles) cannot be resolved in either web.xml or the jar files deployed with this application Tomcat 4.1.27 and the 10/14 nightly build of Struts. The struts-jar file is in WEB-INF/lib, and it has struts-tiles.tld in META-INF\tlds which has the URI mentioned above. I'm comparing to a working app, and I don't see anything different. I started with the struts-blank webapp, so I've removed the taglib stuff from web.xml and removed the tld files from WEB-INF. Why isn't Tomcat finding the tld in the struts.jar file? I put struts-tiles.tld back in WEB-INF and changed the JSP to: %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % And it works. (Well, now it's complaining about the JSTL core taglib...) -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University, PA, IRM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: unable to find tld's inside .jar files on 4.1.27 [FIXED]
I wrote: Why isn't Tomcat finding the tld in the struts.jar file? Apparently because the !DOCTYPE section was pointed at the Servlet 2.2 DTD. Oops. -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use jar files from CLASSPATH
Howdy, What you should really do is get a DB2 JDBC pure java driver -- they're out there (multiple vendors, some free some not) and perform just as well as type 1 or type 2 drivers. Then put this driver's jar file in WEB-INF/lib. But if you can't do the above, hack tomcat's startup scripts to append $CLASSPATH to its own classpath. If you look at $CATALINA_HOME/bin/catalina.sh, it's easy enough. Yoav Shapira Millennium ChemInformatics -Original Message- From: Zsolt Koppany [mailto:[EMAIL PROTECTED] Sent: Saturday, October 11, 2003 12:56 AM To: Tomcat Users List Subject: How to use jar files from CLASSPATH Hi, my application has to use DB2 JDBC that is in the CLASSPATH. How can I get tomcat-4.1.24 to search for entries from CLASSPATH? I understand that I could probably copy the entries from CLASSPATH into .../WEB-INF/lib, but this JDBC driver does use native libraries, thus I would not like to copy them into .../WEB-INF/lib. This is how CLASSPATH is defined after DB2 installation: .;C:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;C:\PROGRA~1\IBM\SQLLIB\java\d b2jc c .jar;C:\PROGRA~1\IBM\SQLLIB\java\sqlj.zip;C:\PROGRA~1\IBM\SQLLIB\java\d b2jc c _license_cu.jar;C:\PROGRA~1\IBM\SQLLIB\bin;C:\PROGRA~1\IBM\SQLLIB\java\ comm o n.jar As you can see there is even a directory in CLASSPATH (that contains a lot of files). Zsolt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to use jar files from CLASSPATH
Hi, my application has to use DB2 JDBC that is in the CLASSPATH. How can I get tomcat-4.1.24 to search for entries from CLASSPATH? I understand that I could probably copy the entries from CLASSPATH into .../WEB-INF/lib, but this JDBC driver does use native libraries, thus I would not like to copy them into .../WEB-INF/lib. This is how CLASSPATH is defined after DB2 installation: .;C:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc .jar;C:\PROGRA~1\IBM\SQLLIB\java\sqlj.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc _license_cu.jar;C:\PROGRA~1\IBM\SQLLIB\bin;C:\PROGRA~1\IBM\SQLLIB\java\commo n.jar As you can see there is even a directory in CLASSPATH (that contains a lot of files). Zsolt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use jar files from CLASSPATH
tomcat doesn't use the classpath. You can copy your jar into /common/lib and it will be shared by all your webapps. see the classloader doc: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html Charlie -Original Message- From: Zsolt Koppany [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 1:17 AM To: Tomcat Users List Subject: How to use jar files from CLASSPATH Hi, my application has to use DB2 JDBC that is in the CLASSPATH. How can I get tomcat-4.1.24 to search for entries from CLASSPATH? I understand that I could probably copy the entries from CLASSPATH into .../WEB-INF/lib, but this JDBC driver does use native libraries, thus I would not like to copy them into .../WEB-INF/lib. This is how CLASSPATH is defined after DB2 installation: .;C:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;C:\PROGRA~1\IBM\SQLL IB\java\db2jcc .jar;C:\PROGRA~1\IBM\SQLLIB\java\sqlj.zip;C:\PROGRA~1\IBM\SQLL IB\java\db2jcc _license_cu.jar;C:\PROGRA~1\IBM\SQLLIB\bin;C:\PROGRA~1\IBM\SQL LIB\java\commo n.jar As you can see there is even a directory in CLASSPATH (that contains a lot of files). Zsolt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to use jar files from CLASSPATH
Hi, my application has to use DB2 JDBC that is in the CLASSPATH. How can I get tomcat-4.1.24 to search for entries from CLASSPATH? I understand that I could probably copy the entries from CLASSPATH into .../WEB-INF/lib, but this JDBC driver does use native libraries, thus I would not like to copy them into .../WEB-INF/lib. This is how CLASSPATH is defined after DB2 installation: .;C:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc .jar;C:\PROGRA~1\IBM\SQLLIB\java\sqlj.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc _license_cu.jar;C:\PROGRA~1\IBM\SQLLIB\bin;C:\PROGRA~1\IBM\SQLLIB\java\commo n.jar As you can see there is even a directory in CLASSPATH (that contains a lot of files). Zsolt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
packaging jsps in jar files
Hi, is it possible to package jsp files within a jar file so that the jsps will be available if the jar is placed within the WEB-INF dir of some web application. I have developed a utility for web-apps that has both jsp and servlet components. I am lazy and so would like to be able to make this utility available within other web apps simply be placing a jar file within the WEB-INF dir. The alternative is to place the various components of the utility in the appropriate places within the webapp. thanks Nathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Fail to load webapp's jar files using Tomcat 4.1.x
Howdy, Are you sure the account running the tomcat server has write access to $CATALINA_HOME/work? Yoav Shapira Millennium ChemInformatics -Original Message- From: Jochen Schweflinghaus [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 8:49 AM To: [EMAIL PROTECTED] Subject: Fail to load webapp's jar files using Tomcat 4.1.x Hi, I have a Problem I assumed to be addressed by Ticket 13519 (allowLinking is not working (for me).)in the Apache Bug Database, which is said to be fixed with Tomcat versions 4.1.13+. Unfortunately I still have the Problem when trying to migrate from Tomcat 4.0.4 to 4.1.24 using J2SDK 1.4.1_02 under RH Linux. The Problem is following: My application runs fine under Tomcat 4.0.4,but when switching to Tomcat 4.1.24 by switching CATALINA_HOME, Application's jar files are not loaded any more from the WEB-INF/lib folder on startup. The output to the Contexts log is: 2003-06-04 13:26:46 WebappLoader[/prod]: Deploying class repositories to work directory /prod/work/Apache/localhost/prod 2003-06-04 13:26:47 WebappLoader[/prod]: Deploy JAR /WEB-INF/lib/scheduler.jar to /prod/webapps/scheduler/WEB-INF/lib/scheduler.jar 2003-06-04 13:26:47 ContextConfig[/prod] Exception processing JAR at resource path /WEB-INF/lib/scheduler.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/scheduler.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java :930 ) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:86 8) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig. java :243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleS uppo rt.java:166) ... (some more stack trace) - Root Cause - java.io.IOException: No such file or directory at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1313) at java.io.File.createTempFile(File.java:1401) at java.io.File.createTempFile(File.java:1438) at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:169) ... (some more stack trace) I have to mention, that the jar files in the WEB-INF/lib directory are symbolyc links. When searching the web for answers, I found the 'new' Resources component, which may be nested into a Context. So I tried the Context definition below in my server.xml, but still get the same result. Context path=/prod docBase=scheduler debug=0 reloadable=false crossContext=true Resources className=org.apache.naming.resources.FileDirContext allowLinking=true/ Logger className=org.apache.catalina.logger.FileLogger directory=/prod/scheduler/log prefix=scheduler_tomcat suffix=.log timestamp=true verbosity=2/ /Context I highly appreciate any help ! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fail to load webapp's jar files using Tomcat 4.1.x
Do you have a directory named temp in your $CATALINA_BASE ? If you don't have it, you should create it. Dorin - Original Message - From: Jochen Schweflinghaus [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 3:48 PM Subject: Fail to load webapp's jar files using Tomcat 4.1.x Hi, I have a Problem I assumed to be addressed by Ticket 13519 (allowLinking is not working (for me).)in the Apache Bug Database, which is said to be fixed with Tomcat versions 4.1.13+. Unfortunately I still have the Problem when trying to migrate from Tomcat 4.0.4 to 4.1.24 using J2SDK 1.4.1_02 under RH Linux. The Problem is following: My application runs fine under Tomcat 4.0.4,but when switching to Tomcat 4.1.24 by switching CATALINA_HOME, Application's jar files are not loaded any more from the WEB-INF/lib folder on startup. The output to the Contexts log is: 2003-06-04 13:26:46 WebappLoader[/prod]: Deploying class repositories to work directory /prod/work/Apache/localhost/prod 2003-06-04 13:26:47 WebappLoader[/prod]: Deploy JAR /WEB-INF/lib/scheduler.jar to /prod/webapps/scheduler/WEB-INF/lib/scheduler.jar 2003-06-04 13:26:47 ContextConfig[/prod] Exception processing JAR at resource path /WEB-INF/lib/scheduler.jar javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/scheduler.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java: 243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:166) ... (some more stack trace) - Root Cause - java.io.IOException: No such file or directory at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1313) at java.io.File.createTempFile(File.java:1401) at java.io.File.createTempFile(File.java:1438) at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:169) ... (some more stack trace) I have to mention, that the jar files in the WEB-INF/lib directory are symbolyc links. When searching the web for answers, I found the 'new' Resources component, which may be nested into a Context. So I tried the Context definition below in my server.xml, but still get the same result. Context path=/prod docBase=scheduler debug=0 reloadable=false crossContext=true Resources className=org.apache.naming.resources.FileDirContext allowLinking=true/ Logger className=org.apache.catalina.logger.FileLogger directory=/prod/scheduler/log prefix=scheduler_tomcat suffix=.log timestamp=true verbosity=2/ /Context I highly appreciate any help ! - 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]