SPAMMER - Fw: CV{JAVA}
Can something be done about this kind of behavior... - Original Message - From: Vikram Mishra To: [EMAIL PROTECTED] Sent: Saturday, June 16, 2001 12:41 AM Subject: Re: CV{JAVA} Dear friends, I know u may not be co. or consultants but I very well knows that u r java profissional. I got ur id from of tomcat disscuss list. Now I am telling u about me. I am java profisional and want to became career in java and related fields.Friends I have 25 months of java and vb experience, if u have or see any requrement related with java programming or testing pls send my resume to them I can do job anywhere . Pls. I need job very urgently otherwise I have to open a general store and then my whole life will be spoil Now i am going to delhi to searching job so that u can contact with me by this email only i dont have any phone no from now. I am sending my application with down porsion of this mail and cv with att this mail Thanks. IfI got job from of ur help I will be greatful to u. Pls help me... With worm regards. Unlucky Vikram Mishra.. Hello Sir/Mdm, I would like to became a part of your esteemed organization, here is attached a copy of my resume,Awaiting for positive response .With Regards .Vikram Mishra. Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.comBuy Music, Video, CD-ROM and Audio-Books from http://www.planetmonline.com
Re: Tomcat hangs if I refer to a context that doesn't exist
Actually, no - otherwise, I wouldn't have asked. I did, however, find my answer in the bugzilla database. For those of you who are wondering, this problem occurs under 3.2.1 if you remove the ROOT context / webapp. -jeff - Original Message - From: Thomas Bezdicek To: [EMAIL PROTECTED] Sent: Wednesday, June 13, 2001 4:03 AM Subject: AW: Tomcat hangs if I refer to a context that doesn't exist Hi, you find it in the tomcat-documentation very easy. regards, tom -Ursprüngliche Nachricht-Von: Jeff Trent [mailto:[EMAIL PROTECTED]]Gesendet: Mittwoch, 13. Juni 2001 06:40An: [EMAIL PROTECTED]Betreff: Tomcat hangs if I refer to a context that doesn't exist If I refer to a nonexistant webapp, I find that Tomcat pins my CPU (doesn't really hang). I need to stop tomcat and restart for the CPU to return to normal. I couldn't find any information on this problem in the archives. Anybody else see this or know what the problem might be? I'm using 3.2.1 on NT2000. thanks, jeff
Re: static,synchronized and classloaders
Title: RE: static,synchronized and classloaders Are you saying that I don't need different JVMs to handle each of my webapps if I move the JAR files that I have in my classpath down into the lib directory of the webapp? I have a problem in that this JAR I'm using in several of my webapp contexts uses static class members to carry configuration information that gets corrupted by the very next webapp that initializes the same shared library with different configuration information. thanks, jeff - Original Message - From: Cox, Charlie To: '[EMAIL PROTECTED]' Sent: Wednesday, June 13, 2001 8:40 AM Subject: RE: static,synchronized and classloaders I'm not sure what you mean by abc.MyClass and xyz.MyClass as the class in question is in the same package in both contexts. This archive link from Craig McClanahan(thank you Craig) gives a good explaination of classloaders: http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg13260.html Based upon this, the individual web app classloader does not know about the other webapp classloaders or the classes that they have loaded. That's why I think MyObject is treated as two classes since it is loaded by two different loaders at the same level in the class-loader heirarchy. I am currently using the same servlet class under two class loaders. It is not throwing any errors. The difference in my contexts is in my properties file that is context-specific and loaded by the servlet. Actually now that I think about it, I do have a static field that is remaining context-specific in my servlet, therefore it must be two different Class objects representing my class; therefore two different instances of my static members(confusing isn't it?). I guess I answered my own question. ;) And since I already typed this email, I'll send it anyway and hopefully someone else will find it useful. you can synchonize on the class by using the 'this' object(I am doing it). I'm just not sure if 'this' is available for static classes.I would think that it is. Charlie -Original Message- From: Luba Powell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 12, 2001 3:50 PM To: [EMAIL PROTECTED] Subject: Re: static,synchronized and classloaders(was:Java Question) Also, look if identical files are generated based on 2 different context: abc.MyClass is not the same as xyx.MyClass. If 2 class loaders load from identical class files - JVM verifier should throw the exception before a second object is created. If this doesn't happen - this is a serious bug. Also it is not possible to synchronize on the class - only on the method and a variable that is an object - Original Message - From: Cox, Charlie To: '[EMAIL PROTECTED]' Sent: Tuesday, June 12, 2001 3:35 PM Subject: RE: static,synchronized and classloaders(was:Java Question) Now is this true for when I have multiple contexts mapped to the same docbase? I have seen on this list that Tomcat loads the classes(in web-inf/classes) independently for each context and passing MyObject class instance between contexts is not the same 'MyObject' class in the second context even though it is the same code. Since it is not the same class I would assume that I would have two instances of a static method/field. And if it is synchronized on a static member(or the class itself) it would only be synchonized for this context. I'm really not sure what I would have if the class is static. Thoughts? Charlie -Original Message- From: Pae Choi [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 12, 2001 2:42 PM To: [EMAIL PROTECTED] Subject: Re: Java Question When you access the 'synchronized' static method, it locks its class. so this will ensure the thread-safe access. Otherwise, the result is unknown. Pae I have looked all over and can't find the answer to this simple question. If you use a static method, do you have to synchronize it in case other people may access it at the same time. For example, I have a static Utility class to do date calculations. The method Utility.getMonth(String date) takes in a full date string, parses it, and returns just the month value. If 5 different people all using the website attempt to use Utility.getMonth(String date) at the same time for different dates, will it return the right results? If not, do I have to synchronize it or something in case multiple users attempt to access it? I know this is not really related to tomcat, but since I am using tomcat, and everyone else using tomcat is also a java developer, I figured this is the best place I can ask. Thanks for any help!!! Brandon
Re: static,synchronized and classloaders
Title: RE: static,synchronized and classloaders This is a great lead. I was cursing Tomcat since I thought I was forced to create different JVM configurations for each of my webapps. I'll give it a try and let you know what I find later on today. - jeff - Original Message - From: Cox, Charlie To: '[EMAIL PROTECTED]' Sent: Wednesday, June 13, 2001 10:06 AM Subject: RE: static,synchronized and classloaders That is what I am seeing with my servlets. I have the same class file in each context's web-inf/classes directory and it is keeping the static members independent from the other context. I have a static instance of a helper class in my servlet that wraps a properties file. I wanted to make the helper class's members static so I could share them between servlets when I thought of this possible issue - but I didn't realize that by making a static variable in my servlet was testing the same issue in a different way, hence the lightbulb as I was typing my reply. So I would assume that the web-inf/lib classes would work the same way, since they are loaded by the webapp's classloader. Charlie -Original Message- From: Jeff Trent [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 13, 2001 9:41 AM To: [EMAIL PROTECTED] Subject: Re: static,synchronized and classloaders Are you saying that I don't need different JVMs to handle each of my webapps if I move the JAR files that I have in my classpath down into the lib directory of the webapp? I have a problem in that this JAR I'm using in several of my webapp contexts uses static class members to carry configuration information that gets corrupted by the very next webapp that initializes the same shared library with different configuration information. thanks, jeff - Original Message - From: Cox, Charlie To: '[EMAIL PROTECTED]' Sent: Wednesday, June 13, 2001 8:40 AM Subject: RE: static,synchronized and classloaders I'm not sure what you mean by abc.MyClass and xyz.MyClass as the class in question is in the same package in both contexts. This archive link from Craig McClanahan(thank you Craig) gives a good explaination of classloaders: http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg13260.html Based upon this, the individual web app classloader does not know about the other webapp classloaders or the classes that they have loaded. That's why I think MyObject is treated as two classes since it is loaded by two different loaders at the same level in the class-loader heirarchy. I am currently using the same servlet class under two class loaders. It is not throwing any errors. The difference in my contexts is in my properties file that is context-specific and loaded by the servlet. Actually now that I think about it, I do have a static field that is remaining context-specific in my servlet, therefore it must be two different Class objects representing my class; therefore two different instances of my static members(confusing isn't it?). I guess I answered my own question. ;) And since I already typed this email, I'll send it anyway and hopefully someone else will find it useful. you can synchonize on the class by using the 'this' object(I am doing it). I'm just not sure if 'this' is available for static classes.I would think that it is. Charlie -Original Message- From: Luba Powell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 12, 2001 3:50 PM To: [EMAIL PROTECTED] Subject: Re: static,synchronized and classloaders(was:Java Question) Also, look if identical files are generated based on 2 different context: abc.MyClass is not the same as xyx.MyClass. If 2 class loaders load from identical class files - JVM verifier should throw the exception before a second object is created. If this doesn't happen - this is a serious bug. Also it is not possible to synchronize on the class - only on the method and a variable that is an object - Original Message - From: Cox, Charlie To: '[EMAIL PROTECTED]' Sent: Tuesday, June 12, 2001 3:35 PM Subject: RE: static,synchronized and classloaders(was:Java Question) Now is this true for when I have multiple contexts mapped to the same docbase? I have seen on this list that Tomcat loads the classes(in web-inf/classes) independently for each context and passing MyObject class instance between contexts is not the same 'MyObject' class in the second context even though it is the same code. Since it is not the same class I would assume that I would have two instances of a static method/field. And if it is synchronized on a static member(or the class itself) it would only be synchonized for this context. I'm really not sure what I would have if the class is static. Thoughts? Charlie -Original Message- From: Pae Choi [mailto:[EMAIL PROTECTED
Re: static,synchronized and classloaders
Title: RE: static,synchronized and classloaders Well, Charlie, I take that last statement back. I have common.jar in both of my webapps/lib directory, and I'm still seeing the corruption I talked about. I'm not sure if its worth my effort to expand the JAR into the classes directory to see if that fixes it. If it works, I still don't like that solution - it would simply be informational. - jeff - Original Message - From: Cox, Charlie To: '[EMAIL PROTECTED]' Sent: Wednesday, June 13, 2001 10:06 AM Subject: RE: static,synchronized and classloaders That is what I am seeing with my servlets. I have the same class file in each context's web-inf/classes directory and it is keeping the static members independent from the other context. I have a static instance of a helper class in my servlet that wraps a properties file. I wanted to make the helper class's members static so I could share them between servlets when I thought of this possible issue - but I didn't realize that by making a static variable in my servlet was testing the same issue in a different way, hence the lightbulb as I was typing my reply. So I would assume that the web-inf/lib classes would work the same way, since they are loaded by the webapp's classloader. Charlie -Original Message- From: Jeff Trent [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 13, 2001 9:41 AM To: [EMAIL PROTECTED] Subject: Re: static,synchronized and classloaders Are you saying that I don't need different JVMs to handle each of my webapps if I move the JAR files that I have in my classpath down into the lib directory of the webapp? I have a problem in that this JAR I'm using in several of my webapp contexts uses static class members to carry configuration information that gets corrupted by the very next webapp that initializes the same shared library with different configuration information. thanks, jeff - Original Message - From: Cox, Charlie To: '[EMAIL PROTECTED]' Sent: Wednesday, June 13, 2001 8:40 AM Subject: RE: static,synchronized and classloaders I'm not sure what you mean by abc.MyClass and xyz.MyClass as the class in question is in the same package in both contexts. This archive link from Craig McClanahan(thank you Craig) gives a good explaination of classloaders: http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg13260.html Based upon this, the individual web app classloader does not know about the other webapp classloaders or the classes that they have loaded. That's why I think MyObject is treated as two classes since it is loaded by two different loaders at the same level in the class-loader heirarchy. I am currently using the same servlet class under two class loaders. It is not throwing any errors. The difference in my contexts is in my properties file that is context-specific and loaded by the servlet. Actually now that I think about it, I do have a static field that is remaining context-specific in my servlet, therefore it must be two different Class objects representing my class; therefore two different instances of my static members(confusing isn't it?). I guess I answered my own question. ;) And since I already typed this email, I'll send it anyway and hopefully someone else will find it useful. you can synchonize on the class by using the 'this' object(I am doing it). I'm just not sure if 'this' is available for static classes.I would think that it is. Charlie -Original Message- From: Luba Powell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 12, 2001 3:50 PM To: [EMAIL PROTECTED] Subject: Re: static,synchronized and classloaders(was:Java Question) Also, look if identical files are generated based on 2 different context: abc.MyClass is not the same as xyx.MyClass. If 2 class loaders load from identical class files - JVM verifier should throw the exception before a second object is created. If this doesn't happen - this is a serious bug. Also it is not possible to synchronize on the class - only on the method and a variable that is an object - Original Message - From: Cox, Charlie To: '[EMAIL PROTECTED]' Sent: Tuesday, June 12, 2001 3:35 PM Subject: RE: static,synchronized and classloaders(was:Java Question) Now is this true for when I have multiple contexts mapped to the same docbase? I have seen on this list that Tomcat loads the classes(in web-inf/classes) independently for each context and passing MyObject class instance between contexts is not the same 'MyObject' class in the second context even though it is the same code. Since it is not the same class I would assume that I would have two instances of a static method/field. And if it is synchronized on a static member(or the class itself) it would only be synchonized for this context. I'm
Re: static,synchronized and classloaders
My test was not as complete are thorough as yours, but I can say that under Tomcat 3.2.2 running on Win2000, this is not the result I am seeing. I'm finding that public variables in common.jar across multiple webapps are shared. Can you upload your two WAR files so that I can perform the same test without writing the same code / logic from scratch? thanks, jeff - Original Message - From: Bo Xu [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 13, 2001 11:10 AM Subject: Re: static,synchronized and classloaders Hi :-) I did a test with TC4.0-b5(standalone, J2SE1.3, winnt40): * cases: - % put the Same MyServlet.class in WEB-INF/classes in Different Context path which has Different Context docBase % put the Same MyServlet.class in the Same MyJar.jar file in WEB-INF/lib in Different Context path which has Different Context docBase % put the Same MyUtility.class in WEB-INF/classes in Different Context path which has Different Context docBase % put the Same MyUtility.class in the Same MyJar.jar file in WEB-INF/lib in Different Context path which has Different Context docBase - % put the Same MyServlet.class in WEB-INF/classes in Different Context path which has Same Context docBase % put the Same MyServlet.class in the Same MyJar.jar file in WEB-INF/lib in Different Context path which has Same Context docBase % put the Same MyUtility.class in WEB-INF/classes in Different Context path which has Same Context docBase % put the Same MyUtility.class in the Same MyJar.jar file in WEB-INF/lib in Different Context path which has Same Context docBase * in all the above cases, all MyServlet/MyUtility of different Context path(NOT Context docBase) are different in the follwing way: - classloader: this.getClass().getClassLoader().hashCode() - Class object: this.getClass().hashCode() (so/then), I can seprate all the public static field in MyServlet/MyUtility by different Context path(NOT Context docBase), i.e. : % I can set it is 0 to a public static String field-MyField in MyServlet/MyUtility of Context path0, and use it within Context path0 % I can set it is 1 to a public static String field-MyField in MyServlet/MyUtility of Context path1, and use it within Context path1 - i.e., Context path/webappClassLoader/Class object/static field is independent to the following: % Context docBase % .class file/.jar file and please notice that jar file in WEB-INF/lib can not be auto-reloaded, so if you update a jar file in WEB-INF/lib, you need to re-start TC4.0-b5. Bo June 13, 2001
static initialization
I'm having some issues with static member initialization now that I've migrated to Tomcat. I have a 3rd party library (call it X) that I used in several of my webapps.X uses a static member to keep configuration information for all of the threads running in its process. However, I'm finding that all webapps run in the same process space under Tomcat (by default). Rather then separating out each webapp to run in a separate context by changing the Tomcat configuration, is there some other means I can employ to isolate one X from another? I am considering chaging X to use getInitialContext() but (a) I'm not sure if this is will work or is the recommended solution for this sort of problem, and (b) Didn't want to clutter X with InitialContext since X has, up to now, been unaware of the context (web server or not) it runs under. Any recommendations? Thanks, Jeff
Tomcat hangs if I refer to a context that doesn't exist
If I refer to a nonexistant webapp, I find that Tomcat pins my CPU (doesn't really hang). I need to stop tomcat and restart for the CPU to return to normal. I couldn't find any information on this problem in the archives. Anybody else see this or know what the problem might be? I'm using 3.2.1 on NT2000. thanks, jeff
Dynamically reloading a web.xml
If I have webapp named a b, is it possible to: (1) dynamically add c without restarting the tomcat service thereby affecting a b? (2) redeploy a without restarting the tomcat service? Thanks.
Can You Dynamically Reloading web.xml?
If I have webapp named a b, is it possible to: (1) dynamically add c without restarting the tomcat service thereby affecting a b? (2) redeploy a without restarting the tomcat service? Thanks.
Tomcat in a Hosted Environment
I am in the process of making a proposal to my web hosting service to include Tomcat (basically so I can use Struts). They are an NT shop but are ammenable to suggestions. Here are basically the requirements: The directory structure of accounts look something like this: \home \user-1 \domain-1 \domain-2 ... \domain-x \user-2 \domain-1 \domain-2 ... \user-n (1) I would like to see the service allow me to deploy a webapp WAR file to my user account under one of my domains. (2) Once I deploy, I'd like to have the changes immediately take affect on my site without affecting other user accounts. (3) My context and class path should only pertain to me. I believe accomplishing (1) (3) are trivial. However, I have limited ideas on how (2) can be accomplished. The only solution I can think of is writing some simple scripts that performs JNI or JMQ (or some other messaging scheme) that talks to an administrative unit that does the work of starting/stopping my instance of tomcat. Any thoughts on this? Also, I'd to keep the system as autonomous as possible so that as new user accounts and user account domains come into the picture, no other configuration files need updating. So tell me, is this all a pipe dream or do people think this can be accomplished?
Re: Free MS SQL JDBC driver??
I've had a lot of success with free tds (see http://www.freetds.org). It's a type 3 driver however. - Original Message - From: bryan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 31, 2001 12:10 AM Subject: Free MS SQL JDBC driver?? Hello all, Does anybody know if there is free MS SQL 7.0/ 2000 JDBC (Type 4) driver? Thanks Bryan
Accessing Base Document Directory from JSP
I would like to use absolute URLs to get to another page in my app. However, I don't want to burn in 'MyApp'. Instead, I would like to dynamically get the name that was assigned via the sysadmin. How can I do this from within a JSP? Thanks, Jeff
Re: Accessing Base Document Directory from JSP
HttpServletRequest.getContextPath() do you mean? If so, this returns the path to get to the current servlet. This is not what I want. I want to get the base context. So for example, if I deploy a solution to the path 'custref' and I am within the servlet custref/admin/tools/whatever, I would like to find the way to get simply custref back, not custref/admin/tools/whatever. I realize I can write my own function to do this easily but I'd rather use something already built. thanks, jeff - Original Message - From: Pernica, Jan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 22, 2001 9:12 AM Subject: RE: Accessing Base Document Directory from JSP application.getContextPath() returns the path to the current context On Tuesday, May 22, 2001 2:42 PM, Jeff Trent [SMTP:[EMAIL PROTECTED]] wrote: I would like to use absolute URLs to get to another page in my app. However, I don't want to burn in 'MyApp'. Instead, I would like to dynamically get the name that was assigned via the sysadmin. How can I do this from within a JSP? Thanks, Jeff __ Tato komunikace je urcena vyhradne pro adresata a je duverna. This communication is intended solely for the addressee and is confidential.
How can I get Ant to use jikes for javac tags instead of sun's javac?
I'd like: javac srcdir="src" destdir="${deploy.home}/WEB-INF/classes" classpath="${deploy.home}/WEB-INF/classes" debug="on" optimize="off" deprecation="off"/ to use jikes instead. Has anyone done this?
Help!
Environment: Win2000. ISAPI filter is running. Log file shows: 17:30:45 127.0.0.1 GET - 501Browser reports a 501/505 error. Any help would be greatly appreciated! - Jeff