RE: classpath problem?
From: Bagus [mailto:[EMAIL PROTECTED] Subject: classpath problem? echo $CLASSPATH .:/www/my_tomcat_apps:/usr/local/jakarta-tomcat-5.4.4/ ^ | Want to make that 5.5.4 and see what happens? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: classpath of a filter
You'd have to let your web app also be able to use the server classloader. You can do this by setting server=true in the Context declaration. That being said - whatever your trying to do is probably a very bad idea. -Tim Brij Naald wrote: Hi, i'm creating a filter which needs to know if the request is an instance of org.apache.catalina.connector.RequestFacade. When executing the 'if (request instanceof RequestFacade)' the program gives an error for that line: java.lang.NoClassDefFoundError: org/apache/catalina/connector/RequestFacade I guess the RequestFacade is only in the classpath of the tomcat-server, and not in the one of the servlet itself. Does anyone know how I can solve this problem? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: classpath with a service help
On Mon, Sep 20, 2004 at 03:16:10PM -0700, John MccLain wrote: : I wish to deploy Tomct5.0.28 along with a webapp. I want to be able to : insure that Tomcat is deployed as a service, uses the standard classpath AND : 1 more classpath entry. How can I set up the Tomcat windows installer to : setup Tomcat as a service and include a specific directory on the classpath? : Do I simply change ...tomcat/bin/service.bat (is that all that the installer : runs)? if so, then how? I would prefer to not haveto have clients manually : configuring classpath's for windows services. Tomcat (and most other web containers) don't use the classpath as set as an environment variable or on the commandline. They use 1/ the JARs in the webapp's WEB-INF/lib and bare class files in WEB-INF/classes 2/ some container-specific hierarchy of classloaders, usually in a chain-of-responsibility pattern. Tomcat uses {Tomcat install}/common/lib {Tomcat install}/common/classes {Tomcat install}/shared/lib {Tomcat install}/shared/classes {Tomcat install}/server/lib {Tomcat install}/server/classes (though probably not in that order ;) Long story short: if you use the container's (and the spec's) method of making classes available, there should be no need to set a classpath. Make your one other entry available in one of the places mentioned above. -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: CLASSPATH in Windows XP
My first thought on this will be that the space, i.e. Servidor web, might be the cause. Not all installation does have a problem with but, I know some apps does have a problem with folders that contain spaces. HTH! Javier wrote: Hello, I have Tomcat 5 running in Windows XP. Now I want to install Apache SOAP and AXIS not copying the jar files into Tomcat5/common/lib but setting their paths in CLASSPATH, like installation instructions of SOAP and AXIS says. It doesnt work (copying the files all works fine). This is my CLASSPATH: C:\Servidor web\AXIS 1.1\lib\axis.jar;C:\Servidor web\XML Security 1.1.0\libs\xmlsec.jar;C:\Servidor web\Xerces 2.5.0\xmlParserAPIs.jar;C:\Servidor web\Xerces 2.5.0\xml-apis.jar;C:\Servidor web\Xerces 2.5.0\xercesImpl.jar;C:\Servidor web\JAVA Mail 1.3.2ea\mail.jar;C:\Servidor web\JAF 1.0.2\activation.jar;C:\Servidor web\SOAP 2.3.1\lib\soap.jar;C:\WINDOWS\System32\QTJava.zip Does Tomcat use this CLASSPATH? How can I tell Tomcat to use that? Thanks. -- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President 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 disclosed 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. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CLASSPATH in Windows XP
On Fri, Aug 20, 2004 at 12:29:25PM +0200, Javier wrote: : Does Tomcat use this CLASSPATH? How can I tell Tomcat to use that? You *really* want to follow standards here, and using a classpath env var with a webapp is not quite standard. Review the servlet spec. Do a search for WEB-INF/lib and understand why you need to put the jars there. -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: Classpath problems with tomcat on Linux 9
Figured out my problem. I wasn't placing the class file in a subdirectory of the WEB-INF/classes/package. Solution: created UserData.java with package name userdata created directory WEB-INF/classes/userdata placed UserData.class in WEB-INF/classes/userdata Thank you all who responded, and anyone else that read this and spent more then the time to click the delete button on it. -Andy. On Monday 19 April 2004 12:27 pm, Stephen Bacon wrote: Hi Andy, I'm porting over to TC5 and I've not had any problems with it finding my classes, *BUT* I don't put any classes into the base directory itself, but below that. So for example, my UserBean class is in myapp/WEB-INF/classes/AccessCtrl and it is part of the package AccessCtrl (i.e. first line of bean is package AccessCtrl;) The pages that use this include the directive: %@ page import=AccessCtrl.* % so that it can find them. Additionally, to avoid problems, I generally include the packagename anyways in my useBean tags: jsp:useBean id=beanUser class=AccessCtrl.UserBean scope=session / Which shouldn't be necessary, but I find it increases readability anyways. -Steve Andy Wadsworth wrote: Should I expect Tomcat to find my UserData.class file if I put it in webapps/myapp/WEB-INF/classes? Do I need to create a web.xml or should it find the class file without any web.xml customization? If anyone has a very simple example that I could drop in to see if it works, I'd appreciate it. I've already verified that the jsp-examples all work, but there is a lot of stuff in the web.xml that I shouldn't need for what I want to do, and finding what I need is probably where my problems lie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ### # Andy Wadsworth # # # # BondMart Technologies, Inc. # # [EMAIL PROTECTED] # # # ### Historical High School Essay Bloopers: They (Greeks) also had myths. A myth is a female moth. One myth says that the mother of Achilles dipped him in the River Stynx until he became intollerable. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classpath problems with tomcat on Linux 9
Still no luck. I'm basically trying to do exactly the same thing that the jsp-examples/checkbox is doing and I can't get Tomcat to recognize my UserData.class file. I've tried placing my UserData.class file in every location possible, and no luck. My next step will be to downgrade to Tomcat 4 so I can at least try out the examples that are described in the Tomcat Bible (the examples don't work with Tomcat 5). Should I expect Tomcat to find my UserData.class file if I put it in webapps/myapp/WEB-INF/classes? Do I need to create a web.xml or should it find the class file without any web.xml customization? If anyone has a very simple example that I could drop in to see if it works, I'd appreciate it. I've already verified that the jsp-examples all work, but there is a lot of stuff in the web.xml that I shouldn't need for what I want to do, and finding what I need is probably where my problems lie. -Andy. On Friday 16 April 2004 07:32 pm, Berry, Layton wrote: I'm guessing you need to put the UserData class in a package, and import it into your savename page. Quoting from JSP 2.0 spec, As of JSP 2.0, it is illegal to refer to any classes from the unnamed (a.k.a. default) package. -Layton -Original Message- From: Andy Wadsworth [mailto:[EMAIL PROTECTED] Sent: Friday, April 16, 2004 2:26 PM To: [EMAIL PROTECTED] Subject: Classpath problems with tomcat on Linux 9 I'm just getting started with my JSP and tomcat experience, and while learning how JSP works, I'm can't get tomcat to recognize supporting class definitions that I have placed in myapp/WEB-INF/classes. Here's my setup: * tomcat 5.0.19, running on RedHat Linux 9.0 Pro * no customization to $CATALINA_HOME/conf/web.xml no customization to $CATALINA_HOME/conf/server.xml added my user account as a manager in $CATALINA_HOME/conf/tomcat-users.xml * I'm running tomcat using the $CATALINA_HOME/bin/startup.sh * I'm running tomcat as my normal login id, although I've also tried it as root just to make sure it wasn't a file permissions issue. * I'm able to use the Tomcat manager at http://localhost:8080/manager to start/stop/reload/deploy applications * The jsp-examples appear to work fine Here's what I'm trying to do: * Created the following index.jsp and placed it in $CATALINA_HOME/webapps/test htmlbody form method=post action =savename.jsp What's your name? input type=text name=username size=20 What's your email? input type=text name=email size=20 Pinput type=submit /form/body/html * Created the following as $CATALINA_HOME/webapps/test/savename.jsp jsp:useBean id=user class=UserData scope=session/ jsp:setProperty name=user property=*/ htmlbody Name: %= user.getUsername() %BR Email: %= user.getEmail() %BR /body/html * Created a UserData.java file that defines a public class UserData with username and email fields as type String. Added public access methods for setUsername, getUsername, setEmail, getEmail. I compiled UserData.java using javac, and to produce UserData.class which I placed in $CATALINA_HOME/webapps/test/WEB-INF/classes. The UserData.java class does not define a package nor does it import anything (line 1 is public class UserData) * deployed the test application using the tomcat manager and it shows that the application is deployed with no errors. * Using IE 6.0, I enter the url to test.jsp and it displays the form as expected. I enter a name and email value into the form and press the submit button and I get the following: HTTP Status 500 - exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 1 in jsp file: /savename.jsp Generated sevlet error: [javac] Compiling 1 source file .../work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42 symbol : class UserData location: class org.apache.jsp.savename_jsp UserDAta user = null I suspect this is a classpath issue but everything I read says that if you put your classes in appdir/WEB-INF/classes, it will just work. There must be some basic thing I'm missing. Any help would be very much apprciated. Thanks in advance. -Andy. -- ### # Andy Wadsworth # # # # BondMart Technologies, Inc. # # [EMAIL PROTECTED] # # # ### - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ### # Andy Wadsworth # # # # BondMart Technologies, Inc. # # [EMAIL PROTECTED] # # # ### The average woman
Re: Classpath problems with tomcat on Linux 9
Hi Andy, I'm porting over to TC5 and I've not had any problems with it finding my classes, *BUT* I don't put any classes into the base directory itself, but below that. So for example, my UserBean class is in myapp/WEB-INF/classes/AccessCtrl and it is part of the package AccessCtrl (i.e. first line of bean is package AccessCtrl;) The pages that use this include the directive: %@ page import=AccessCtrl.* % so that it can find them. Additionally, to avoid problems, I generally include the packagename anyways in my useBean tags: jsp:useBean id=beanUser class=AccessCtrl.UserBean scope=session / Which shouldn't be necessary, but I find it increases readability anyways. -Steve Andy Wadsworth wrote: Should I expect Tomcat to find my UserData.class file if I put it in webapps/myapp/WEB-INF/classes? Do I need to create a web.xml or should it find the class file without any web.xml customization? If anyone has a very simple example that I could drop in to see if it works, I'd appreciate it. I've already verified that the jsp-examples all work, but there is a lot of stuff in the web.xml that I shouldn't need for what I want to do, and finding what I need is probably where my problems lie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classpath problems with tomcat on Linux 9
Hi, You need the %@ page import=package % directive to tell it where to look for it. Yang -Original Message- From: Andy Wadsworth [mailto:[EMAIL PROTECTED] Sent: Monday, April 19, 2004 3:11 PM To: Tomcat Users List Subject: Re: Classpath problems with tomcat on Linux 9 Still no luck. I'm basically trying to do exactly the same thing that the jsp-examples/checkbox is doing and I can't get Tomcat to recognize my UserData.class file. I've tried placing my UserData.class file in every location possible, and no luck. My next step will be to downgrade to Tomcat 4 so I can at least try out the examples that are described in the Tomcat Bible (the examples don't work with Tomcat 5). Should I expect Tomcat to find my UserData.class file if I put it in webapps/myapp/WEB-INF/classes? Do I need to create a web.xml or should it find the class file without any web.xml customization? If anyone has a very simple example that I could drop in to see if it works, I'd appreciate it. I've already verified that the jsp-examples all work, but there is a lot of stuff in the web.xml that I shouldn't need for what I want to do, and finding what I need is probably where my problems lie. -Andy. On Friday 16 April 2004 07:32 pm, Berry, Layton wrote: I'm guessing you need to put the UserData class in a package, and import it into your savename page. Quoting from JSP 2.0 spec, As of JSP 2.0, it is illegal to refer to any classes from the unnamed (a.k.a. default) package. -Layton -Original Message- From: Andy Wadsworth [mailto:[EMAIL PROTECTED] Sent: Friday, April 16, 2004 2:26 PM To: [EMAIL PROTECTED] Subject: Classpath problems with tomcat on Linux 9 I'm just getting started with my JSP and tomcat experience, and while learning how JSP works, I'm can't get tomcat to recognize supporting class definitions that I have placed in myapp/WEB-INF/classes. Here's my setup: * tomcat 5.0.19, running on RedHat Linux 9.0 Pro * no customization to $CATALINA_HOME/conf/web.xml no customization to $CATALINA_HOME/conf/server.xml added my user account as a manager in $CATALINA_HOME/conf/tomcat-users.xml * I'm running tomcat using the $CATALINA_HOME/bin/startup.sh * I'm running tomcat as my normal login id, although I've also tried it as root just to make sure it wasn't a file permissions issue. * I'm able to use the Tomcat manager at http://localhost:8080/manager to start/stop/reload/deploy applications * The jsp-examples appear to work fine Here's what I'm trying to do: * Created the following index.jsp and placed it in $CATALINA_HOME/webapps/test htmlbody form method=post action =savename.jsp What's your name? input type=text name=username size=20 What's your email? input type=text name=email size=20 Pinput type=submit /form/body/html * Created the following as $CATALINA_HOME/webapps/test/savename.jsp jsp:useBean id=user class=UserData scope=session/ jsp:setProperty name=user property=*/ htmlbody Name: %= user.getUsername() %BR Email: %= user.getEmail() %BR /body/html * Created a UserData.java file that defines a public class UserData with username and email fields as type String. Added public access methods for setUsername, getUsername, setEmail, getEmail. I compiled UserData.java using javac, and to produce UserData.class which I placed in $CATALINA_HOME/webapps/test/WEB-INF/classes. The UserData.java class does not define a package nor does it import anything (line 1 is public class UserData) * deployed the test application using the tomcat manager and it shows that the application is deployed with no errors. * Using IE 6.0, I enter the url to test.jsp and it displays the form as expected. I enter a name and email value into the form and press the submit button and I get the following: HTTP Status 500 - exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 1 in jsp file: /savename.jsp Generated sevlet error: [javac] Compiling 1 source file .../work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42 symbol : class UserData location: class org.apache.jsp.savename_jsp UserDAta user = null I suspect this is a classpath issue but everything I read says that if you put your classes in appdir/WEB-INF/classes, it will just work. There must be some basic thing I'm missing. Any help would be very much apprciated. Thanks in advance. -Andy. -- ### # Andy Wadsworth # # # # BondMart Technologies, Inc. # # [EMAIL PROTECTED] # # # ### - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands
RE: Classpath problems with tomcat on Linux 9
From: Andy Wadsworth [mailto:[EMAIL PROTECTED] Subject: Classpath problems with tomcat on Linux 9 .../work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42 symbol : class UserData location: class org.apache.jsp.savename_jsp UserDAta user = null ^ | Seems awfully suspicious to have a capital A in the middle of the class name... Are you sure the .jsp doesn't have a typo in it? - Chuck - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classpath problems with tomcat on Linux 9
Ah, if it was only that simple... The capital A is a typo in the email message, not in the actual error. I'm using IE on a WinXP box as my browser, but I sent my email from my Linux machine and I can't copy/paste between the two. -Andy. On Friday 16 April 2004 03:32 pm, Caldarale, Charles R wrote: From: Andy Wadsworth [mailto:[EMAIL PROTECTED] Subject: Classpath problems with tomcat on Linux 9 .../work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42 symbol : class UserData location: class org.apache.jsp.savename_jsp UserDAta user = null ^ Seems awfully suspicious to have a capital A in the middle of the class name... Are you sure the .jsp doesn't have a typo in it? - Chuck - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ### # Andy Wadsworth # # # # BondMart Technologies, Inc. # # [EMAIL PROTECTED] # # # ### How To Make Love Endure... Don't forget your wife's name ... That will mess up the love. Erin, age 8 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classpath problems with tomcat on Linux 9
I'm guessing you need to put the UserData class in a package, and import it into your savename page. Quoting from JSP 2.0 spec, As of JSP 2.0, it is illegal to refer to any classes from the unnamed (a.k.a. default) package. -Layton -Original Message- From: Andy Wadsworth [mailto:[EMAIL PROTECTED] Sent: Friday, April 16, 2004 2:26 PM To: [EMAIL PROTECTED] Subject: Classpath problems with tomcat on Linux 9 I'm just getting started with my JSP and tomcat experience, and while learning how JSP works, I'm can't get tomcat to recognize supporting class definitions that I have placed in myapp/WEB-INF/classes. Here's my setup: * tomcat 5.0.19, running on RedHat Linux 9.0 Pro * no customization to $CATALINA_HOME/conf/web.xml no customization to $CATALINA_HOME/conf/server.xml added my user account as a manager in $CATALINA_HOME/conf/tomcat-users.xml * I'm running tomcat using the $CATALINA_HOME/bin/startup.sh * I'm running tomcat as my normal login id, although I've also tried it as root just to make sure it wasn't a file permissions issue. * I'm able to use the Tomcat manager at http://localhost:8080/manager to start/stop/reload/deploy applications * The jsp-examples appear to work fine Here's what I'm trying to do: * Created the following index.jsp and placed it in $CATALINA_HOME/webapps/test htmlbody form method=post action =savename.jsp What's your name? input type=text name=username size=20 What's your email? input type=text name=email size=20 Pinput type=submit /form/body/html * Created the following as $CATALINA_HOME/webapps/test/savename.jsp jsp:useBean id=user class=UserData scope=session/ jsp:setProperty name=user property=*/ htmlbody Name: %= user.getUsername() %BR Email: %= user.getEmail() %BR /body/html * Created a UserData.java file that defines a public class UserData with username and email fields as type String. Added public access methods for setUsername, getUsername, setEmail, getEmail. I compiled UserData.java using javac, and to produce UserData.class which I placed in $CATALINA_HOME/webapps/test/WEB-INF/classes. The UserData.java class does not define a package nor does it import anything (line 1 is public class UserData) * deployed the test application using the tomcat manager and it shows that the application is deployed with no errors. * Using IE 6.0, I enter the url to test.jsp and it displays the form as expected. I enter a name and email value into the form and press the submit button and I get the following: HTTP Status 500 - exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 1 in jsp file: /savename.jsp Generated sevlet error: [javac] Compiling 1 source file .../work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42 symbol : class UserData location: class org.apache.jsp.savename_jsp UserDAta user = null I suspect this is a classpath issue but everything I read says that if you put your classes in appdir/WEB-INF/classes, it will just work. There must be some basic thing I'm missing. Any help would be very much apprciated. Thanks in advance. -Andy. -- ### # Andy Wadsworth # # # # BondMart Technologies, Inc. # # [EMAIL PROTECTED] # # # ### - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ClassPath with Tomcat 4.1
Classes for your webapp are looked for in either : WEB-INF/lib; as a jar file or WEB-INF/classes; non jar files So for example if you have a jar file that you want to use in your web app, put them in your webapp's WEB-INF/lib. You should be able to use them. David LAFAY wrote: Hello, Tomcat 3.x have a wrapper.properties file. Where is it on tomcat 4.1.x release. I don't know how to configure classpath for my webApp Thanks, David [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: ClassPath with Tomcat 4.1
Thanks but... When the following code : System.getProperty(java.class.path) return only C:\Program Files\Apache Group\Tomcat 4.1.27\bin\bootstrap.jar It is a problem for me because I use the java.class.path to search my properties files And then I don't find it ! Kwok Peng Tuck [EMAIL PROTECTED] a écrit dans le message news: [EMAIL PROTECTED] Classes for your webapp are looked for in either : WEB-INF/lib; as a jar file or WEB-INF/classes; non jar files So for example if you have a jar file that you want to use in your web app, put them in your webapp's WEB-INF/lib. You should be able to use them. David LAFAY wrote: Hello, Tomcat 3.x have a wrapper.properties file. Where is it on tomcat 4.1.x release. I don't know how to configure classpath for my webApp Thanks, David [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: ClassPath with Tomcat 4.1
4.1.x uses the (deprecated) JavaService to install a Windows service. You can continue to use (the even more deprecated, but at least it works :) jk_nt_service from 3.x, or consider using the 5.x commons-daemon 'procrun' (my personal recommendation). David LAFAY [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, Tomcat 3.x have a wrapper.properties file. Where is it on tomcat 4.1.x release. I don't know how to configure classpath for my webApp Thanks, David [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ClassPath with Tomcat 4.1
David, If you place your properties files in WEB-INF/classes , then they are guaranteed to be on the class loading path for the web application. I use the following code in my webapps: Properties p = new Properties(); Files.loadConfigFile(/database.properties, p); And in my 'Files' class, the loadConfigFile method looks something like: public static Properties loadConfigFile(String fileName, Properties def) { Properties props = new Properties(); try { logger.debug(USING Files.class.getResourceAsStream( + fileName + )); InputStream input = Files.class.getResourceAsStream(fileName); if (input != null) { try { props.load(input); } catch (Exception e) { } finally { try { input.close(); } catch (Exception e) { //well, we played nice. } } } return props; } -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of David LAFAY Sent: Thursday, September 11, 2003 3:30 AM To: [EMAIL PROTECTED] Subject: Re: ClassPath with Tomcat 4.1 Thanks but... When the following code : System.getProperty(java.class.path) return only C:\Program Files\Apache Group\Tomcat 4.1.27\bin\bootstrap.jar It is a problem for me because I use the java.class.path to search my properties files And then I don't find it ! Kwok Peng Tuck [EMAIL PROTECTED] a écrit dans le message news: [EMAIL PROTECTED] Classes for your webapp are looked for in either : WEB-INF/lib; as a jar file or WEB-INF/classes; non jar files So for example if you have a jar file that you want to use in your web app, put them in your webapp's WEB-INF/lib. You should be able to use them. David LAFAY wrote: Hello, Tomcat 3.x have a wrapper.properties file. Where is it on tomcat 4.1.x release. I don't know how to configure classpath for my webApp Thanks, David [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: classpath error when changing context
Btw, the problem I am having is with tomcat 4.1.27, on both WindowsXP and Linux. -Original Message- From: Richard Musser Sent: Tuesday, August 26, 2003 2:03 PM To: [EMAIL PROTECTED] Subject: classpath error when changing context My web app is up and running, but when I added a context definition (Context.../) for it suddenly the jsp compiler can't find the classes in WEB-INF/classes. What gives? My jsp files are in a subdirectory of the web app, like such: $CATALINA_HOME/webapps/foo/bar/index.jsp. I added an xml file to the web apps directory to add the context definition so instead of hitting url http://localhost:8080/foo/bar/index.jsp I could just hit http://localhost:8080/bar/index.jsp. The context definition is like: Context path=/bar docBase=foo/bar reloadable=false/ But when I use that new url, the compiler complains about not being able to find the classes (in WEB-INF/classes). If I hit the original url, it works fine. Thanks! - 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: classpath issues and system properties
srinivas reddy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I am using tomcat 4.1.24. I have a couple of questions. 1. Online documentation about class loader says, System class loader operates on CLASSPATH. I have included j2ee.jar in my CLASSPATH, but tomcat is not picking it up. Why is it so? Wherever you saw these docs, they are wrong. Tomcat ignores the CLASSPATH variable. And, in any case, trying to use j2ee.jar with Tomcat is pure evil ;-). Just install the components that you need, and you may finish your project in finite time :). 2. When I use tomcat, system property java.naming.factory.initial is initialized to org.apache.naming.java.javaURLContextFactory. Where did the system pick this property from? How can I override this setting? I initialized JNDI context with environment having java.naming.factory.initial as com.sun.enterprise.naming.SerialInitContextFactory but ultimately org.apache.naming.java.javaURLContextFactory is set to java.naming.factory.initial. How can I avoid this? I don't believe that you can avoid it (without looking more deeply into the code than I care to do at the moment). And, even if you could, the likely result is that Tomcat would lay on it's back, point it's toes in the air, and die. I would appreciate if anybody can help me with these issues. I am really struggling for a week. tia, Srinivas = I am not afraid of losing. But I don't like it. __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: classpath issues and system properties
--- Bill Barker [EMAIL PROTECTED] wrote: srinivas reddy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I am using tomcat 4.1.24. I have a couple of questions. 1. Online documentation about class loader says, System class loader operates on CLASSPATH. I have included j2ee.jar in my CLASSPATH, but tomcat is not picking it up. Why is it so? Wherever you saw these docs, they are wrong. Tomcat ignores the CLASSPATH variable. I found this documentation at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html. Did I misunderstand it or it says what I am thinking? And, in any case, trying to use j2ee.jar with Tomcat is pure evil ;-). Just install the components that you need, and you may finish your project in finite time :). Why is using j2ee.jar with tomcat is not recommended? Is there any resource explaining what can go wrong? 2. When I use tomcat, system property java.naming.factory.initial is initialized to org.apache.naming.java.javaURLContextFactory. Where did the system pick this property from? How can I override this setting? I initialized JNDI context with environment having java.naming.factory.initial as com.sun.enterprise.naming.SerialInitContextFactory but ultimately org.apache.naming.java.javaURLContextFactory is set to java.naming.factory.initial. How can I avoid this? I don't believe that you can avoid it (without looking more deeply into the code than I care to do at the moment). And, even if you could, the likely result is that Tomcat would lay on it's back, point it's toes in the air, and die. I would appreciate if anybody can help me with these issues. I am really struggling for a week. tia, Srinivas = I am not afraid of losing. But I don't like it. __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = I am not afraid of losing. But I don't like it. __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: classpath issues and system properties
Howdy, I found this documentation at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html . Did I misunderstand it or it says what I am thinking? You misunderstood it. Why is using j2ee.jar with tomcat is not recommended? Because it contains duplicate older versions of certain APIs included and required for tomcat, most especially the servlet API. Is there any resource explaining what can go wrong? Yes, this list's archives. 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: classpath issues and system properties
At 08:48 AM 8/21/2003, you wrote: 1. Online documentation about class loader says, System class loader operates on CLASSPATH. I have included j2ee.jar in my CLASSPATH, but tomcat is not picking it up. Why is it so? Wherever you saw these docs, they are wrong. Tomcat ignores the CLASSPATH variable. I found this documentation at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html. Did I misunderstand it or it says what I am thinking? What it says is that the System Classloader loads classes from the classpath. This is true. HOWEVER, Tomcat out-of-the-box ignores whatever you set for the CLASSPATH env variable and builds it from scratch in it's stratup scripts. This behavior was not an accident in Tomcat's development. Don't mess with it unless you're fully aware of why and how Tomcat's classloaders work the way they do. STFA for more info on this. justin Justin Ruthenbeck Software Engineer, NextEngine Inc. justinr - AT - nextengine DOT com Confidential See http://www.nextengine.com/confidentiality.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classpath Conundrum (2nd try)
You are working too hard. My start-up icon looks like: C:\dev\tomcat\Tomcat 4.1.18\bin\catalina.bat start That's it. --- Thomas Davis [EMAIL PROTECTED] wrote: --- Norris Shelton [EMAIL PROTECTED] wrote: Remember, these changes were for W2K PRO, should work on other environments but YMMV. setclasspath.bat set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar I added %CLASSPATH% after the = sign Thanks for the tip. I tried that (which was the same as my original attempt, but I tried again just for kicks) and it didn't work. Further investigation revealed that the shortcut to start Tomcat doesn't call catalina.bat at all! Instead, it calls this: C:\j2sdk1.4.2\bin\java.exe -jar -Duser.dir=C:\Program Files\Apache Group\Tomcat 4.1 C:\Program Files\Apache Group\Tomcat 4.1\bin\bootstrap.jar start So I tried hacking the shortcut in the following ways: C:\j2sdk1.4.2\bin\java.exe -classpath %CLASSPATH% -jar -Duser.dir=C:\Program Files\Apache Group\Tomcat 4.1 C:\Program Files\Apache Group\Tomcat 4.1\bin\bootstrap.jar start C:\j2sdk1.4.2\bin\java.exe -classpath c:\myapp\native;c:\myapp\foreign -jar -Duser.dir=C:\Program Files\Apache Group\Tomcat 4.1 C:\Program Files\Apache Group\Tomcat 4.1\bin\bootstrap.jar start But neither worked. After restarting the server, I'm still presented with the expected error: javax.servlet.ServletException: Wrapper cannot find servlet class com.myapp.servlet.BootStrap or a class it depends on Somehow there must be a way to get the class loader to look in the /foreign and /native directories :-( - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = Norris Shelton Software Engineer Sun Certified Java 1.1 Programmer Appriss, Inc. ICQ# 26487421 AIM NorrisEShelton YIM norrisshelton __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classpath Conundrum (2nd try)
Howdy, Here are a few: Custom classloader: http://marc.theaimsgroup.com/?l=tomcat-userm=105703894521593w=2 Another one: http://marc.theaimsgroup.com/?l=tomcat-userm=105176832519964w=2 Dynamic class loading (whatever that means): http://marc.theaimsgroup.com/?l=tomcat-userm=105577963607375w=2 Putting webapps dir in classpath: http://marc.theaimsgroup.com/?l=tomcat-userm=102760347300941w=2 Relying on env classpath: http://marc.theaimsgroup.com/?l=tomcat-userm=105552115426053w=2 And there are many more hidden in threads like Help! or Urgent! which I don't feel like searching through. Could you please refer me to one of those threads? I checked the archives before posting here and was unable to find any discussions that resolved this issue. That's because no discussions are your specific issue, and none had a standard solution. 2. They do manage to make a hack work, Do you happen to recall what that hack is? Much appreciated. There can be no one generic hack, or it: A. Wouldn't be hack, but a standard solution B. Would be in the tomcat 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: Classpath Conundrum (2nd try)
For the sake of argument, I moved all the classes from /native into /WEB-INF/classes and I moved all the classes from /foreign into /WEB-INF/lib. Also, for the sake of being extra careful, I packaged up everthing in /WEB-INF/lib into classes.jar (so there's two copies there, the raw directory tree and the JAR file). Then I restarted Tomcat and loaded the servlet. The servlet itself (from the /classes tree) attempted to load, but it broke because one of its dependencies (from the /lib tree) was missing. According to the Application Developer's Guide to which you referred me... When you install an application into Tomcat (or any other 2.2/2.3-compatible server), the classes in the WEB-INF/classes/ directory, as well as all classes in JAR files found in the WEB-INF/lib/ directory, are made visible to other classes within your particular web application. ... no adjustment to the system class path (or installation of global library files in your server) will be necessary. So I expected the contents of /WEB-INF/lib, either the raw files or the packaged JAR, to be automatically loaded. Was I mistaken? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classpath Conundrum (2nd try)
Howdy, For the sake of argument, I moved all the classes from /native into /WEB-INF/classes and I moved all the classes from /foreign into /WEB-INF/lib. Also, for the sake of being extra careful, I packaged up everthing in /WEB-INF/lib into classes.jar (so there's two copies there, the raw directory tree and the JAR file). Don't have duplicate copies. Put the classes either in classes (if unpacked, individual .class files) or lib (if packed, .jar files), but not both. So I expected the contents of /WEB-INF/lib, either the raw files or the packaged JAR, to be automatically loaded. Was I mistaken? Thanks. No, you weren't mistaken. The classes in WEB-INF/classes are loaded, and then the jars in WEB-INF/lib are loaded. If the server complains that a class can't be found, it's in neither of these repositories. 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: Classpath Conundrum (2nd try)
A very quick and very dirty solution is to change to setClasspath.sh (or .bat) script and include all your required .jar files in the tomcat system classpath. However, I would not recommend this solution. A better solution is to copy all your jar files into the WEB-INF/lib directory. Why are you not allowed to do this? -Original Message- From: Thomas Davis [mailto:[EMAIL PROTECTED] Sent: 17 July 2003 15:41 To: [EMAIL PROTECTED] Subject: Classpath Conundrum (2nd try) [I apologize is this message is a dupe. I had trouble sending messages to this group from a hotmail account.] I have been tasked with trying to get a legacy Java Servlet based application running under Tomcat 4.1.24 -- The application currently runs on JRun 2.3.3 On of the requirements imposed upon me is that I can't disturb the existing directory structure. I can't rename or move any directories (or their contents). Our third-party Java classes are in: c:\myapp\foreign Our application and development Java classes are in: c:\myapp\native The root directory of the web server is: c:\myapp\native\web I created the following Context in server.xml: Context path=/tomcat docBase=c:/myapp/native/web debug=0/ Then I created the servlet deployment file: c:\myapp\native\web\WEB-INF\web.xml The contents of said file: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-namemyapp/servlet-name servlet-classcom.myapp.servlet.BootStrap/servlet-class /servlet servlet-mapping servlet-namemyapp/servlet-name url-pattern/myapp/url-pattern /servlet-mapping /web-app So now I'm all set to go, except that I'm going to (and did) get a class not found error because there is no /classes directory under WEB-INF and as mentioned above I can't copy the classes from /foreign and /native there. I can't create a symbolic link from /classes to /native since that would be recursive, and it wouldn't include /foreign which is also required. The /native and /foreign directories are in the CLASSPATH environment variable, but as documented in Class Loader HOW-TO that variable is ignored by the class loaders. It would seem to me that the easiest and most straight-forward solution is to get the class loaders to honor the CLASSPATH environment variable. I tried to accomplish this by hacking the start-up scripts, but could not get it to work. Could somebody please help me out here? What's the best way to get the class loader to look in /native and /foreign? Or is there a better solution (other than shuffling the directories around, which I can't do). Thanks a million! - 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: Classpath Conundrum (2nd try)
You can add setenv.bat/sh to you tomcat bin direcotry. catalina.bat/sh will do the following: rem Get standard environment variables if exist %CATALINA_HOME%\bin\setenv.bat call %CATALINA_HOME%\bin\setenv.bat # Get standard environment variables PRGDIR=`dirname $PRG` CATALINA_HOME=`cd $PRGDIR/.. ; pwd` if [ -r $CATALINA_HOME/bin/setenv.sh ]; then . $CATALINA_HOME/bin/setenv.sh fi So this is one way of setting up the classpath. Dmitry -Original Message- From: Thomas Davis [mailto:[EMAIL PROTECTED] Sent: Thursday, July 17, 2003 10:41 AM To: [EMAIL PROTECTED] Subject: Classpath Conundrum (2nd try) [I apologize is this message is a dupe. I had trouble sending messages to this group from a hotmail account.] I have been tasked with trying to get a legacy Java Servlet based application running under Tomcat 4.1.24 -- The application currently runs on JRun 2.3.3 On of the requirements imposed upon me is that I can't disturb the existing directory structure. I can't rename or move any directories (or their contents). Our third-party Java classes are in: c:\myapp\foreign Our application and development Java classes are in: c:\myapp\native The root directory of the web server is: c:\myapp\native\web I created the following Context in server.xml: Context path=/tomcat docBase=c:/myapp/native/web debug=0/ Then I created the servlet deployment file: c:\myapp\native\web\WEB-INF\web.xml The contents of said file: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-namemyapp/servlet-name servlet-classcom.myapp.servlet.BootStrap/servlet-class /servlet servlet-mapping servlet-namemyapp/servlet-name url-pattern/myapp/url-pattern /servlet-mapping /web-app So now I'm all set to go, except that I'm going to (and did) get a class not found error because there is no /classes directory under WEB-INF and as mentioned above I can't copy the classes from /foreign and /native there. I can't create a symbolic link from /classes to /native since that would be recursive, and it wouldn't include /foreign which is also required. The /native and /foreign directories are in the CLASSPATH environment variable, but as documented in Class Loader HOW-TO that variable is ignored by the class loaders. It would seem to me that the easiest and most straight-forward solution is to get the class loaders to honor the CLASSPATH environment variable. I tried to accomplish this by hacking the start-up scripts, but could not get it to work. Could somebody please help me out here? What's the best way to get the class loader to look in /native and /foreign? Or is there a better solution (other than shuffling the directories around, which I can't do). Thanks a million! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] NOTICE: This communication may contain proprietary or other confidential business information of Orcom Solutions, Inc. If you are not the intended recipient or believe that you may have received this communication in error, please reply to the sender indicating that fact and delete the copy you received. In addition, you should not print, copy, retransmit, disseminate, or otherwise use the information. Thank you.
RE: Classpath Conundrum (2nd try)
I think this will work for non-windows, but YMMV... To start our Tomcat's on W2K, we modify setclasspath.bat to include %CLASSPATH% when it constructs it's classpath. Then tomcat is started via catalina.bat with a start parameter. It looks like there are .sh versions of all of these files. --- Dmitry Sklyut [EMAIL PROTECTED] wrote: You can add setenv.bat/sh to you tomcat bin direcotry. catalina.bat/sh will do the following: rem Get standard environment variables if exist %CATALINA_HOME%\bin\setenv.bat call %CATALINA_HOME%\bin\setenv.bat # Get standard environment variables PRGDIR=`dirname $PRG` CATALINA_HOME=`cd $PRGDIR/.. ; pwd` if [ -r $CATALINA_HOME/bin/setenv.sh ]; then . $CATALINA_HOME/bin/setenv.sh fi So this is one way of setting up the classpath. Dmitry -Original Message- From: Thomas Davis [mailto:[EMAIL PROTECTED] Sent: Thursday, July 17, 2003 10:41 AM To: [EMAIL PROTECTED] Subject: Classpath Conundrum (2nd try) [I apologize is this message is a dupe. I had trouble sending messages to this group from a hotmail account.] I have been tasked with trying to get a legacy Java Servlet based application running under Tomcat 4.1.24 -- The application currently runs on JRun 2.3.3 On of the requirements imposed upon me is that I can't disturb the existing directory structure. I can't rename or move any directories (or their contents). Our third-party Java classes are in: c:\myapp\foreign Our application and development Java classes are in: c:\myapp\native The root directory of the web server is: c:\myapp\native\web I created the following Context in server.xml: Context path=/tomcat docBase=c:/myapp/native/web debug=0/ Then I created the servlet deployment file: c:\myapp\native\web\WEB-INF\web.xml The contents of said file: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-namemyapp/servlet-name servlet-classcom.myapp.servlet.BootStrap/servlet-class /servlet servlet-mapping servlet-namemyapp/servlet-name url-pattern/myapp/url-pattern /servlet-mapping /web-app So now I'm all set to go, except that I'm going to (and did) get a class not found error because there is no /classes directory under WEB-INF and as mentioned above I can't copy the classes from /foreign and /native there. I can't create a symbolic link from /classes to /native since that would be recursive, and it wouldn't include /foreign which is also required. The /native and /foreign directories are in the CLASSPATH environment variable, but as documented in Class Loader HOW-TO that variable is ignored by the class loaders. It would seem to me that the easiest and most straight-forward solution is to get the class loaders to honor the CLASSPATH environment variable. I tried to accomplish this by hacking the start-up scripts, but could not get it to work. Could somebody please help me out here? What's the best way to get the class loader to look in /native and /foreign? Or is there a better solution (other than shuffling the directories around, which I can't do). Thanks a million! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] NOTICE: This communication may contain proprietary or other confidential business information of Orcom Solutions, Inc. If you are not the intended recipient or believe that you may have received this communication in error, please reply to the sender indicating that fact and delete the copy you received. In addition, you should not print, copy, retransmit, disseminate, or otherwise use the information. Thank you. = Norris Shelton Software Engineer Sun Certified Java 1.1 Programmer Appriss, Inc. ICQ# 26487421 AIM NorrisEShelton YIM norrisshelton __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classpath Conundrum (2nd try)
--- Norris Shelton [EMAIL PROTECTED] wrote: To start our Tomcat's on W2K, we modify setclasspath.bat to include %CLASSPATH% when it constructs it's classpath. I tried that but could not get it to work. I'm apparently putting it in the wrong place. Could you please detail the change(s) you made to the batch file(s)? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classpath Conundrum (2nd try)
Remember, these changes were for W2K PRO, should work on other environments but YMMV. setclasspath.bat set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar I added %CLASSPATH% after the = sign OMG - I know why it did not work ;-0 I forgot to tell you to make sure that you include Tomcat's servlet.jar in your classpath. Don't ask me why this is not picked up when you run catalina.bat start, but .. Add the following to your system classpath: %CATALINA_HOME%\common\lib\servlet.jar; FYI - I have this working for 4.1.18 and 4.1.24, but could not get it to work for 5.0.3. --- Thomas Davis [EMAIL PROTECTED] wrote: --- Norris Shelton [EMAIL PROTECTED] wrote: To start our Tomcat's on W2K, we modify setclasspath.bat to include %CLASSPATH% when it constructs it's classpath. I tried that but could not get it to work. I'm apparently putting it in the wrong place. Could you please detail the change(s) you made to the batch file(s)? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = Norris Shelton Software Engineer Sun Certified Java 1.1 Programmer Appriss, Inc. ICQ# 26487421 AIM NorrisEShelton YIM norrisshelton __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classpath Conundrum (2nd try)
--- Norris Shelton [EMAIL PROTECTED] wrote: Remember, these changes were for W2K PRO, should work on other environments but YMMV. setclasspath.bat set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar I added %CLASSPATH% after the = sign Thanks for the tip. I tried that (which was the same as my original attempt, but I tried again just for kicks) and it didn't work. Further investigation revealed that the shortcut to start Tomcat doesn't call catalina.bat at all! Instead, it calls this: C:\j2sdk1.4.2\bin\java.exe -jar -Duser.dir=C:\Program Files\Apache Group\Tomcat 4.1 C:\Program Files\Apache Group\Tomcat 4.1\bin\bootstrap.jar start So I tried hacking the shortcut in the following ways: C:\j2sdk1.4.2\bin\java.exe -classpath %CLASSPATH% -jar -Duser.dir=C:\Program Files\Apache Group\Tomcat 4.1 C:\Program Files\Apache Group\Tomcat 4.1\bin\bootstrap.jar start C:\j2sdk1.4.2\bin\java.exe -classpath c:\myapp\native;c:\myapp\foreign -jar -Duser.dir=C:\Program Files\Apache Group\Tomcat 4.1 C:\Program Files\Apache Group\Tomcat 4.1\bin\bootstrap.jar start But neither worked. After restarting the server, I'm still presented with the expected error: javax.servlet.ServletException: Wrapper cannot find servlet class com.myapp.servlet.BootStrap or a class it depends on Somehow there must be a way to get the class loader to look in the /foreign and /native directories :-( - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classpath Conundrum (2nd try)
Howdy, Having followed and this whole thread and bit my tongue until now... Somehow there must be a way to get the class loader to look in the /foreign and /native directories :-( Searching the list archives reveals that every now and then someone comes along with your situation or a near approximation, and every time they go through all sorts of twists/bends/hacks to get it to work. It's always the same hassle, with one of two possible results: 1. They sober up and modify their directory structure into a more conventional structure such as the one outlined here: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/deployment.html 2. They do manage to make a hack work, resulting in a non-standard, non-portable, non-supported, fragile, difficult to maintain installation. You can save yourself and your employer a lot of time and write an Ant script that deploys into a standard structure from the messed up one you have now. That way the developers can still work with their directory structure (native, foreign, etc.), the source code control system does not need to be changed, and you don't have to hack around the servlet container's classloading. 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: Classpath Conundrum (2nd try)
--- Shapira, Yoav [EMAIL PROTECTED] wrote: Searching the list archives reveals that every now and then someone comes along with your situation Could you please refer me to one of those threads? I checked the archives before posting here and was unable to find any discussions that resolved this issue. 2. They do manage to make a hack work, Do you happen to recall what that hack is? Much appreciated. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classpath Conundrum (2nd try)
can't you just set up an ant script to (also)copy the files to the tomcat directory each time they are updated? -Original Message- From: Thomas Davis [mailto:[EMAIL PROTECTED] Sent: Thursday, July 17, 2003 4:47 PM To: Tomcat Users List Subject: RE: Classpath Conundrum (2nd try) --- Shapira, Yoav [EMAIL PROTECTED] wrote: Searching the list archives reveals that every now and then someone comes along with your situation Could you please refer me to one of those threads? I checked the archives before posting here and was unable to find any discussions that resolved this issue. 2. They do manage to make a hack work, Do you happen to recall what that hack is? Much appreciated. Thanks. - 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: Classpath Conundrum (2nd try)
--- Cox, Charlie [EMAIL PROTECTED] wrote: can't you just set up an ant script to (also)copy the files to the tomcat directory each time they are updated? Unfortunately, I cannot. I must, if possible, get it working with the existing directory structure. I realize this is not an optimal configuration, but I have no say in the matter. Thank you all for your suggestions. I'll keep my fingers crossed that somebody reveals a clever solution to me soon :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classpath problem with Tomcat running in Embedded mode
Hi, If you're calling Bootstrap.main(), please also have a look at the source code within Bootstrap. You'll find that Bootstrap just sets the ground for the Catalina classes...It creates a classloader hierarchy, with classloaders for classes visible to just Catalina, and for visibility between both Catalina and Webapps. Each webapp has a classloader to itself. What you should do instead is have a look at how Embedded works, and do something like that yourself. This may not be the intended approach behind supplying Embedded, but this is how I've bundled Tomcat 4.0.1 for a Swing based app I had to once develop. -- Sriram --- sandeep arshanapally [EMAIL PROTECTED] wrote: Thanks for your reply. Iam calling the BootStrap.main directly from a thread in my jvm. Iam using Tomcat 4.1.24. I have the catalina.home set to tomcat directory. It recognizes the classes in tomcat directory but none of the classes in the classpath I specify while starting the jvm. Sandeep From: Sriram N [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Classpath problem with Tomcat running in Embedded mode Date: Wed, 11 Jun 2003 20:55:42 -0700 (PDT) Hi, This is a ClassLoader visibility issue. Read the ClassLoader howto in the Tomcat Docs. How exactly are you running Embedded ? Are you invoking the main method on it straight out ? Which Tomcat release are you using ? -- Sriram --- sandeep arshanapally [EMAIL PROTECTED] wrote: Hi, Iam running tomcat in an embedded mode i.e. launching it from with in my jvm and using it with Axis for SOAP processing. I am having a problem with the classes and classpath. The SOAP implementation class files need to be there /webapps/axis/WEB-INF/classes otherwise it doesn't work and if Iam referencing any other classes from there, it throws a ClassNotFoundException. Is there anyway that I can specify the classpath so that the classes do not have to be in that directory? Thanks in advance, Sandeep _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classpath problem with Tomcat running in Embedded mode
Thanks for your reply. Iam calling the BootStrap.main directly from a thread in my jvm. Iam using Tomcat 4.1.24. I have the catalina.home set to tomcat directory. It recognizes the classes in tomcat directory but none of the classes in the classpath I specify while starting the jvm. Sandeep From: Sriram N [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Classpath problem with Tomcat running in Embedded mode Date: Wed, 11 Jun 2003 20:55:42 -0700 (PDT) Hi, This is a ClassLoader visibility issue. Read the ClassLoader howto in the Tomcat Docs. How exactly are you running Embedded ? Are you invoking the main method on it straight out ? Which Tomcat release are you using ? -- Sriram --- sandeep arshanapally [EMAIL PROTECTED] wrote: Hi, Iam running tomcat in an embedded mode i.e. launching it from with in my jvm and using it with Axis for SOAP processing. I am having a problem with the classes and classpath. The SOAP implementation class files need to be there /webapps/axis/WEB-INF/classes otherwise it doesn't work and if Iam referencing any other classes from there, it throws a ClassNotFoundException. Is there anyway that I can specify the classpath so that the classes do not have to be in that directory? Thanks in advance, Sandeep _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classpath problem with Tomcat running in Embedded mode
Hi, This is a ClassLoader visibility issue. Read the ClassLoader howto in the Tomcat Docs. How exactly are you running Embedded ? Are you invoking the main method on it straight out ? Which Tomcat release are you using ? -- Sriram --- sandeep arshanapally [EMAIL PROTECTED] wrote: Hi, Iam running tomcat in an embedded mode i.e. launching it from with in my jvm and using it with Axis for SOAP processing. I am having a problem with the classes and classpath. The SOAP implementation class files need to be there /webapps/axis/WEB-INF/classes otherwise it doesn't work and if Iam referencing any other classes from there, it throws a ClassNotFoundException. Is there anyway that I can specify the classpath so that the classes do not have to be in that directory? Thanks in advance, Sandeep _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: CLASSPATH setting in Windows with JDBC from mySQL
If you put the jar file in {tomcat directory}\common\lib it will be available to all your web apps. Theres no need to play around with your CLASSPATH variable. Tom -Original Message- From: Joe [mailto:[EMAIL PROTECTED] Sent: 05 June 2003 08:43 To: [EMAIL PROTECTED] Subject: CLASSPATH setting in Windows with JDBC from mySQL Hi all, does anyone know how I should set the Class Path Variable in Windows in order for JSP to search for the library? I've already tried the following methods but it cannot find the driver when I tried to load an jsp page: Method 1 I've currently install the JDBC driver on my C:\mysql\JDBC\ And have tried setting my classpath to point to that folder as below Set CLASSPATH=C:\mysql\JDBC\;. Method 2 Copied mysql-connector-java-3.0.8-stable-bin.jar to C:\j2sdk1.4.1_02\common\lib And simply set my classpath=. Method 3 Copied mysql-connector-java-3.0.8-stable-bin.jar to C:\j2sdk1.4.1_02\jre\lib And again set my classpath=. I've also tried setting my classpath to point specifically to the JDBC driver but still, the page cannot find the driver. The only method that works now is that I've copied mysql-connector-java-3.0.8-stable-bin.jar to my /webapps/testAPPS/WEB-INF/lib Using this method, which means I have a copy of mysql-connector-java-3.0.8-stable-bin.jar in every docBase that I have which I find is redundant. Is there any working solution that I can simply set in using my CLASSPATH? Also, I have no problem setting it in CLASSPATH in Linux but I dunno why it doesn't work in Windows. :-( Now that is reason why I preferred Linux. Regards, Joe I've tried a lot of combination and have copy mysql-connector-java-3.0.8-stable-bin.jar to - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classpath Question
Thank you for your help: I have traked the error to the catalina.log file and itis a classnot found exception. I have made the changes but still am getting the error. I have included my setenv.bat file to see if there are any errors that are obvious to every but me. Any help would again be really appreciated. /---setenv.bat--/ set JAVA_HOME=C:\j2sdk1.4.0-rc\jre set JWSDP_HOME=c:\jwsdp-1_0_01 set CLASSPATH=%JWSDP_HOME%\common\endorsed\dom.jar;%JWSDP_HOME%\common\endorsed\sax.jar;%JWSDP_HOME%\common\endorsed\xalan.jar;%JWSDP_HOME%\common\endorsed\xsltc.jar;%JWSDP_HOME%\common\lib\jaxrpc-api.jar;%JWSDP_HOME%\common\lib\activation.jar;%JWSDP_HOME%\common\lib\commons-collections.jar;%JWSDP_HOME%\common\lib\providerutil.jar;%JWSDP_HOME%\common\lib\saaj-api.jar;%JWSDP_HOME%\common\lib\saaj-ri.jar;%JWSDP_HOME%\common\lib\soap.jar;%JWSDP_HOME%\common\lib\servlet.jar;%JWSDP_HOME%\common\lib\naming-resources.jar;%JWSDP_HOME%\common\lib\naming-common.jar;%JWSDP_HOME%\common\lib\naming-factory.jar;%JWSDP_HOME%\common\lib\jsse.jar;%JWSDP_HOME%\common\lib\dom4j.jar;%JWSDP_HOME%\common\lib\jaas.jar;%JWSDP_HOME%\common\lib\jaxrpc-ri.jar;%JWSDP_HOME%\common\lib\mail.jar;c:\topme\xerces\xerces.jar;c:\topme\castor\castor-0.9.4.1.jar;c:\TOPS\classes;c:\oracle9\jdbc\lib\classes12.jar;c:\oracle9\jdbc\lib\nls_charset12.jar;c:\oracle9\jdbc\lib\ocrs12.jar;c:\oracle9\jdbc\lib\ojdbc14.jar;c:\oracle9\jdbc\lib\classes12dms.jar;c:\oracle9\jdbc\lib\classes12dms_g.jar;c:\oracle9\jdbc\lib\ojdbc14_g.jar;c:\TOPS\classes\jep\jep210.jar;c:\TOPS\classes\HTTPClient.zip;.; set PATH=%JAVA_HOME%\bin;%JWSDP_HOME%\bin;%PATH% -- ___ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classpath Question
I ran against the same problem and found a solution I'm more or less happy with (perhaps someone with more experience can correct me if my solution is crazy.) If you ABSOLUTELY cannot move your classes into %TOMCAT_HOME% \common\classes directory, there is another option: In your %TOMCAT_HOME%\bin\setclasspath.bat file, you can redefine the CLASSPATH variable to include all the important tomcat .jar files plus your classpath. This bypasses the bootstrapper. I.e.: . . set TOMCAT_HOME=c:\tomcat set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%TOMCAT_HOME% \common\lib\activation.jar;%TOMCAT_HOME%\common\lib\mail.jar; %TOMCAT_HOME%\common\lib\ant.jar;%TOMCAT_HOME% \common\lib\commons-collections.jar;%TOMCAT_HOME% \common\lib\commons-dbcp.jar;%TOMCAT_HOME% \common\lib\commons-logging-api.jar;%TOMCAT_HOME% \common\lib\commons-pool.jar;%TOMCAT_HOME% \common\lib\jasper-compiler.jar;%TOMCAT_HOME% \common\lib\jasper-runtime.jar;%TOMCAT_HOME% \common\lib\jdbc2_0-stdext.jar;%TOMCAT_HOME% \common\lib\jndi.jar;%TOMCAT_HOME%\common\lib\jta.jar;%TOMCAT_HOME% \common\lib\mail.jar;%TOMCAT_HOME% \common\lib\naming-common.jar;%TOMCAT_HOME% \common\lib\naming-factory.jar;%TOMCAT_HOME% \common\lib\naming-resources.jar;%TOMCAT_HOME% \common\lib\servlet.jar;%YOUR_CLASSPATH% . Please, if someone thinks this is nuts, let me know. I wish there was a more elegant way to do this, but for now this is the only thing I could think of. /gilad Gilad Buzi RD Engineer · CONCATEL [EMAIL PROTECTED] c/Sardenya, 229-237 Atic. 2a · 08013 Barcelona Spain tel. +34.93.244.88.77 · fax +34.93.244.88.78 www.concatel.com Richard JonesPara: [EMAIL PROTECTED] richardjones@cc: email.comAsunto: Classpath Question 20/03/2003 17:54 Por favor, responda a Tomcat Users List Hi, I am using tomcat version 4 as a web service provider. I have 10 web services for my application and they all seem to compile properly. the issue is when I go to run the application I get a java.rmi.ServerException error with a missing port. I am nearly 95% sure that it is a problem with the CLASSPATH in that I dont declare where the class paths are for each application. How do I do this: An example of where the java classes are is C:\tops\classes. I cant move the classes as it is an application in itself and is connected to an oracle database. Please I need the following information? 1 Can this be done at all? Or is my boss nuts? 2 How do I do it? Regards Richard Newbie Jones -- ___ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup - 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: Classpath Question
A problem with the classpath should indicate a classpath related exception, which essentially is an inability to find a class. Why do you think that hte java.rmi.ServerException fits into this pattern? If you don't declare where the class paths [sic] are for each application how do you expect the JVM to find the classes? You sure that is what you mean? At 04:54 PM 3/20/03 +, you wrote: Hi, I am using tomcat version 4 as a web service provider. I have 10 web services for my application and they all seem to compile properly. the issue is when I go to run the application I get a java.rmi.ServerException error with a missing port. I am nearly 95% sure that it is a problem with the CLASSPATH in that I dont declare where the class paths are for each application. How do I do this: An example of where the java classes are is C:\tops\classes. I cant move the classes as it is an application in itself and is connected to an oracle database. Please I need the following information? 1 Can this be done at all? Or is my boss nuts? 2 How do I do it? Regards Richard Newbie Jones -- ___ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classpath in Tomcat 5.04
Yet another psychic user ;-). After another three release cycles, when we get up to TC 5.0.4, you'll probably have a better answer ;-). In the mean time, TC 5 works like TC4 for this: you need to setup your own $CATALINA_HOME/bin/setenv.(sh/bat) to set these properties. Reis, Tom [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there a way to set up a classpath for Tomcat 5.04. I am trying to references some java files from the jdk directory and I can't seem to do that so I am wondering if I need a classpath statement somewhere in Tomcat. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CLASSPATH in mac os x
Here's a section of my .tcshrc file (located in my home directory): setenv CLASSPATH . setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/activation.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/jasper-runtime.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/mail.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/servlet.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/soap.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/framework/xercesImpl.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/xmlParserAPIs.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/commons-beanutils.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/struts.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/jdom.jar Of course, your paths will be different. And don't forget the period in the first setenv entry since it indicates current directory. Hope it helps. -FB On Thursday, February 27, 2003, at 08:08 AM, apratim sharma wrote: i'm not able to compile servlet files on mac os x. i think it's because CLASSPATH is not set properly. can anybody tell me the correct way... - Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, and more - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CLASSPATH in mac os x
Here's a section of my .tcshrc file (located in my home directory): setenv CLASSPATH . setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/activation.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/jasper-runtime.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/mail.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/servlet.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/soap.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/framework/xercesImpl.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/xmlParserAPIs.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/commons-beanutils.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/struts.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/jdom.jar Of course, your paths will be different. And don't forget the period in the first setenv entry since it indicates current directory. Hope it helps. -FB On Thursday, February 27, 2003, at 08:08 AM, apratim sharma wrote: i'm not able to compile servlet files on mac os x. i think it's because CLASSPATH is not set properly. can anybody tell me the correct way... - Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, and more - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CLASSPATH in mac os x
Here's a section of my .tcshrc file (located in my home directory): setenv CLASSPATH . setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/activation.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/jasper-runtime.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/mail.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/servlet.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/soap.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/framework/xercesImpl.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/xmlParserAPIs.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/commons-beanutils.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/struts.jar setenv CLASSPATH ${CLASSPATH}:/Users/bido/Dev/framework/jsp/jdom.jar Of course, your paths will be different. And don't forget the period in the first setenv entry since it indicates current directory. Hope it helps. -FB On Thursday, February 27, 2003, at 08:08 AM, apratim sharma wrote: i'm not able to compile servlet files on mac os x. i think it's because CLASSPATH is not set properly. can anybody tell me the correct way... - Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, and more - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classpath
Howdy, Do you mean the classpath for pre-compiling (using JspC) your JSPs? Or the runtime classpath? AFAIK you don't need to specify a special runtime classpath for your JSPs: the relevant jasper jars are in the tomcat server's libraries and are automatically loaded when the server needs to compile JSPs. Yoav Shapira Millennium ChemInformatics -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 11, 2002 1:07 PM To: Tomcat-User@Jakarta. Apache. Org ([EMAIL PROTECTED]) Subject: Classpath With release 4.1.12 of Tomcat, which file should be specified for the JSP classes in my classpath? The book I have as a resource (Core JSP) tell me to point to jsp.jar, jspengine.jar, or jasper.jar, but I do not see any of these files. Is it possible this jar file is under a different name in the newer version? Thanks in advance! Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath
In $CATALINA_HOME/commons/lib you'll find jasper-runtime.jar and jasper-compiler.jar. Try those. Cheers! Brion -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 11, 2002 1:07 PM To: Tomcat-User@Jakarta. Apache. Org ([EMAIL PROTECTED]) Subject: Classpath With release 4.1.12 of Tomcat, which file should be specified for the JSP classes in my classpath? The book I have as a resource (Core JSP) tell me to point to jsp.jar, jspengine.jar, or jasper.jar, but I do not see any of these files. Is it possible this jar file is under a different name in the newer version? Thanks in advance! Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath
Hi, The book just says that I have to tell my software where to find my class files when compiling. I've already specified the servlet.jar file. As suggested, I will try the jasper-compiler.jar.Thanks all! Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 11, 2002 1:07 PM To: Tomcat Users List Subject: RE: Classpath Howdy, Do you mean the classpath for pre-compiling (using JspC) your JSPs? Or the runtime classpath? AFAIK you don't need to specify a special runtime classpath for your JSPs: the relevant jasper jars are in the tomcat server's libraries and are automatically loaded when the server needs to compile JSPs. Yoav Shapira Millennium ChemInformatics -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 11, 2002 1:07 PM To: Tomcat-User@Jakarta. Apache. Org ([EMAIL PROTECTED]) Subject: Classpath With release 4.1.12 of Tomcat, which file should be specified for the JSP classes in my classpath? The book I have as a resource (Core JSP) tell me to point to jsp.jar, jspengine.jar, or jasper.jar, but I do not see any of these files. Is it possible this jar file is under a different name in the newer version? Thanks in advance! Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Classpath
What do you mean by the JSP classes? Do you mean where you put the JSP pages? Do you mean where you put the Java Classes? You put the JSP pages at the root of your application, unless you specify elsewhere, which is a long discussion. You put classes at [your_app]/WEB-INF/classes/ e.g. [your_app]/WEB-INF/classes/com/manago/user/User.class. At 01:07 PM 12/11/2002 -0500, you wrote: With release 4.1.12 of Tomcat, which file should be specified for the JSP classes in my classpath? The book I have as a resource (Core JSP) tell me to point to jsp.jar, jspengine.jar, or jasper.jar, but I do not see any of these files. Is it possible this jar file is under a different name in the newer version? Thanks in advance! Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. Micael --- This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath
Micael, What I had meant was the jar file that I needed to point to for my classpath, which has been answered. But the information you provided will definitely come in handy to me, since I am new at this. Thank you. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: micael [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 11, 2002 1:18 PM To: Tomcat Users List Subject: Re: Classpath What do you mean by the JSP classes? Do you mean where you put the JSP pages? Do you mean where you put the Java Classes? You put the JSP pages at the root of your application, unless you specify elsewhere, which is a long discussion. You put classes at [your_app]/WEB-INF/classes/ e.g. [your_app]/WEB-INF/classes/com/manago/user/User.class. At 01:07 PM 12/11/2002 -0500, you wrote: With release 4.1.12 of Tomcat, which file should be specified for the JSP classes in my classpath? The book I have as a resource (Core JSP) tell me to point to jsp.jar, jspengine.jar, or jasper.jar, but I do not see any of these files. Is it possible this jar file is under a different name in the newer version? Thanks in advance! Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. Micael --- This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: classpath for web applications
Check the docs. Tomcat ignores the CLASSPATH environment variable. You will want to read and follow the Application Developer's Guide, and you will want to read the ClassLoader HOWTO. Most of your questions are probably answered between those two documents. John -Original Message- From: Abhijat Thakur To: [EMAIL PROTECTED] Sent: 11/12/02 9:17 PM Subject: classpath for web applications I am new to tomcat and i added my web application to Tomcat by adding Context path=/bdna debug=0 privileged=true docBase=/usr/web/ /Context in server.xml file. My classpath environment variable is set up which has all the classes. However when i try to invoke a servlet by typing the URL it gives me a classNotFoundException. However the class exists in the classpath. Tomcat expects all the class files to be under /usr/web/WEB-INF/classes which is the docBase for the bdna Context. Is there a way to make Tomcat look for class files in ClassPath rather than the docBase/WEB-INF/classes for context. Am i doing something wrong? thanks abhijat -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: classpath for web applications
--- Turner, John [EMAIL PROTECTED] wrote: Check the docs. Tomcat ignores the CLASSPATH environment variable. You will want to read and follow the Application Developer's Guide, and you will want to read the ClassLoader HOWTO. Most of your questions are probably answered between those two documents. John -Original Message- From: Abhijat Thakur To: [EMAIL PROTECTED] Sent: 11/12/02 9:17 PM Subject: classpath for web applications I am new to tomcat and i added my web application to Tomcat by adding Context path=/bdna debug=0 privileged=true docBase=/usr/web/ /Context u'r dir structure should like that /usr/web/webbaps/bdna/WEB-INF/classes /usr/web/webbaps/bdna/WEB-INF/lib put u'r classes inside the classes u donnot need to specify the class path tomcat itself take its own classpath. copy u'r important jar file inside the lib folder. in server.xml specify add this docBase=/usr/web/ in host tag. 2) copy u'r classes in the TOMCAT_HOME/webapps/bdna/WEB-INF/classes berfore that create the folder . in that case u donot need to change the server.xml sonam singh [EMAIL PROTECTED] in server.xml file. My classpath environment variable is set up which has all the classes. However when i try to invoke a servlet by typing the URL it gives me a classNotFoundException. However the class exists in the classpath. Tomcat expects all the class files to be under /usr/web/WEB-INF/classes which is the docBase for the bdna Context. Is there a way to make Tomcat look for class files in ClassPath rather than the docBase/WEB-INF/classes for context. Am i doing something wrong? thanks abhijat -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: CLASSPATH problems on 3.3.1
Hey, that is good information! Thank you. I ran them along without quotes for now and all seems to be working. However, I like the other option as well. Michael --- Bill Barker [EMAIL PROTECTED] wrote: Actually, I'm mostly a *nix person. I learned about wrapper.jvm.options from reading the comments in the default wrappers.properties file. To save yourself headaches with quotes, wrapper.jvm.options can be repeated (and jk_nt_service will concatenate them). So for your example: wrapper.jvm.options=-Dorg.apache.tomcat.apps.classpath=C:\SourceW\VSS\src;C: \SourceW\ja\src;C:\SourceW\VSS\lib\xerces.jar;C:\SourceW\lib\xml4j.jar wrapper.jvm.options=-Xrs Otherwise, everything that Larry said is correct. Michael Finney [EMAIL PROTECTED] wrote in message news:20021015152430.44653.qmail;web40412.mail.yahoo.com... So something like this for the wrapper.jvm.options: wrapper.jvm.options=-Dorg.apache.tomcat.apps.classpath=C:\SourceW\VSS\src;C: \SourceW\ja\src;C:\SourceW\VSS\lib\xerces.jar;C:\SourceW\lib\xml4j.jar -Xrs right? Can a person use quotes? Did you learn about wrapper.jvm.options from the RELEASE-NOTES-3.3.1.txt and what you could pass in from the source code or is wrapper.jvm.options documented in detail somewhere? google did not reveal anything more. (As they say, I appreciate the fish. However, I want to learn how to fish too.) Thanks, Michael --- Bill Barker [EMAIL PROTECTED] wrote: Out of the box, the NT service also ignores your CLASSPATH. You are always free to add wrapper.classpath properties to your wrapper.properties file to include additional locations in your classpath. Depending on your application, this may or may not result in ClassLoader problems. The other method (the one I prefer) is to set: wrapper.jvm.options=-Dorg.apache.tomcat.apps.classpath=your classpath This has the same effect as dumping them in $TOMCAT_HOME\lib\apps. Michael Finney [EMAIL PROTECTED] wrote in message news:20021014231643.27508.qmail;web40409.mail.yahoo.com... I will look. The NT service form of starting Tomcat does not use start up scripts. Right? I want to make sure I understand what we are saying here about the scripts. --- Larry Isaacs [EMAIL PROTECTED] wrote: Like Tomcat4, Tomcat 3.3's startup scripts ignore your CLASSPATH. Tomcat 3.2.x's use of the CLASSPATH was one of the top sources of problems. For important differences upgrading from Tomcat 3.2.x to Tomcat 3.3.x, see: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/readme For how to configure classes in Tomcat 3.3.x, see: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ug.html#configuring_ classes HTH, Larry -Original Message- From: Michael Finney [mailto:lovefinney;yahoo.com] Sent: Monday, October 14, 2002 5:19 PM To: Tomcat Users List Subject: CLASSPATH problems on 3.3.1 3.3.1 IIS 5.0 and Tomcat 3.3.1 redirections Running Jakarta as a Service on Windows 2000. Has anyone else had problems with CLASSPATH getting picked up in 3.3.1? In a previous deployment, a CLASSPATH was set to d:\whatever\classes (ok actually it was not classes it was src, but the .class files are in src) CLASSPATH was also set to specific jars. It seems like in order to get classes and jars picked up, I have had to dump the classes into tomcat home\lib\apps That seems so wrong. ;) I am trying to upgrade from 3.2.x to 3.3.1 and I would not have expected such a rough CLASSPATH ride. (Yes, I know about tomcat home\webapps\theweb app\WEB-INF\*stuff I am trying to keep the changes to a minimum for this release.) Thanks. Michael = Michael Finney Sun Certified Programmer for the Java 2 Platform Sun Certified Developer for the Java 2 Platform Sun Certified Web Component Developer for J2EE Platform Cofounder of PPJDG Cofounder of cosAgile - Colorado Springs XP Users Group If replying to this email address fails, try [EMAIL PROTECTED] __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- === message truncated === = Michael Finney Sun Certified Programmer for the Java 2 Platform Sun Certified Developer for the
Re: CLASSPATH problems on 3.3.1
Actually, I'm mostly a *nix person. I learned about wrapper.jvm.options from reading the comments in the default wrappers.properties file. To save yourself headaches with quotes, wrapper.jvm.options can be repeated (and jk_nt_service will concatenate them). So for your example: wrapper.jvm.options=-Dorg.apache.tomcat.apps.classpath=C:\SourceW\VSS\src;C: \SourceW\ja\src;C:\SourceW\VSS\lib\xerces.jar;C:\SourceW\lib\xml4j.jar wrapper.jvm.options=-Xrs Otherwise, everything that Larry said is correct. Michael Finney [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... So something like this for the wrapper.jvm.options: wrapper.jvm.options=-Dorg.apache.tomcat.apps.classpath=C:\SourceW\VSS\src;C: \SourceW\ja\src;C:\SourceW\VSS\lib\xerces.jar;C:\SourceW\lib\xml4j.jar -Xrs right? Can a person use quotes? Did you learn about wrapper.jvm.options from the RELEASE-NOTES-3.3.1.txt and what you could pass in from the source code or is wrapper.jvm.options documented in detail somewhere? google did not reveal anything more. (As they say, I appreciate the fish. However, I want to learn how to fish too.) Thanks, Michael --- Bill Barker [EMAIL PROTECTED] wrote: Out of the box, the NT service also ignores your CLASSPATH. You are always free to add wrapper.classpath properties to your wrapper.properties file to include additional locations in your classpath. Depending on your application, this may or may not result in ClassLoader problems. The other method (the one I prefer) is to set: wrapper.jvm.options=-Dorg.apache.tomcat.apps.classpath=your classpath This has the same effect as dumping them in $TOMCAT_HOME\lib\apps. Michael Finney [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I will look. The NT service form of starting Tomcat does not use start up scripts. Right? I want to make sure I understand what we are saying here about the scripts. --- Larry Isaacs [EMAIL PROTECTED] wrote: Like Tomcat4, Tomcat 3.3's startup scripts ignore your CLASSPATH. Tomcat 3.2.x's use of the CLASSPATH was one of the top sources of problems. For important differences upgrading from Tomcat 3.2.x to Tomcat 3.3.x, see: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/readme For how to configure classes in Tomcat 3.3.x, see: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ug.html#configuring_ classes HTH, Larry -Original Message- From: Michael Finney [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 5:19 PM To: Tomcat Users List Subject: CLASSPATH problems on 3.3.1 3.3.1 IIS 5.0 and Tomcat 3.3.1 redirections Running Jakarta as a Service on Windows 2000. Has anyone else had problems with CLASSPATH getting picked up in 3.3.1? In a previous deployment, a CLASSPATH was set to d:\whatever\classes (ok actually it was not classes it was src, but the .class files are in src) CLASSPATH was also set to specific jars. It seems like in order to get classes and jars picked up, I have had to dump the classes into tomcat home\lib\apps That seems so wrong. ;) I am trying to upgrade from 3.2.x to 3.3.1 and I would not have expected such a rough CLASSPATH ride. (Yes, I know about tomcat home\webapps\theweb app\WEB-INF\*stuff I am trying to keep the changes to a minimum for this release.) Thanks. Michael = Michael Finney Sun Certified Programmer for the Java 2 Platform Sun Certified Developer for the Java 2 Platform Sun Certified Web Component Developer for J2EE Platform Cofounder of PPJDG Cofounder of cosAgile - Colorado Springs XP Users Group If replying to this email address fails, try [EMAIL PROTECTED] __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] = Michael Finney Sun Certified Programmer for the Java 2 Platform Sun Certified Developer for the Java 2 Platform Sun Certified Web Component Developer for J2EE Platform Cofounder of PPJDG Cofounder of cosAgile - Colorado Springs XP Users Group If replying to this email address fails, try [EMAIL PROTECTED] __ Do you Yahoo!? Faith Hill - Exclusive Performances,
Re: CLASSPATH problems on 3.3.1
So something like this for the wrapper.jvm.options: wrapper.jvm.options=-Dorg.apache.tomcat.apps.classpath=C:\SourceW\VSS\src;C:\SourceW\ja\src;C:\SourceW\VSS\lib\xerces.jar;C:\SourceW\lib\xml4j.jar -Xrs right? Can a person use quotes? Did you learn about wrapper.jvm.options from the RELEASE-NOTES-3.3.1.txt and what you could pass in from the source code or is wrapper.jvm.options documented in detail somewhere? google did not reveal anything more. (As they say, I appreciate the fish. However, I want to learn how to fish too.) Thanks, Michael --- Bill Barker [EMAIL PROTECTED] wrote: Out of the box, the NT service also ignores your CLASSPATH. You are always free to add wrapper.classpath properties to your wrapper.properties file to include additional locations in your classpath. Depending on your application, this may or may not result in ClassLoader problems. The other method (the one I prefer) is to set: wrapper.jvm.options=-Dorg.apache.tomcat.apps.classpath=your classpath This has the same effect as dumping them in $TOMCAT_HOME\lib\apps. Michael Finney [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I will look. The NT service form of starting Tomcat does not use start up scripts. Right? I want to make sure I understand what we are saying here about the scripts. --- Larry Isaacs [EMAIL PROTECTED] wrote: Like Tomcat4, Tomcat 3.3's startup scripts ignore your CLASSPATH. Tomcat 3.2.x's use of the CLASSPATH was one of the top sources of problems. For important differences upgrading from Tomcat 3.2.x to Tomcat 3.3.x, see: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/readme For how to configure classes in Tomcat 3.3.x, see: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ug.html#configuring_ classes HTH, Larry -Original Message- From: Michael Finney [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 5:19 PM To: Tomcat Users List Subject: CLASSPATH problems on 3.3.1 3.3.1 IIS 5.0 and Tomcat 3.3.1 redirections Running Jakarta as a Service on Windows 2000. Has anyone else had problems with CLASSPATH getting picked up in 3.3.1? In a previous deployment, a CLASSPATH was set to d:\whatever\classes (ok actually it was not classes it was src, but the .class files are in src) CLASSPATH was also set to specific jars. It seems like in order to get classes and jars picked up, I have had to dump the classes into tomcat home\lib\apps That seems so wrong. ;) I am trying to upgrade from 3.2.x to 3.3.1 and I would not have expected such a rough CLASSPATH ride. (Yes, I know about tomcat home\webapps\theweb app\WEB-INF\*stuff I am trying to keep the changes to a minimum for this release.) Thanks. Michael = Michael Finney Sun Certified Programmer for the Java 2 Platform Sun Certified Developer for the Java 2 Platform Sun Certified Web Component Developer for J2EE Platform Cofounder of PPJDG Cofounder of cosAgile - Colorado Springs XP Users Group If replying to this email address fails, try [EMAIL PROTECTED] __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] = Michael Finney Sun Certified Programmer for the Java 2 Platform Sun Certified Developer for the Java 2 Platform Sun Certified Web Component Developer for J2EE Platform Cofounder of PPJDG Cofounder of cosAgile - Colorado Springs XP Users Group If replying to this email address fails, try [EMAIL PROTECTED] __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] = Michael Finney Sun Certified Programmer for the Java 2 Platform Sun Certified Developer for the Java 2 Platform Sun Certified Web Component Developer for J2EE Platform Cofounder of PPJDG Cofounder of cosAgile - Colorado Springs XP Users Group If replying to this email address fails, try [EMAIL PROTECTED] __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: CLASSPATH problems on 3.3.1
-Original Message- From: Michael Finney [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 11:25 AM To: Tomcat Users List Subject: Re: CLASSPATH problems on 3.3.1 So something like this for the wrapper.jvm.options: wrapper.jvm.options=-Dorg.apache.tomcat.apps.classpath=C:\Sour ceW\VSS\src;C:\SourceW\ja\src;C:\SourceW\VSS\lib\xerces.jar;C: \SourceW\lib\xml4j.jar -Xrs right? The above should work. Can a person use quotes? As long as they are valid in the resulting Java command. Did you learn about wrapper.jvm.options from the RELEASE-NOTES-3.3.1.txt and what you could pass in from the source code or is wrapper.jvm.options documented in detail somewhere? google did not reveal anything more. (As they say, I appreciate the fish. However, I want to learn how to fish too.) The main purpose of wrapper.properties is to tell jk_nt_service how to construct the Java command to execute to start tomcat. This command supports the same capabilities as starting Tomcat from the batch scripts. The batch scripts just build the command through different means. Any option that works for the batch scripts can be incorporated into wrapper.properties in some fashion. For example, starting the Tomcat service with a security manager is possible, but not specifially addressed in the default wrapper.properties Cheers, Larry Thanks, Michael --- Bill Barker [EMAIL PROTECTED] wrote: Out of the box, the NT service also ignores your CLASSPATH. You are always free to add wrapper.classpath properties to your wrapper.properties file to include additional locations in your classpath. Depending on your application, this may or may not result in ClassLoader problems. The other method (the one I prefer) is to set: wrapper.jvm.options=-Dorg.apache.tomcat.apps.classpath=your classpath This has the same effect as dumping them in $TOMCAT_HOME\lib\apps. Michael Finney [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I will look. The NT service form of starting Tomcat does not use start up scripts. Right? I want to make sure I understand what we are saying here about the scripts. --- Larry Isaacs [EMAIL PROTECTED] wrote: Like Tomcat4, Tomcat 3.3's startup scripts ignore your CLASSPATH. Tomcat 3.2.x's use of the CLASSPATH was one of the top sources of problems. For important differences upgrading from Tomcat 3.2.x to Tomcat 3.3.x, see: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/readme For how to configure classes in Tomcat 3.3.x, see: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ug.htm l#configuring_ classes HTH, Larry -Original Message- From: Michael Finney [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 5:19 PM To: Tomcat Users List Subject: CLASSPATH problems on 3.3.1 3.3.1 IIS 5.0 and Tomcat 3.3.1 redirections Running Jakarta as a Service on Windows 2000. Has anyone else had problems with CLASSPATH getting picked up in 3.3.1? In a previous deployment, a CLASSPATH was set to d:\whatever\classes (ok actually it was not classes it was src, but the .class files are in src) CLASSPATH was also set to specific jars. It seems like in order to get classes and jars picked up, I have had to dump the classes into tomcat home\lib\apps That seems so wrong. ;) I am trying to upgrade from 3.2.x to 3.3.1 and I would not have expected such a rough CLASSPATH ride. (Yes, I know about tomcat home\webapps\theweb app\WEB-INF\*stuff I am trying to keep the changes to a minimum for this release.) Thanks. Michael = Michael Finney Sun Certified Programmer for the Java 2 Platform Sun Certified Developer for the Java 2 Platform Sun Certified Web Component Developer for J2EE Platform Cofounder of PPJDG Cofounder of cosAgile - Colorado Springs XP Users Group If replying to this email address fails, try [EMAIL PROTECTED] __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] = Michael Finney Sun Certified Programmer for the Java 2 Platform Sun Certified Developer for the Java 2 Platform Sun Certified Web Component Developer for J2EE Platform Cofounder
RE: CLASSPATH problems on 3.3.1
Like Tomcat4, Tomcat 3.3's startup scripts ignore your CLASSPATH. Tomcat 3.2.x's use of the CLASSPATH was one of the top sources of problems. For important differences upgrading from Tomcat 3.2.x to Tomcat 3.3.x, see: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/readme For how to configure classes in Tomcat 3.3.x, see: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ug.html#configuring_classes HTH, Larry -Original Message- From: Michael Finney [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 5:19 PM To: Tomcat Users List Subject: CLASSPATH problems on 3.3.1 3.3.1 IIS 5.0 and Tomcat 3.3.1 redirections Running Jakarta as a Service on Windows 2000. Has anyone else had problems with CLASSPATH getting picked up in 3.3.1? In a previous deployment, a CLASSPATH was set to d:\whatever\classes (ok actually it was not classes it was src, but the .class files are in src) CLASSPATH was also set to specific jars. It seems like in order to get classes and jars picked up, I have had to dump the classes into tomcat home\lib\apps That seems so wrong. ;) I am trying to upgrade from 3.2.x to 3.3.1 and I would not have expected such a rough CLASSPATH ride. (Yes, I know about tomcat home\webapps\theweb app\WEB-INF\*stuff I am trying to keep the changes to a minimum for this release.) Thanks. Michael = Michael Finney Sun Certified Programmer for the Java 2 Platform Sun Certified Developer for the Java 2 Platform Sun Certified Web Component Developer for J2EE Platform Cofounder of PPJDG Cofounder of cosAgile - Colorado Springs XP Users Group If replying to this email address fails, try [EMAIL PROTECTED] __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: CLASSPATH problems on 3.3.1
I will look. The NT service form of starting Tomcat does not use start up scripts. Right? I want to make sure I understand what we are saying here about the scripts. --- Larry Isaacs [EMAIL PROTECTED] wrote: Like Tomcat4, Tomcat 3.3's startup scripts ignore your CLASSPATH. Tomcat 3.2.x's use of the CLASSPATH was one of the top sources of problems. For important differences upgrading from Tomcat 3.2.x to Tomcat 3.3.x, see: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/readme For how to configure classes in Tomcat 3.3.x, see: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ug.html#configuring_classes HTH, Larry -Original Message- From: Michael Finney [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 5:19 PM To: Tomcat Users List Subject: CLASSPATH problems on 3.3.1 3.3.1 IIS 5.0 and Tomcat 3.3.1 redirections Running Jakarta as a Service on Windows 2000. Has anyone else had problems with CLASSPATH getting picked up in 3.3.1? In a previous deployment, a CLASSPATH was set to d:\whatever\classes (ok actually it was not classes it was src, but the .class files are in src) CLASSPATH was also set to specific jars. It seems like in order to get classes and jars picked up, I have had to dump the classes into tomcat home\lib\apps That seems so wrong. ;) I am trying to upgrade from 3.2.x to 3.3.1 and I would not have expected such a rough CLASSPATH ride. (Yes, I know about tomcat home\webapps\theweb app\WEB-INF\*stuff I am trying to keep the changes to a minimum for this release.) Thanks. Michael = Michael Finney Sun Certified Programmer for the Java 2 Platform Sun Certified Developer for the Java 2 Platform Sun Certified Web Component Developer for J2EE Platform Cofounder of PPJDG Cofounder of cosAgile - Colorado Springs XP Users Group If replying to this email address fails, try [EMAIL PROTECTED] __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] = Michael Finney Sun Certified Programmer for the Java 2 Platform Sun Certified Developer for the Java 2 Platform Sun Certified Web Component Developer for J2EE Platform Cofounder of PPJDG Cofounder of cosAgile - Colorado Springs XP Users Group If replying to this email address fails, try [EMAIL PROTECTED] __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: CLASSPATH problems on 3.3.1
Out of the box, the NT service also ignores your CLASSPATH. You are always free to add wrapper.classpath properties to your wrapper.properties file to include additional locations in your classpath. Depending on your application, this may or may not result in ClassLoader problems. The other method (the one I prefer) is to set: wrapper.jvm.options=-Dorg.apache.tomcat.apps.classpath=your classpath This has the same effect as dumping them in $TOMCAT_HOME\lib\apps. Michael Finney [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I will look. The NT service form of starting Tomcat does not use start up scripts. Right? I want to make sure I understand what we are saying here about the scripts. --- Larry Isaacs [EMAIL PROTECTED] wrote: Like Tomcat4, Tomcat 3.3's startup scripts ignore your CLASSPATH. Tomcat 3.2.x's use of the CLASSPATH was one of the top sources of problems. For important differences upgrading from Tomcat 3.2.x to Tomcat 3.3.x, see: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/readme For how to configure classes in Tomcat 3.3.x, see: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ug.html#configuring_ classes HTH, Larry -Original Message- From: Michael Finney [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 5:19 PM To: Tomcat Users List Subject: CLASSPATH problems on 3.3.1 3.3.1 IIS 5.0 and Tomcat 3.3.1 redirections Running Jakarta as a Service on Windows 2000. Has anyone else had problems with CLASSPATH getting picked up in 3.3.1? In a previous deployment, a CLASSPATH was set to d:\whatever\classes (ok actually it was not classes it was src, but the .class files are in src) CLASSPATH was also set to specific jars. It seems like in order to get classes and jars picked up, I have had to dump the classes into tomcat home\lib\apps That seems so wrong. ;) I am trying to upgrade from 3.2.x to 3.3.1 and I would not have expected such a rough CLASSPATH ride. (Yes, I know about tomcat home\webapps\theweb app\WEB-INF\*stuff I am trying to keep the changes to a minimum for this release.) Thanks. Michael = Michael Finney Sun Certified Programmer for the Java 2 Platform Sun Certified Developer for the Java 2 Platform Sun Certified Web Component Developer for J2EE Platform Cofounder of PPJDG Cofounder of cosAgile - Colorado Springs XP Users Group If replying to this email address fails, try [EMAIL PROTECTED] __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] = Michael Finney Sun Certified Programmer for the Java 2 Platform Sun Certified Developer for the Java 2 Platform Sun Certified Web Component Developer for J2EE Platform Cofounder of PPJDG Cofounder of cosAgile - Colorado Springs XP Users Group If replying to this email address fails, try [EMAIL PROTECTED] __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath
control Panel-System-Advanced-Environment Variables -Original Message- From: jaicey ouseph [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 6:00 PM To: [EMAIL PROTECTED] Subject: Classpath Hello Sir, I am using Tomcat 4.0. I have some database driver class in a some specific directory say d:\driver. I have set my classpath to that directory. I can start tomcat in 2 ways * Through startup.bat which calls setclasspath.bat where u can specify your classpath setting. * Through bootstrap. By setting the classpath in setclasspath.bat works only if I start Tomcat 4.0 using startup.bat. But how do I set my classpath if I want to start Tomcat using bootstrap. Waiting desperately for your answer. Thanx in advance. Byee -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath
Hi, Thanks for your response. But I have already set the environment variables. When I open dos prompt usng 'cmd' and I type echo %classpath%, I get the entire classpath setting which include s the drivers path. But all in vain. Waiting desperately for your answer. Thanx in advance. Byee -Original Message- From: Galbayar [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 1:47 PM To: Tomcat Users List Subject: RE: Classpath control Panel-System-Advanced-Environment Variables -Original Message- From: jaicey ouseph [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 6:00 PM To: [EMAIL PROTECTED] Subject: Classpath Hello Sir, I am using Tomcat 4.0. I have some database driver class in a some specific directory say d:\driver. I have set my classpath to that directory. I can start tomcat in 2 ways * Through startup.bat which calls setclasspath.bat where u can specify your classpath setting. * Through bootstrap. By setting the classpath in setclasspath.bat works only if I start Tomcat 4.0 using startup.bat. But how do I set my classpath if I want to start Tomcat using bootstrap. Waiting desperately for your answer. Thanx in advance. Byee -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath
tomcat doesn't use the classpath. put your jar in your webapp's lib dir (myapp/WEB-INF/lib) or in the common dir(/common/lib). You probably want them in the common lib so that the database drivers are shared between all webapps. see the classloader doc for more info on how these directories are used. Charlie -Original Message- From: jaicey ouseph [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 5:23 AM To: Tomcat Users List Subject: RE: Classpath Hi, Thanks for your response. But I have already set the environment variables. When I open dos prompt usng 'cmd' and I type echo %classpath%, I get the entire classpath setting which include s the drivers path. But all in vain. Waiting desperately for your answer. Thanx in advance. Byee -Original Message- From: Galbayar [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 1:47 PM To: Tomcat Users List Subject: RE: Classpath control Panel-System-Advanced-Environment Variables -Original Message- From: jaicey ouseph [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 6:00 PM To: [EMAIL PROTECTED] Subject: Classpath Hello Sir, I am using Tomcat 4.0. I have some database driver class in a some specific directory say d:\driver. I have set my classpath to that directory. I can start tomcat in 2 ways * Through startup.bat which calls setclasspath.bat where u can specify your classpath setting. * Through bootstrap. By setting the classpath in setclasspath.bat works only if I start Tomcat 4.0 using startup.bat. But how do I set my classpath if I want to start Tomcat using bootstrap. Waiting desperately for your answer. Thanx in advance. Byee -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath
hi Charlie, Is there no way out wherein I can change any of file to include my classpath settings. Becoz I don't want to copy my file in in web-inf/lib or in common/lib. There will be some classpath setting which the bootstrap must be using. By any way can I modify that Sorry, in case I am irritating you. Regards, Jaicey. -Original Message- From: Cox, Charlie [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 4:53 PM To: 'Tomcat Users List' Subject: RE: Classpath tomcat doesn't use the classpath. put your jar in your webapp's lib dir (myapp/WEB-INF/lib) or in the common dir(/common/lib). You probably want them in the common lib so that the database drivers are shared between all webapps. see the classloader doc for more info on how these directories are used. Charlie -Original Message- From: jaicey ouseph [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 5:23 AM To: Tomcat Users List Subject: RE: Classpath Hi, Thanks for your response. But I have already set the environment variables. When I open dos prompt usng 'cmd' and I type echo %classpath%, I get the entire classpath setting which include s the drivers path. But all in vain. Waiting desperately for your answer. Thanx in advance. Byee -Original Message- From: Galbayar [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 1:47 PM To: Tomcat Users List Subject: RE: Classpath control Panel-System-Advanced-Environment Variables -Original Message- From: jaicey ouseph [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 6:00 PM To: [EMAIL PROTECTED] Subject: Classpath Hello Sir, I am using Tomcat 4.0. I have some database driver class in a some specific directory say d:\driver. I have set my classpath to that directory. I can start tomcat in 2 ways * Through startup.bat which calls setclasspath.bat where u can specify your classpath setting. * Through bootstrap. By setting the classpath in setclasspath.bat works only if I start Tomcat 4.0 using startup.bat. But how do I set my classpath if I want to start Tomcat using bootstrap. Waiting desperately for your answer. Thanx in advance. Byee -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath
no, because it is too easy to have conflicting libraries between tomcat and the classpath. Therefore tomcat 4.x does not use the classpath. The bootstrap loads from /jre/lib/ext, but if you are going to put your library there, then just put it under tomcat instead unless you have a *real* reason to keep it there. what's wrong with moving(or copying) the jar to common/lib? Charlie -Original Message- From: jaicey ouseph [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 7:56 AM To: Tomcat Users List Subject: RE: Classpath hi Charlie, Is there no way out wherein I can change any of file to include my classpath settings. Becoz I don't want to copy my file in in web-inf/lib or in common/lib. There will be some classpath setting which the bootstrap must be using. By any way can I modify that Sorry, in case I am irritating you. Regards, Jaicey. -Original Message- From: Cox, Charlie [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 4:53 PM To: 'Tomcat Users List' Subject: RE: Classpath tomcat doesn't use the classpath. put your jar in your webapp's lib dir (myapp/WEB-INF/lib) or in the common dir(/common/lib). You probably want them in the common lib so that the database drivers are shared between all webapps. see the classloader doc for more info on how these directories are used. Charlie -Original Message- From: jaicey ouseph [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 5:23 AM To: Tomcat Users List Subject: RE: Classpath Hi, Thanks for your response. But I have already set the environment variables. When I open dos prompt usng 'cmd' and I type echo %classpath%, I get the entire classpath setting which include s the drivers path. But all in vain. Waiting desperately for your answer. Thanx in advance. Byee -Original Message- From: Galbayar [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 1:47 PM To: Tomcat Users List Subject: RE: Classpath control Panel-System-Advanced-Environment Variables -Original Message- From: jaicey ouseph [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 6:00 PM To: [EMAIL PROTECTED] Subject: Classpath Hello Sir, I am using Tomcat 4.0. I have some database driver class in a some specific directory say d:\driver. I have set my classpath to that directory. I can start tomcat in 2 ways * Through startup.bat which calls setclasspath.bat where u can specify your classpath setting. * Through bootstrap. By setting the classpath in setclasspath.bat works only if I start Tomcat 4.0 using startup.bat. But how do I set my classpath if I want to start Tomcat using bootstrap. Waiting desperately for your answer. Thanx in advance. Byee -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath Issues, Tomcat 4.X and J2EE Interoperability frustrations...
Hi, Wow, what a long message ;) I don't have time to reply to everything, but the general answer is: tomcat is a servlet/JSP container at this point. Not a J2EE container. Inter-operating with remote J2EE servers, at least for us, has proven easy. We've never used tomcat 3.x, only 4.x, so I can't comment on version differences. One more comment is that the weblogic.jar distribution is, IMHO, one of the best examples of how NOT to package things. You simply got lucky that it had javax.xml.transform, along with a ton of other things that don't belong in there. Just look at the weblogic boards and mailing lists to see how many times they've been slammed and requested to split their jar into smaller pieces. For example, some of our apps only need to send JMS messages to a remote weblogic server, so we've had to take out everything non-JMS/JNDI related from the weblogic.jar and repackage it. I'm also curious as to what version of the JDK you are using. 1. Should one assume use of the J2EE SDK distribution of Tomcat is required for J2EE interoperability, per 2.0 spec? More directly, is it reasonable to try to get J2EE interopability with the apache distribution of Tomcat? No to the first question, yes to the second. It depends by what you mean by J2EE interoperability. Tomcat implements the servlet and JSP specs, which define very specific facilities (ejb resource definition in web.xml, etc.) for interaction with the broader J2EE world. Using tomcat with the J2EE SDK won't give tomcat any magical features. 2. Why is there no javax.xml.transform implementation inside the apache Tomcat distribution? That's not part of tomcat. It's usually distributed with your parser (e.g. Crimson or Xerces), or more recently with JDK 1.4.x. 3. For a J2EE container to be interoperable per the spec, would it be reasonable to assume this means class loading issues inside the client container have been tested/addressed? Yes, and they have been for tomcat. 4. How is one supposed to develop a reasonable plan/approach for J2EE interoperability? Or is interoperability a bad idea? I would say that interoperability is not a bad idea. I think it's a good thing. The first part of developing a reasonable plan / approach would be to understand what your different components, e.g. tomcat if that's what you choose as your client container, support and don't support. Perhaps you should use JBoss or Weblogic as your client container as well? TOMCAT_HOME/shared/lib. This also provided a usable implementation of javax.xml.transform. This is one of the main problems. See my comment regarding weblogic.jar above. How do you know what version of javax.xml.transform is inside the weblogic.jar? What if you want to talk to weblogic, but your webapps require a newer javax.xml.transform implementation? narrow on PortableRemoteObject. Assumption is because a given home is now loaded in two separate class loaders, this is causing problems? Don't know exactly. I wouldn't rush to conclude this assumption is true. I think it bears more investigating. If both classloader chains are self-consistent, i.e. no conflicting versions of classes in either chain, you should be fine. In a second attempted configuration, tried to move weblogic.jar down from TOMCAT_HOME/shared/lib to WEB-INF/lib. This has side affect of warning messages about not loading javax.servlet per 2.3 spec section 9.7.2. Fine. Why is this fine? I think moving weblogic.jar to /WEB-INF/lib is a good step, but weblogic.jar has too much conflicting stuff in it. else! Fine, we added xalan.jar to TOMCAT_HOME/shared/lib. We then blew up If you add this and don't remove the other javax.xml.transform implementation, i.e. the one in weblogic jar, you can expect a blow-up. In considering a third configuration, we began investigating using RMI-IIOP to communicate with WL. In theory this should be possible per EJB spec 2.0 section 19? First immediate problem seemed to be that Tomcat has no javax.ejb classes available. Would seem these classes are only available when running Tomcat under the J2EE SDK distribution? In general uncertainty about this, and whether it will even address class loading issues, has caused us to wait before proceeding. Fumble. See above comments regarding tomcat is not a J2EE server, doesn't claim to be. Finally, a fourth configuration was tried which seemed to have some promise, with a serious drawback. Would appear that things basically work if we put everything, weblogic.jar, jdbc drivers, application jars, testing jars, etc into TOMCAT_HOME/shared. Unfortunately, this pretty much eliminates/defeats any hope of deploying applications without tearding down the container and also complicates the build/deployment process as we can no longer just throw a new .war file over the wall at operations. Penalty. I agree that this is not a good approach. Keep in mind that for the most part, web applications are supposed to be self-contained. You
RE: Classpath Issues, Tomcat 4.X and J2EE Interoperability frustrations...
Yoav and JeanFrancios, Thank you both for your replies. They were helpful and somewhat reassuring. At the general level: We are aware that Tomcat is not a full J2EE container. But servlets calling EJB's is bread and butter stuff. We have been successfully using Tomcat to talk to WebLogic for 2 years, so know it can work. But each time we go through an upgrade, of either component, we repeat the same voodoo process of jar, jar, where to put the jar. This jar jungle is a nightmarish flashback to dll hell from C++/Windows days. What we are looking for is two things. One, some reassurance we aren't in the wilderness using Tomcat to talk to WebLogic. Two, a better foundation for developing strategies for handling jar packaging and classloading issues. I think I got a little of both from your replies. At the specifics: We are currently using JDK 1.3.1. Considered the need to break out weblogic.jar, just hoping to avoid it. Will put specific re-packaging of required javax.* classes back back on the list. Cleaning up issues with conflicts, overlaps and gaps in javax.xml.* implementations is one of our motivators to upgrade, so we can also get to JDK 1.4 and get out of the mess. Unfortunately this is a painful catch 22. Have considered using JBoss or WebLogic for our servlet container. This option is still on the table. It has drawbacks, but puts everything inside the same dotted box and thus eliminates some interop baggage. Have also considered using J2EE 1.3 as a container for running Tomcat, thus providing more full J2EE support. Also still on the table. Still not at the root of the class cast exception when running our first choice config. The classloader chains did look consistent and clean. Jean-Francios mentioned something about when the home/remote skeletons get loaded (did you mean stubs?). Will look at this, as it is also consistent with other ideas about how to use RMI-IIOP and the use of the client jar generated from ejbc on the tomcat side. Thanks again. Helpful. But still, feel like we could write a paper on the dark side of J2EE ownership and maintenance. Hopefully someone at Sun is listening... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 9:28 AM To: Tomcat Users List Subject: RE: Classpath Issues, Tomcat 4.X and J2EE Interoperability frustrations... Hi, Wow, what a long message ;) I don't have time to reply to everything, but the general answer is: tomcat is a servlet/JSP container at this point. Not a J2EE container. Inter-operating with remote J2EE servers, at least for us, has proven easy. We've never used tomcat 3.x, only 4.x, so I can't comment on version differences. One more comment is that the weblogic.jar distribution is, IMHO, one of the best examples of how NOT to package things. You simply got lucky that it had javax.xml.transform, along with a ton of other things that don't belong in there. Just look at the weblogic boards and mailing lists to see how many times they've been slammed and requested to split their jar into smaller pieces. For example, some of our apps only need to send JMS messages to a remote weblogic server, so we've had to take out everything non-JMS/JNDI related from the weblogic.jar and repackage it. I'm also curious as to what version of the JDK you are using. 1. Should one assume use of the J2EE SDK distribution of Tomcat is required for J2EE interoperability, per 2.0 spec? More directly, is it reasonable to try to get J2EE interopability with the apache distribution of Tomcat? No to the first question, yes to the second. It depends by what you mean by J2EE interoperability. Tomcat implements the servlet and JSP specs, which define very specific facilities (ejb resource definition in web.xml, etc.) for interaction with the broader J2EE world. Using tomcat with the J2EE SDK won't give tomcat any magical features. 2. Why is there no javax.xml.transform implementation inside the apache Tomcat distribution? That's not part of tomcat. It's usually distributed with your parser (e.g. Crimson or Xerces), or more recently with JDK 1.4.x. 3. For a J2EE container to be interoperable per the spec, would it be reasonable to assume this means class loading issues inside the client container have been tested/addressed? Yes, and they have been for tomcat. 4. How is one supposed to develop a reasonable plan/approach for J2EE interoperability? Or is interoperability a bad idea? I would say that interoperability is not a bad idea. I think it's a good thing. The first part of developing a reasonable plan / approach would be to understand what your different components, e.g. tomcat if that's what you choose as your client container, support and don't support. Perhaps you should use JBoss or Weblogic as your client container as well? TOMCAT_HOME/shared/lib. This also provided a usable
RE: Classpath Issues, Tomcat 4.X and J2EE Interoperabilityfrustrations...
On Thu, 10 Oct 2002, Andrew Gilbert wrote: Date: Thu, 10 Oct 2002 11:42:05 -0400 From: Andrew Gilbert [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: Classpath Issues, Tomcat 4.X and J2EE Interoperability frustrations... Yoav and JeanFrancios, Thank you both for your replies. They were helpful and somewhat reassuring. At the general level: We are aware that Tomcat is not a full J2EE container. But servlets calling EJB's is bread and butter stuff. Only for an EJB server :-). Tomcat standalone has zero facilities to support this. For example, it basically ignores ejb-ref entries in your deployment descriptor. There are three feasible approaches: * Use a non-standard JNDI initial context, configured in a way that will talk to your particular EJB server. The details of this are very EJB-container-specific (the TOMCAT-USER archives have comments from people who've been able to do it from Tomcat to the J2EE RI), and is not guaranteed to be available. You're also going to have to piece together the right classes for your particular app server in order to make the right stuff available. * Use a EJB+Servlet container that has Tomcat integrated in (such as the J2EE RI or JBoss). The container provider has solved all these problems for you already. * Use the servlet container provided by your EJB container vendor (sounds like WebLogic in your case), which also has solved all these problems. Anything else is way out on the fringes of technical fragility, and probably relies on internal APIs that are subject to change. That's why you have so many problems in each upgrade cycle -- you're trying to do something very much non-mainstream. Craig McClanahan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath Issues, Tomcat 4.X and J2EE Interoperability frustrations...
Craig, I was slowly coming to the conclusion that approaches 2 and 3 are superior. Having said that, I am still somewhat bothered. It is easy to (naively?) adopt approach 1. The two prior responses seemed to indicate this approach was okay. Yoav is using it. And there is currently another active thread on this list about using Tomcat to talk with JBoss. There is certainly strong natural motivation to want to deploy servlet container(s) toward the edge talking to app server(s) at the core. Seems odd to assert I should only talk to my distributed remote object server by first putting myself inside another distributed remote object server. Anyway, I appreciate your response. Thanks. Andy -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 12:56 PM To: Tomcat Users List Subject: RE: Classpath Issues, Tomcat 4.X and J2EE Interoperability frustrations... On Thu, 10 Oct 2002, Andrew Gilbert wrote: Date: Thu, 10 Oct 2002 11:42:05 -0400 From: Andrew Gilbert [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: Classpath Issues, Tomcat 4.X and J2EE Interoperability frustrations... Yoav and JeanFrancios, Thank you both for your replies. They were helpful and somewhat reassuring. At the general level: We are aware that Tomcat is not a full J2EE container. But servlets calling EJB's is bread and butter stuff. Only for an EJB server :-). Tomcat standalone has zero facilities to support this. For example, it basically ignores ejb-ref entries in your deployment descriptor. There are three feasible approaches: * Use a non-standard JNDI initial context, configured in a way that will talk to your particular EJB server. The details of this are very EJB-container-specific (the TOMCAT-USER archives have comments from people who've been able to do it from Tomcat to the J2EE RI), and is not guaranteed to be available. You're also going to have to piece together the right classes for your particular app server in order to make the right stuff available. * Use a EJB+Servlet container that has Tomcat integrated in (such as the J2EE RI or JBoss). The container provider has solved all these problems for you already. * Use the servlet container provided by your EJB container vendor (sounds like WebLogic in your case), which also has solved all these problems. Anything else is way out on the fringes of technical fragility, and probably relies on internal APIs that are subject to change. That's why you have so many problems in each upgrade cycle -- you're trying to do something very much non-mainstream. Craig McClanahan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath Issues, Tomcat 4.X and J2EE Interoperability frustrations...
Should I understand this all to say that Tomcat is not at all J2EE 1.3 compliant? Section 6.1.2 states that a compliant web container supports EJB client API's! Section 6.4 states that a container that supports the EJB client API's must also support interoperability requirements. Section 6.11 states a container must support JAXP, including one SAX2 parser, one DOM 2 parser and one transformer. Figure 2.1 Strongly implies that our architectural assumption (web containter talking to EJB container) is a valid one. I still vote for quite confusing and somewhat misleading -Original Message- From: Andrew Gilbert Sent: Thursday, October 10, 2002 3:39 PM To: Tomcat Users List Cc: 'Craig R. McClanahan'; 'Jean-Francois Arcand'; 'Shapira, Yoav'; Tim Segall Subject: RE: Classpath Issues, Tomcat 4.X and J2EE Interoperability frustrations... Craig, I was slowly coming to the conclusion that approaches 2 and 3 are superior. Having said that, I am still somewhat bothered. It is easy to (naively?) adopt approach 1. The two prior responses seemed to indicate this approach was okay. Yoav is using it. And there is currently another active thread on this list about using Tomcat to talk with JBoss. There is certainly strong natural motivation to want to deploy servlet container(s) toward the edge talking to app server(s) at the core. Seems odd to assert I should only talk to my distributed remote object server by first putting myself inside another distributed remote object server. Anyway, I appreciate your response. Thanks. Andy -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 12:56 PM To: Tomcat Users List Subject: RE: Classpath Issues, Tomcat 4.X and J2EE Interoperability frustrations... On Thu, 10 Oct 2002, Andrew Gilbert wrote: Date: Thu, 10 Oct 2002 11:42:05 -0400 From: Andrew Gilbert [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: Classpath Issues, Tomcat 4.X and J2EE Interoperability frustrations... Yoav and JeanFrancios, Thank you both for your replies. They were helpful and somewhat reassuring. At the general level: We are aware that Tomcat is not a full J2EE container. But servlets calling EJB's is bread and butter stuff. Only for an EJB server :-). Tomcat standalone has zero facilities to support this. For example, it basically ignores ejb-ref entries in your deployment descriptor. There are three feasible approaches: * Use a non-standard JNDI initial context, configured in a way that will talk to your particular EJB server. The details of this are very EJB-container-specific (the TOMCAT-USER archives have comments from people who've been able to do it from Tomcat to the J2EE RI), and is not guaranteed to be available. You're also going to have to piece together the right classes for your particular app server in order to make the right stuff available. * Use a EJB+Servlet container that has Tomcat integrated in (such as the J2EE RI or JBoss). The container provider has solved all these problems for you already. * Use the servlet container provided by your EJB container vendor (sounds like WebLogic in your case), which also has solved all these problems. Anything else is way out on the fringes of technical fragility, and probably relies on internal APIs that are subject to change. That's why you have so many problems in each upgrade cycle -- you're trying to do something very much non-mainstream. Craig McClanahan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath Issues, Tomcat 4.X and J2EE Interoperabilityfrustrations...
On Thu, 10 Oct 2002, Andrew Gilbert wrote: Date: Thu, 10 Oct 2002 16:23:21 -0400 From: Andrew Gilbert [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: Classpath Issues, Tomcat 4.X and J2EE Interoperability frustrations... Should I understand this all to say that Tomcat is not at all J2EE 1.3 compliant? That's a fair one-liner summary. The more correct answer is that Tomcat complies with all of the mandatory Servlet 2.3 and JSP 1.2 features, plus *some* of those that are only required by a complete J2EE platform (i.e. the JNDI naming context, and availability of a JDBC data source accessed via an API compatible with J2EE standards). It has no support for EJB, JMS, ... so it is absolutely not a J2EE compliant server by itself. Nobody eer claimed it was (although I can't help it when people make assumptions). What makes more confusing is that several people bundle Tomcat into a complete J2EE-ish thing. Sun does that with the J2EE RI, for example -- but it's only a J2EE platform when you use all of it. But Tomcat by itself is not a J2EE container. Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath Issues, Tomcat 4.X and J2EE Interoperability frustrations...
Doh! Thanks again for the replies. I appreciate the input. The path is at least becoming clearer now... -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 4:31 PM To: Tomcat Users List Subject: RE: Classpath Issues, Tomcat 4.X and J2EE Interoperability frustrations... On Thu, 10 Oct 2002, Andrew Gilbert wrote: Date: Thu, 10 Oct 2002 16:23:21 -0400 From: Andrew Gilbert [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: Classpath Issues, Tomcat 4.X and J2EE Interoperability frustrations... Should I understand this all to say that Tomcat is not at all J2EE 1.3 compliant? That's a fair one-liner summary. The more correct answer is that Tomcat complies with all of the mandatory Servlet 2.3 and JSP 1.2 features, plus *some* of those that are only required by a complete J2EE platform (i.e. the JNDI naming context, and availability of a JDBC data source accessed via an API compatible with J2EE standards). It has no support for EJB, JMS, ... so it is absolutely not a J2EE compliant server by itself. Nobody eer claimed it was (although I can't help it when people make assumptions). What makes more confusing is that several people bundle Tomcat into a complete J2EE-ish thing. Sun does that with the J2EE RI, for example -- but it's only a J2EE platform when you use all of it. But Tomcat by itself is not a J2EE container. Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Classpath Issues, Tomcat 4.X and J2EE Interoperability frustrations...
Andrew Gilbert wrote: We are finding this a particularly frustrating experience, and it seems to be a weak point either/or both in specification and implementation (or a fatal flaw in our basic approach - but would add we are consistent at least with the intent of the EJB specs). Would appreciate input and enlightenment. Questions: 1. Should one assume use of the J2EE SDK distribution of Tomcat is required for J2EE interoperability, per 2.0 spec? More directly, is it reasonable to try to get J2EE interopability with the apache distribution of Tomcat? Tomcat doesn't have direct relationships with EJB 2.0 specs. If you use remote interface, calling them from Tomcat or not doesn't make a difference. 2. Why is there no javax.xml.transform implementation inside the apache Tomcat distribution? Because those packages comes with the parser (see Xerces/Crimson documentation) or are bundled with JDK 1.4. 3. For a J2EE container to be interoperable per the spec, would it be reasonable to assume this means class loading issues inside the client container have been tested/addressed? Yes 4. How is one supposed to develop a reasonable plan/approach for J2EE interoperability? Or is interoperability a bad idea? What do you means exactly? Summary: In our case we are trying to upgrade to Tomcat 4.1.12 under Win2K to interoperate with WL 7.01. We have two web applications deployed under Tomcat, referencing EJB's and DataSources running inside WL. The web applications also require an implementation of javax.xml.transform. We are currently successfully deployed using Tomcat 3.3 and WL 5.1 (using T3). In our first attempted new configuration, we opted to use WL T3 (ie weblogic.jar) to communicate from Tomcat to WL. Placed this in TOMCAT_HOME/shared/lib. This also provided a usable implementation of javax.xml.transform. Our application jars are all placed in WEB-INF/lib. Problem occurred when referencing an EJBHome first from one web app, then subsequently from another. Led to class cast exceptions when doing the narrow on PortableRemoteObject. Assumption is because a given home is now loaded in two separate class loaders, this is causing problems? Well, I don't think it's related. This error usually occurs when your initial home/remote interface skeleton are in your classpath By initial, I mean before deploying your app. You need the home/remote interface skeleton that are generated *after* the deployment in your classpath. WebLogic probably add some IIOP stuff in your home/remote interface. Don't know exactly. The home remote stub gets loaded by a WL classloader whose parent is the WebppClassLoader, whose parent is the StandardClassLoader for shared. The home interface is loaded by the WebappClassLoader, whose parent is the StandardClassLoader for shared. Interception. In a second attempted configuration, tried to move weblogic.jar down from TOMCAT_HOME/shared/lib to WEB-INF/lib. This has side affect of warning messages about not loading javax.servlet per 2.3 spec section 9.7.2. Fine. It also appeared to result in loss of the javax.xml.transform implementation in weblogic.jar. Looks like something to do with not messing with JAXP from WEB-INF, only the classes in question don't exist anywhere else! Fine, we added xalan.jar to TOMCAT_HOME/shared/lib. We then blew up on first attempt to use a WL hosted DataSource, with class not found issues. This looks like issues with javax.sql classes that have been loaded higher up the loader hierarchy not being able to find stuff down inside WEB-INF/lib. Punt. Which version of Java are you using? In considering a third configuration, we began investigating using RMI-IIOP to communicate with WL. In theory this should be possible per EJB spec 2.0 section 19? Its mandatory if you are using a J2EE 1.3 Compatible implementation. First immediate problem seemed to be that Tomcat has no javax.ejb classes available. Would seem these classes are only available when running Tomcat under the J2EE SDK distribution? Yes. Tomcat doesn't need to know anything about J2EE API. In general uncertainty about this, and whether it will even address class loading issues, has caused us to wait before proceeding. Fumble. Finally, a fourth configuration was tried which seemed to have some promise, with a serious drawback. Would appear that things basically work if we put everything, weblogic.jar, jdbc drivers, application jars, testing jars, etc into TOMCAT_HOME/shared. Unfortunately, this pretty much eliminates/defeats any hope of deploying applications without tearding down the container and also complicates the build/deployment process as we can no longer just throw a new .war file over the wall at operations. Penalty. Ya...this is certainly not the solution. Have you try deploying your stuff with the Sun J2EE's RI 1.3? -- Jeanfrancois Any feedback is appreciated. Andrew -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For
RE: Classpath and Aliases on Tomcat 4
tomcat does not use the classpath. your classes must go under /tomcat/common/lib or within your context. you can try soft links, but they are disabled in 4.1.x by default. for your static files, just create a directory under your context - then you can access it as a subdir in your url. you also need to rename your .zip files that contatin classes to .jar Charlie -Original Message- From: Matthew Smith [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 08, 2002 2:23 AM To: Tomcat Users List (E-mail) Subject: Classpath and Aliases on Tomcat 4 G'Day, I hope I'm not about to rehash an old subject here. I couldn't find a satisfactory answer in the mail archives. I have a web-based application that is not designed as a webapp. It has a single servlet as its interface to the world. This servlet, and all of its supporting classes, are in a directory on the file system. Some of the classes are unpackaged, while most of them are in JAR or ZIP files. It also relies on another directory on the file system for images. I am trying to configure a webapp to use this application. I need to know how to do two things: Add elements to the classpath from elsewhere on the file system; and add a static directory to a web app (as in the Alias command in the Apache web server). Currently, I have created a seperate web app for the static files and just pointed its base directory at the images directory. I was hoping for a better way (other than to use IIS or Apache). The classpath issue is more difficult. I was able to accomplish this in Tomcat 3 by passing the -Dorg.apache.tomcat.apps.classpath=xxx system property in the tomcat.bat file. Tomcat 4 (Catalina) doesn't seem to know about this property. I tried adding the path directly to Tomcat's classpath, but it seems that in that case, the wrong class loader is used: I get a NoClassDefFoundError on HttpServlet. Any suggestions anyone? All help muchly appreciated. Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: classpath
Tomcat ClassLoader HOWTO: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html Quote: For classes and resources specific to a particular web application, place unpacked classes and resources under /WEB-INF/classes of your web application archive, or place JAR files containing those classes and resources under /WEB-INF/lib of your web application archive. For classes and resources that must be shared across all web applications, place unpacked classes and resources under $CATALINA_HOME/shared/classes, or place JAR files containing those classes and resources under $CATALINA_HOME/shared/lib. John -Original Message- From: Lindomar [mailto:[EMAIL PROTECTED]] Sent: Monday, September 23, 2002 10:56 AM To: Tomcat Users List Subject: classpath Hi everybody! I have a problem with Tomcat4.1's classpath. I have a jar file, and i placed in common/lib, but tomcat doesn't find my classes! I put jar file in classpath on NT and run a test from dos prompt and it's ok. Anybody has any idea where i put my jar file? regards, Lindomar. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: classpath
For my jsp project I put my jar file on [TOMCAT_HOME]\webapps\project\WEB-INF\lib, it's work. Saludos, Patricio Vera S. - Original Message - From: Lindomar [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, September 23, 2002 10:55 AM Subject: classpath Hi everybody! I have a problem with Tomcat4.1's classpath. I have a jar file, and i placed in common/lib, but tomcat doesn't find my classes! I put jar file in classpath on NT and run a test from dos prompt and it's ok. Anybody has any idea where i put my jar file? regards, Lindomar. ___ Copa del Mundo de la FIFA 2002 El único lugar de Internet con vídeos de los 64 partidos. ¡Apúntante ya! en http://fifaworldcup.yahoo.com/fc/es/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: classpath
I thought tomcat did not use classpath, instead you should use ant to add and modify your contest. Rob -Original Message- From: Lindomar [mailto:[EMAIL PROTECTED]] Sent: Monday, September 23, 2002 8:56 AM To: Tomcat Users List Subject: classpath Hi everybody! I have a problem with Tomcat4.1's classpath. I have a jar file, and i placed in common/lib, but tomcat doesn't find my classes! I put jar file in classpath on NT and run a test from dos prompt and it's ok. Anybody has any idea where i put my jar file? regards, Lindomar. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: classpath
Thanks Patricio and Turner, it´s ok now. I placed my jar file in /WEB-INF/lib. - Original Message - From: Patricio Vera S. [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, September 23, 2002 11:54 AM Subject: Re: classpath For my jsp project I put my jar file on [TOMCAT_HOME]\webapps\project\WEB-INF\lib, it's work. Saludos, Patricio Vera S. - Original Message - From: Lindomar [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, September 23, 2002 10:55 AM Subject: classpath Hi everybody! I have a problem with Tomcat4.1's classpath. I have a jar file, and i placed in common/lib, but tomcat doesn't find my classes! I put jar file in classpath on NT and run a test from dos prompt and it's ok. Anybody has any idea where i put my jar file? regards, Lindomar. ___ Copa del Mundo de la FIFA 2002 El único lugar de Internet con vídeos de los 64 partidos. ¡Apúntante ya! en http://fifaworldcup.yahoo.com/fc/es/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath Woes...
Hi, Another great example of why I strongly advocate *against* the use if ide's!! Mike -Original Message- From: Ben Boule [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 5:06 PM To: '[EMAIL PROTECTED]' Subject: Classpath Woes... Hi, I was wondering if anyone could help me out with a problem with Tomcat 3.3.x. We've developed our application under the Tomcat 3.2.x implementation that is integrated into JBuilder 6. We use Struts for our framework. The application works fine in that environment. I am now trying to set up the deployment, and we wanted to use either Tomcat 3.3.x or Tomcat 4.0.x.Tomcat 4 seems to have issues with our ORB implementation (Borland) so for now I am working with 3.3.x. The problem is that when the application goes to compile a .jsp file for the first time, it encounters a ClassNotFoundException trying to find a Jasper class, JspServlet. e.x. (from the std output) 2002-07-30 17:58:30 - Ctx(/app name) : Class not found: org.apache.jasper.servlet.JspServlet If I copy the jasper.jar file from $TOMCAT_HOME/lib/container into app name/WEB-INF/lib, then the Jasper classes are not found. However, this results in another class not found exception, this time it can't find the classes for the javac compiler! (sun.tools.something) If I then copy the tools.jar file from the JDK 1.3 distribution into the WEB-INF/lib directory, everything works. This would obviously seem to be an unacceptable solution however. I can't figure out why this is happening. It doesn't happen with the example applications under the exact same environment. (JAVA_HOME is set to point to JDK 1.3.1, TOMCAT_HOME is set to the right directory as well.) I have read the classloader-howto several times but I can't figure out what's wrong. Thanks, Ben Boule -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath Woes...
Tomcat 3.3.1, downloaded as a binary, installed in a new directory on Solaris 8. No changes were made to the Tomcat configuration, other than things like turning on debug flags in server.xml, etc... Ben -Original Message- From: Larry Isaacs [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 6:56 PM To: Tomcat Users List Subject: RE: Classpath Woes... Which Tomcat 3.3.x, and was it installed in a new directory (which is recommended)? Any changes to the default configuration? The default configuration of Tomcat 3.3.x doesn't use the JspServlet. Cheers, Larry -Original Message- From: Ben Boule [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 6:06 PM To: '[EMAIL PROTECTED]' Subject: Classpath Woes... Hi, I was wondering if anyone could help me out with a problem with Tomcat 3.3.x. We've developed our application under the Tomcat 3.2.x implementation that is integrated into JBuilder 6. We use Struts for our framework. The application works fine in that environment. I am now trying to set up the deployment, and we wanted to use either Tomcat 3.3.x or Tomcat 4.0.x.Tomcat 4 seems to have issues with our ORB implementation (Borland) so for now I am working with 3.3.x. The problem is that when the application goes to compile a .jsp file for the first time, it encounters a ClassNotFoundException trying to find a Jasper class, JspServlet. e.x. (from the std output) 2002-07-30 17:58:30 - Ctx(/app name) : Class not found: org.apache.jasper.servlet.JspServlet If I copy the jasper.jar file from $TOMCAT_HOME/lib/container into app name/WEB-INF/lib, then the Jasper classes are not found. However, this results in another class not found exception, this time it can't find the classes for the javac compiler! (sun.tools.something) If I then copy the tools.jar file from the JDK 1.3 distribution into the WEB-INF/lib directory, everything works. This would obviously seem to be an unacceptable solution however. I can't figure out why this is happening. It doesn't happen with the example applications under the exact same environment. (JAVA_HOME is set to point to JDK 1.3.1, TOMCAT_HOME is set to the right directory as well.) I have read the classloader-howto several times but I can't figure out what's wrong. Thanks, Ben Boule -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath Woes...
Ben, Does the /examples webapp works fine and only your webapp is exibiting this behavior? If so, does your web.xml re-map *.jsp to the JspServlet? Cheers, Larry -Original Message- From: Ben Boule [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 9:11 AM To: 'Tomcat Users List' Subject: RE: Classpath Woes... Tomcat 3.3.1, downloaded as a binary, installed in a new directory on Solaris 8. No changes were made to the Tomcat configuration, other than things like turning on debug flags in server.xml, etc... Ben -Original Message- From: Larry Isaacs [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 6:56 PM To: Tomcat Users List Subject: RE: Classpath Woes... Which Tomcat 3.3.x, and was it installed in a new directory (which is recommended)? Any changes to the default configuration? The default configuration of Tomcat 3.3.x doesn't use the JspServlet. Cheers, Larry -Original Message- From: Ben Boule [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 6:06 PM To: '[EMAIL PROTECTED]' Subject: Classpath Woes... Hi, I was wondering if anyone could help me out with a problem with Tomcat 3.3.x. We've developed our application under the Tomcat 3.2.x implementation that is integrated into JBuilder 6. We use Struts for our framework. The application works fine in that environment. I am now trying to set up the deployment, and we wanted to use either Tomcat 3.3.x or Tomcat 4.0.x.Tomcat 4 seems to have issues with our ORB implementation (Borland) so for now I am working with 3.3.x. The problem is that when the application goes to compile a .jsp file for the first time, it encounters a ClassNotFoundException trying to find a Jasper class, JspServlet. e.x. (from the std output) 2002-07-30 17:58:30 - Ctx(/app name) : Class not found: org.apache.jasper.servlet.JspServlet If I copy the jasper.jar file from $TOMCAT_HOME/lib/container into app name/WEB-INF/lib, then the Jasper classes are not found. However, this results in another class not found exception, this time it can't find the classes for the javac compiler! (sun.tools.something) If I then copy the tools.jar file from the JDK 1.3 distribution into the WEB-INF/lib directory, everything works. This would obviously seem to be an unacceptable solution however. I can't figure out why this is happening. It doesn't happen with the example applications under the exact same environment. (JAVA_HOME is set to point to JDK 1.3.1, TOMCAT_HOME is set to the right directory as well.) I have read the classloader-howto several times but I can't figure out what's wrong. Thanks, Ben Boule -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath Woes...
Thanks Larry! Yes, *.jsp was mapped to JspServlet in the web.xml file. I believe this was copied out of some Struts boilerplate or something. Removing these mappings fixed the problem. Thanks again, Ben Boule -Original Message- From: Larry Isaacs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 9:35 AM To: Tomcat Users List Subject: RE: Classpath Woes... Ben, Does the /examples webapp works fine and only your webapp is exibiting this behavior? If so, does your web.xml re-map *.jsp to the JspServlet? Cheers, Larry -Original Message- From: Ben Boule [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 9:11 AM To: 'Tomcat Users List' Subject: RE: Classpath Woes... Tomcat 3.3.1, downloaded as a binary, installed in a new directory on Solaris 8. No changes were made to the Tomcat configuration, other than things like turning on debug flags in server.xml, etc... Ben -Original Message- From: Larry Isaacs [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 6:56 PM To: Tomcat Users List Subject: RE: Classpath Woes... Which Tomcat 3.3.x, and was it installed in a new directory (which is recommended)? Any changes to the default configuration? The default configuration of Tomcat 3.3.x doesn't use the JspServlet. Cheers, Larry -Original Message- From: Ben Boule [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 6:06 PM To: '[EMAIL PROTECTED]' Subject: Classpath Woes... Hi, I was wondering if anyone could help me out with a problem with Tomcat 3.3.x. We've developed our application under the Tomcat 3.2.x implementation that is integrated into JBuilder 6. We use Struts for our framework. The application works fine in that environment. I am now trying to set up the deployment, and we wanted to use either Tomcat 3.3.x or Tomcat 4.0.x.Tomcat 4 seems to have issues with our ORB implementation (Borland) so for now I am working with 3.3.x. The problem is that when the application goes to compile a .jsp file for the first time, it encounters a ClassNotFoundException trying to find a Jasper class, JspServlet. e.x. (from the std output) 2002-07-30 17:58:30 - Ctx(/app name) : Class not found: org.apache.jasper.servlet.JspServlet If I copy the jasper.jar file from $TOMCAT_HOME/lib/container into app name/WEB-INF/lib, then the Jasper classes are not found. However, this results in another class not found exception, this time it can't find the classes for the javac compiler! (sun.tools.something) If I then copy the tools.jar file from the JDK 1.3 distribution into the WEB-INF/lib directory, everything works. This would obviously seem to be an unacceptable solution however. I can't figure out why this is happening. It doesn't happen with the example applications under the exact same environment. (JAVA_HOME is set to point to JDK 1.3.1, TOMCAT_HOME is set to the right directory as well.) I have read the classloader-howto several times but I can't figure out what's wrong. Thanks, Ben Boule -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath Woes...
I am sorry, in my previous email I meant to say that when I copy jasper.jar into WEB-INF/lib, the jasper classes ARE found. Ben Boule -Original Message- From: Ben Boule [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 6:06 PM To: '[EMAIL PROTECTED]' Subject: Classpath Woes... [snip] 2002-07-30 17:58:30 - Ctx(/app name) : Class not found: org.apache.jasper.servlet.JspServlet If I copy the jasper.jar file from $TOMCAT_HOME/lib/container into app name/WEB-INF/lib, then the Jasper classes are not found. [snip] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath Woes...
Which Tomcat 3.3.x, and was it installed in a new directory (which is recommended)? Any changes to the default configuration? The default configuration of Tomcat 3.3.x doesn't use the JspServlet. Cheers, Larry -Original Message- From: Ben Boule [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 6:06 PM To: '[EMAIL PROTECTED]' Subject: Classpath Woes... Hi, I was wondering if anyone could help me out with a problem with Tomcat 3.3.x. We've developed our application under the Tomcat 3.2.x implementation that is integrated into JBuilder 6. We use Struts for our framework. The application works fine in that environment. I am now trying to set up the deployment, and we wanted to use either Tomcat 3.3.x or Tomcat 4.0.x.Tomcat 4 seems to have issues with our ORB implementation (Borland) so for now I am working with 3.3.x. The problem is that when the application goes to compile a .jsp file for the first time, it encounters a ClassNotFoundException trying to find a Jasper class, JspServlet. e.x. (from the std output) 2002-07-30 17:58:30 - Ctx(/app name) : Class not found: org.apache.jasper.servlet.JspServlet If I copy the jasper.jar file from $TOMCAT_HOME/lib/container into app name/WEB-INF/lib, then the Jasper classes are not found. However, this results in another class not found exception, this time it can't find the classes for the javac compiler! (sun.tools.something) If I then copy the tools.jar file from the JDK 1.3 distribution into the WEB-INF/lib directory, everything works. This would obviously seem to be an unacceptable solution however. I can't figure out why this is happening. It doesn't happen with the example applications under the exact same environment. (JAVA_HOME is set to point to JDK 1.3.1, TOMCAT_HOME is set to the right directory as well.) I have read the classloader-howto several times but I can't figure out what's wrong. Thanks, Ben Boule -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: classpath question
Hi, You should not have the webapps directory on your classpath. That is the structure you deploy into. You should have a src tree somewhere else that's in your classpath for compilation. Please refer to http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/index.html (specifically, the Deployment Organization and Source Organization sections) for complete details. Yoav Shapira Millennium ChemInformatics -Original Message- From: Billy V. Kantartzis [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 25, 2002 8:14 AM To: [EMAIL PROTECTED] Subject: classpath question shoud i add the web app directory in my classpath ? i have a application deployed as follows webapps | |dms | | | |- jsp |-classes |dms | | | -beans |-servlets |- |- inorder to access files in the classes dms.* pakage do i have to declare it in the class path ? thanks in advanced Billy V. Kantartzis (Msc Ect), University Of Essex, wivenhoe park , co4 3sq Clochester, Essex,Uk mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: classpath question
that is what ithought too. Thanks for your quick reply all of you best Billy ---Original Message--- From: Tomcat Users List Date: ÐÝìðôç, 25 Éïýëéïò 2002 02:24:44 ìì To: Tomcat Users List Subject: RE: classpath question Hi, You should not have the webapps directory on your classpath. That is the structure you deploy into. You should have a src tree somewhere else that's in your classpath for compilation. Please refer to http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/index.html (specifically, the Deployment Organization and Source Organization sections) for complete details. Yoav Shapira Millennium ChemInformatics -Original Message- From: Billy V. Kantartzis [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 25, 2002 8:14 AM To: [EMAIL PROTECTED] Subject: classpath question shoud i add the web app directory in my classpath ? i have a application deployed as follows webapps | |dms | | | |- jsp |-classes |dms | | | -beans |-servlets |- |- inorder to access files in the classes dms.* pakage do i have to declare it in the class path ? thanks in advanced Billy V. Kantartzis (Msc Ect), University Of Essex, wivenhoe park , co4 3sq Clochester, Essex,Uk mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: classpath question
that is what ithought too. Thanks for your quick reply all of you best Billy ---Original Message--- From: Tomcat Users List Date: P]lptg, 25 Io}kior 2002 02:24:44 ll To: Tomcat Users List Subject: RE: classpath question Hi, You should not have the webapps directory on your classpath. That is the structure you deploy into. You should have a src tree somewhere else that's in your classpath for compilation. Please refer to http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/index.html (specifically, the Deployment Organization and Source Organization sections) for complete details. Yoav Shapira Millennium ChemInformatics -Original Message- From: Billy V. Kantartzis [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 25, 2002 8:14 AM To: [EMAIL PROTECTED] Subject: classpath question shoud i add the web app directory in my classpath ? i have a application deployed as follows webapps | |dms | | | |- jsp |-classes |dms | | | -beans |-servlets |- |- inorder to access files in the classes dms.* pakage do i have to declare it in the class path ? thanks in advanced Billy V. Kantartzis (Msc Ect), University Of Essex, wivenhoe park , co4 3sq Clochester, Essex,Uk mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: classpath question
that is what ithought too. Thanks for your quick reply all of you best Billy ---Original Message--- From: Tomcat Users List Date: P]lptg, 25 Io}kior 2002 02:24:44 ll To: Tomcat Users List Subject: RE: classpath question Hi, You should not have the webapps directory on your classpath. That is the structure you deploy into. You should have a src tree somewhere else that's in your classpath for compilation. Please refer to http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/index.html (specifically, the Deployment Organization and Source Organization sections) for complete details. Yoav Shapira Millennium ChemInformatics -Original Message- From: Billy V. Kantartzis [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 25, 2002 8:14 AM To: [EMAIL PROTECTED] Subject: classpath question shoud i add the web app directory in my classpath ? i have a application deployed as follows webapps | |dms | | | |- jsp |-classes |dms | | | -beans |-servlets |- |- inorder to access files in the classes dms.* pakage do i have to declare it in the class path ? thanks in advanced Billy V. Kantartzis (Msc Ect), University Of Essex, wivenhoe park , co4 3sq Clochester, Essex,Uk mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: classpath question
that is what ithought too. Thanks for your quick reply all of you best Billy ---Original Message--- From: Tomcat Users List Date: P]lptg, 25 Io}kior 2002 02:24:44 ll To: Tomcat Users List Subject: RE: classpath question Hi, You should not have the webapps directory on your classpath. That is the structure you deploy into. You should have a src tree somewhere else that's in your classpath for compilation. Please refer to http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/index.html (specifically, the Deployment Organization and Source Organization sections) for complete details. Yoav Shapira Millennium ChemInformatics -Original Message- From: Billy V. Kantartzis [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 25, 2002 8:14 AM To: [EMAIL PROTECTED] Subject: classpath question shoud i add the web app directory in my classpath ? i have a application deployed as follows webapps | |dms | | | |- jsp |-classes |dms | | | -beans |-servlets |- |- inorder to access files in the classes dms.* pakage do i have to declare it in the class path ? thanks in advanced Billy V. Kantartzis (Msc Ect), University Of Essex, wivenhoe park , co4 3sq Clochester, Essex,Uk mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: classpath problem
Andrew, Yes theses are parts of a package. They are just common classes that I wish to use across multiple apps. Im not sure what you mean by Did you build the package directory structure to match in the %CATALINA$\common\classes? I did not change the packages at all, I copied them directly from my system classpath (where they were being picked up by a previous Tomcat install) *directly* into the $CATALINA_HOME/common/classes folder. ie : %CATALINA$\common\classes contains first level folders such as com, org, javax etc. My install did not even have a $CATALINA$\shared\classes folder.. however as you suggested i created one, re-started and again it did not work. I have tried puttintg the reported missing class in my apps /WEB-INF/classes folder already, this is not where my problem is, i need the common classes to be picked up from one place as i dont want to compromise and copy these common classes into several apps /WEB-INF/classes directory. Thanks :) Mehdi Andrew Conrad [EMAIL PROTECTED] 12/07/2002 18:34 Please respond to Tomcat Users List To: 'Tomcat Users List' [EMAIL PROTECTED] cc: Subject:RE: classpath problem Are these classes apart of a package? Did you build the package directory structure to match in the %CATALINA$\common\classes? Have you tried the $CATALINA$\shared\classes folder? How about a webapp's WEB-INF\classes folder? Testing these to see if you can get any of them to work might help you solve your problem. - Andrew -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 12, 2002 12:36 PM To: [EMAIL PROTECTED] Subject: classpath problem All, I have installed Tomcat 4.0.2. All examples work fine, jsp's and servlets. when i removed my old version of Tomcat / apache, i obviously saved all of my existing apps. I have now pointed Tomcat to these by specifying new Contexts in my server.xml. All is fine... nearly. My problem is that my classpath is not being picked up. Reading the docs, i found that $CATALINA_HOME/common/classes is where i should put my non application specific, common classes. I have done this but to no avail, these classes which should be visible to my apps according to the documentation are not found and a NoClassDefFound error results. I have tried putting my common classes in the following directories : $CATALINA_HOME/common/classes $CATALINA_HOME/classes They are not picked up. Needless to say i have restarted the service, rebooted and hit my computer many times. Any help would be appreciated Thanks Mehdi -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: classpath problem
Andrew, Thanks, it seems to have resolved itself. Not sure how, but I have noticed a problem with conflicting jar files, ie in this case one was distributed for JDK1.4 and another for JDK1.2 Brian - Original Message - From: Andrew Conrad [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, July 12, 2002 1:34 PM Subject: RE: classpath problem Are these classes apart of a package? Did you build the package directory structure to match in the %CATALINA$\common\classes? Have you tried the $CATALINA$\shared\classes folder? How about a webapp's WEB-INF\classes folder? Testing these to see if you can get any of them to work might help you solve your problem. - Andrew -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 12, 2002 12:36 PM To: [EMAIL PROTECTED] Subject: classpath problem All, I have installed Tomcat 4.0.2. All examples work fine, jsp's and servlets. when i removed my old version of Tomcat / apache, i obviously saved all of my existing apps. I have now pointed Tomcat to these by specifying new Contexts in my server.xml. All is fine... nearly. My problem is that my classpath is not being picked up. Reading the docs, i found that $CATALINA_HOME/common/classes is where i should put my non application specific, common classes. I have done this but to no avail, these classes which should be visible to my apps according to the documentation are not found and a NoClassDefFound error results. I have tried putting my common classes in the following directories : $CATALINA_HOME/common/classes $CATALINA_HOME/classes They are not picked up. Needless to say i have restarted the service, rebooted and hit my computer many times. Any help would be appreciated Thanks Mehdi -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: classpath problem
Are these classes apart of a package? Did you build the package directory structure to match in the %CATALINA$\common\classes? Have you tried the $CATALINA$\shared\classes folder? How about a webapp's WEB-INF\classes folder? Testing these to see if you can get any of them to work might help you solve your problem. - Andrew -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 12, 2002 12:36 PM To: [EMAIL PROTECTED] Subject: classpath problem All, I have installed Tomcat 4.0.2. All examples work fine, jsp's and servlets. when i removed my old version of Tomcat / apache, i obviously saved all of my existing apps. I have now pointed Tomcat to these by specifying new Contexts in my server.xml. All is fine... nearly. My problem is that my classpath is not being picked up. Reading the docs, i found that $CATALINA_HOME/common/classes is where i should put my non application specific, common classes. I have done this but to no avail, these classes which should be visible to my apps according to the documentation are not found and a NoClassDefFound error results. I have tried putting my common classes in the following directories : $CATALINA_HOME/common/classes $CATALINA_HOME/classes They are not picked up. Needless to say i have restarted the service, rebooted and hit my computer many times. Any help would be appreciated Thanks Mehdi -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath problems
Howdy, The simplest way: look into server.xml, change all debug=0 to debug=99. This will get more info than you probably want, but that's (usually) a good thing when debugging ;) As an aside: classpath problems typically don't require that much debugging information. If you get a class not found type of error, make sure the class or a jar containing it is visible to your web application. See the tomcat 4.x classloader documentation at: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html I hope this helps, Yoav Shapira Millennium ChemInformatics -Original Message- From: David Goodenough [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 09, 2002 6:37 AM To: [EMAIL PROTECTED] Subject: Classpath problems I am having the inevitable initial classpath problems setting up my first servlet under Tomcat 4.0.3 (the one shipped with Sun JWSDP). In the source code I see there are debug levels and some increased debug levels, but I am unsure about how I am supposed to enable them. I tried setting an init-param of debug to 9 in my web.xml, but no luck. Thanks in advance David -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Classpath problems
On Tue, 9 Jul 2002, David Goodenough wrote: Date: Tue, 9 Jul 2002 11:36:46 +0100 From: David Goodenough [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Classpath problems I am having the inevitable initial classpath problems setting up my first servlet under Tomcat 4.0.3 (the one shipped with Sun JWSDP). FYI, the Tomcat code in JWSDP is approximately the same as what Tomcat 4.1.2 contained, not 4.0.x. In the source code I see there are debug levels and some increased debug levels, but I am unsure about how I am supposed to enable them. I tried setting an init-param of debug to 9 in my web.xml, but no luck. Doing this will only matter for the particular servlet that you are setting this parameter for, not for your own servlet. Have you gone through the web application chapters of the tutorial that is also available with JWSDP? They will give you a good introduction to the basic concepts of how web applications are put together, and where to put your servlet classes and so on. Thanks in advance David Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: classpath problem
WEB-INF is case sensitive. can't be Web-inf does this make a difference? fillup On 6/3/02 1:16 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hello, Tomcat 4.0 can't find my classes and my associated resources that are in the Web-inf/lib directory of my Web application. When i set the classpath dynnamically in the catalina.bat for example, Tomcat can'find the HttpServlet.class I can't understand why i have this kind of problem because i believed that Tomcat load automatically the jar file that is put in the Web-inf directory of a web application !!! Patrick PIERRA Linedata Services Luxembourg 00 352 29 56 65 282 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: classpath problem
When i put WEB-INF instead Web-inf windows reformat the name into Web-inf. Please note that the name Web-inf was created by Tomcat when i deploy the WAR. Patrick PIERRA Linedata Services Luxembourg 00 352 29 56 65 282 [EMAIL PROTECTED] Phillip Morelock subscriptions@phillipmorTo: Tomcat Users List [EMAIL PROTECTED] elock.com cc: Subject: Re: classpath problem 06/03/02 10:23 AM Please respond to Tomcat Users List WEB-INF is case sensitive. can't be Web-inf does this make a difference? fillup On 6/3/02 1:16 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hello, Tomcat 4.0 can't find my classes and my associated resources that are in the Web-inf/lib directory of my Web application. When i set the classpath dynnamically in the catalina.bat for example, Tomcat can'find the HttpServlet.class I can't understand why i have this kind of problem because i believed that Tomcat load automatically the jar file that is put in the Web-inf directory of a web application !!! Patrick PIERRA Linedata Services Luxembourg 00 352 29 56 65 282 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: classpath problem
well that is what's wrong you need to go to the dos prompt and rename it to something else, then rename it WEB-INF with that case. f On 6/3/02 2:06 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: When i put WEB-INF instead Web-inf windows reformat the name into Web-inf. Please note that the name Web-inf was created by Tomcat when i deploy the WAR. Patrick PIERRA Linedata Services Luxembourg 00 352 29 56 65 282 [EMAIL PROTECTED] Phillip Morelock subscriptions@phillipmorTo: Tomcat Users List [EMAIL PROTECTED] elock.com cc: Subject: Re: classpath problem 06/03/02 10:23 AM Please respond to Tomcat Users List WEB-INF is case sensitive. can't be Web-inf does this make a difference? fillup On 6/3/02 1:16 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hello, Tomcat 4.0 can't find my classes and my associated resources that are in the Web-inf/lib directory of my Web application. When i set the classpath dynnamically in the catalina.bat for example, Tomcat can'find the HttpServlet.class I can't understand why i have this kind of problem because i believed that Tomcat load automatically the jar file that is put in the Web-inf directory of a web application !!! Patrick PIERRA Linedata Services Luxembourg 00 352 29 56 65 282 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: classpath problem
All Tomcat is doing is expanding the directory. If it was Web-inf there, then that is what it will be expanded as. One thing to do is to make sure that Windows explorer isn't just displaying it that way even though it is properly upper-cased. You might want to look at it though the command line and see if the case is still Web-inf. If you configure Explorer to show classic folders, you will be less likely to run into this problem.. Jake At 02:14 AM 6/3/2002 -0700, you wrote: well that is what's wrong you need to go to the dos prompt and rename it to something else, then rename it WEB-INF with that case. f On 6/3/02 2:06 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: When i put WEB-INF instead Web-inf windows reformat the name into Web-inf. Please note that the name Web-inf was created by Tomcat when i deploy the WAR. Patrick PIERRA Linedata Services Luxembourg 00 352 29 56 65 282 [EMAIL PROTECTED] Phillip Morelock subscriptions@phillipmorTo: Tomcat Users List [EMAIL PROTECTED] elock.com cc: Subject: Re: classpath problem 06/03/02 10:23 AM Please respond to Tomcat Users List WEB-INF is case sensitive. can't be Web-inf does this make a difference? fillup On 6/3/02 1:16 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hello, Tomcat 4.0 can't find my classes and my associated resources that are in the Web-inf/lib directory of my Web application. When i set the classpath dynnamically in the catalina.bat for example, Tomcat can'find the HttpServlet.class I can't understand why i have this kind of problem because i believed that Tomcat load automatically the jar file that is put in the Web-inf directory of a web application !!! Patrick PIERRA Linedata Services Luxembourg 00 352 29 56 65 282 [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Classpath problems with Tomcat4 and RedHat 7.2
Do you have a CATALINA_HOME environment variable set? That might cause this... [EMAIL PROTECTED] 05/07/02 09:21AM I am having problems reading a resource file I placed in /var/tomcat4/common/lib. I also tried placing it in /var/tomcat4/common/classes. I wrote a small JSP which lists the classpath and I notice it prints out as /var/tomcat/common/lib (missing the 4). Does anyone know where this is set?
RE: Classpath problems with Tomcat4 and RedHat 7.2
Yes, CATALINA_HOME is set to /var/tomcat4 Here is my simple jsp %@ page language=java % %@ page import = java.util.* % %@ page import = java.io.* % % Properties prop = System.getProperties(); % Java class path: %=prop.getProperty(java.class.path)% % Properties props = new Properties(); FileInputStream fin = new FileInputStream(DBConnMgr.properties); props.load(fin); % P %=props.getProperty(admin.log)% The java.class.path returned is Java class path: /usr/java/j2sdk1.4.0/lib/tools.jar:/var/tomcat/common/lib/:/var/tomcat4/ bin/bootstrap.jar Notice the missing 4 in the common/lib classpath. It is interesting that the bootstrap.jar is listed as being in /var/tomcat4 but common/lib is listed as being in /var/tomcat. I'm still trying to figure out where the classpath is set. I know how to do this when tomcat is started from a shell but not as a daemon. If I place the DBConnMgr.properties file in my root directory it works. When I place it in /var/tomcat4/common/lib (or any other supposedly valid classpath) it does not. Jose Ferrer On Tuesday, May 07, 2002 12:10 PM, Larry Meadors [SMTP:[EMAIL PROTECTED]] wrote: Do you have a CATALINA_HOME environment variable set? That might cause this... [EMAIL PROTECTED] 05/07/02 09:21AM I am having problems reading a resource file I placed in /var/tomcat4/common/lib. I also tried placing it in /var/tomcat4/common/classes. I wrote a small JSP which lists the classpath and I notice it prints out as /var/tomcat/common/lib (missing the 4). Does anyone know where this is set? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]