RE: Tomcat behind IIS
sure, just go into your server.xml and remove the web connector Connector port=8080 / I'm using the minimal server.xml (slightly modified) so there may be more parameters in yours. This element is contained with in the Service tag which is in the Server tag. Daniel -Original Message- From: VAN DER MARLIERE FREDERIC [mailto:[EMAIL PROTECTED] Sent: Friday, March 18, 2005 10:58 AM To: tomcat-user@jakarta.apache.org Cc: MAES NICOLAS Subject: Tomcat behind IIS Hi all, I installed a tomcat 5.0 behind an IIS server. Everything works fine with the connector. Now, I would like that Tomcat only accepts connections from this IIS server and not from others computers (still accessible from http://myhost:8080/myApplication http://myhost:8080/myApplication ). Is there a simple way to do this in server.xml (or other tomcat config files) or do I have to install a firewall ? Thanks in advance. Fred. Ce message et toutes les pieces jointes (ci-apres le message) sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite.Tout message electronique est susceptible d'alteration. Le CREDIT DU NORD et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. This message and any attachments ( the message) are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited.E-mails are susceptible to alteration. Neither CREDIT DU NORD nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Out of Memory when compiling JSP (Struts app on Tomcat 4.1.27)
Chachany, It sounds like it's using the default of -Xmx64m. Probably the best way to troubleshoot out or memory errors is to see what is really happening with garbage collecting, the same way that you tune it. If you can add these options, then the JVM will spit out all kinds of useful information: -XX:+PrintTenuringDistribution -XX:+PrintGCDetails -Xverbosegc But it sounds like the problem is that it's not getting the options. What you really need to figure out is exactly how the service is getting started. For instance, if it's calling tomcat.exe then I don't believe that the JAVA_OPTS environment variable is ever looked at since that is in the startup.sh and startup.bat files (I'm not 100% certain about that however). Find out how it's starting. Also, post the version of Java you are using (since the options I gave you above don't work on all versions, I think 1.4 and up or 1.3 and up). But the -Xverbosegc works all the way back to 1.1 if I'm correct. Daniel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 8:25 AM To: tomcat-user@jakarta.apache.org Subject: Out of Memory when compiling JSP (Struts app on Tomcat 4.1.27) Hi all I'm working on an application currently that is experiencing some intermittent memory problems when installed onto our integration test server, but not on the development staff's local laptops. I have attempted to increase the maximum memory available to Tomcat by creating a global environment variable (because tomcat runs as a service) JAVA_OPTS=-Xmx512M Which doesnt seem to have made a difference. Is this the best way to increaqte the memory available to an application? Is my syntax wrong? Are there other options I can set that will help? The weird thing is that when I look at the memory usage of Tomcat.exe, the most memory it has used is 110,000 there seems to be no pattern to the memory errors (as usual) and it happens a lot when compiling JSP files. The system memory seems high, but not horribly so. I see the following in Task Manager MEM Usage = 885,000 (varies) Commit Charge: Limit : 2,522,244 Peak : 958,260 Anyone? 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: adding root context with admin webapp
Example: Context path= docBase=C:\Projects\myapp\docroot debug=99 /Context Also, I use deployOnStartup=false in my Host. Keep in mind that this used to be called autoDeploy and due to some left-over stuff the setting autoDeploy still pops up in the Host if you use the admin interface (I just keep both of them in there). This setting (autoDeploy/deployOnStartup) prevents web apps from loading that don't have an explicit Context defined in either the server.xml or (preferably) a myapp.xml file under ${CATALINA_HOME}/conf/Catalina/localhost (or actually ${CATALINA_HOME}/conf/${name attribute of Service element}/${name attribute of Host element})... Example: Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Anyway, this will prevent the app under ${CATALINA_HOME}/webapps/ROOT from auto-loading. Alternately, you can just delete the damn ROOT app. Sorry for the long explanation, I think it's cleaner to explicitly declare your app personally with the whole Context thing. Daniel -Original Message- From: Matt Bathje [mailto:[EMAIL PROTECTED] Sent: Thursday, August 26, 2004 5:05 PM To: Tomcat Users List Subject: adding root context with admin webapp Hi all. This message applies to tomcat 5.0.25 and tomcat 5.0.27. Is it possible to add a root context with the admin webapp? I try to add it with a single slash (/) but when I do, my whole site gets messed up with a slash at the front of all style sheets, images and links. You can't add the root context as blank () through the admin webapp. Looking at the context xml file, it seems as though when added with a slash (/) the context is created with the path as / instead of as . I looked through bugzilla, and found this: http://issues.apache.org/bugzilla/show_bug.cgi?id=26399 The message left is very confusing - it says that the root context will be displayed as / in manager apps, but as internally and in server.xml - which is fine - but it also says there is no bug (with creating root contexts?) Anyway - I haven't been able to figure out how to do this. Could someone please let me know if there is a way? Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I've officially decided that JSTL is one of the worst things to ever happen to mankind
Why was C++ invented? To give programmers jobs. No other reason whatsoever, C does whatever C++ does just as good, and better. At that point, you just showed to be very closed-minded. (C++ does have an accurate object model, which improves a lot. Yes, you can do similar things with macros, but cumbersomely. From your point of view, go ahead and programm assembly code. Believe me, it dies whatever C does just as good, and better.) Assembly is impure and bloated by the macro-Assembly to machine code translation. If you are worth your weight, you can just write it all in hex, and with dipswitches. DEATH TO ALL KEYBOARD USERS!!! Daniel -Original Message- From: SH Solutions [mailto:[EMAIL PROTECTED] Sent: Sunday, July 04, 2004 4:36 AM To: 'Tomcat Users List' Subject: RE: I've officially decided that JSTL is one of the worst things to ever happen to mankind Hi After getting convinced to try JSTL, I learned the following things: .. Having read points 1-6, I thought, there must be a truth in your remarks. (I did'nt use JSTL or EL yet, but I am about to try.) But then I got to: Why was C++ invented? To give programmers jobs. No other reason whatsoever, C does whatever C++ does just as good, and better. At that point, you just showed to be very closed-minded. (C++ does have an accurate object model, which improves a lot. Yes, you can do similar things with macros, but cumbersomely. From your point of view, go ahead and programm assembly code. Believe me, it dies whatever C does just as good, and better.) No more trusting any of your remarks... Regards, Steffen - 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: I've officially decided that JSTL is one of the worstthingsto ever happen
Oh for crying out loud Ivan! You challanged my assertion that Java is the number one language asking for the source of the stats and I give them to you but you just go on whining. Please take your trolling somewhere else. Get A LIFE. and as to C++? Huge file sizes I wonder what compiler, and linking options are you using? I do not have a problem with my executables being huge at all. Then again, I don't use frameworks that are inefficeint hogs. Sounds like the programmer. 100% guaranteed memory leaks Sounds like the programmer. My code doesn't have memory leaks! Then again, I know how to write disciplined code, something that quick and dirty programmers can't understand. I also know how to use tools that track memory leaks. And lo The Heavenly Father doth rest. And whilst He rest, His hand accidentally brushed the keyboard and somehow keyed in the following code. Troller ivan = new Troller(); ivan.setIrrational(true); ivan.setOverEmotional(true); ivan.setLife(null); ivan.setClue(null); ivan.setThinkingStyle(Psychosis.THINKING_STYLE_BLACK_AND_WHITE); ivan.setDailyRoutine(new Runnable() { public void run() { while(ivan.awake()) { Forum target = web.surfForUnsuspectingVictims(); if(target != null) { Iterator i = target.getMessages(); while(i.hasNext()) { ForumPosting intelligentPosting = (Posting) i.next(); intelligentPosting.read(); ForumPostingReplyFactory replyFactory = ivan.getPsychoticReponseGenerator(); Reply reply = replyFactory.createResponse(); while(reply.makesSense()) { reply.rant(); reply.bitch(); reply.whine(); reply.moan(); reply.saySomethingIrrational(); } target.post(reply); ivan.setIQ(ivan.getIQ() - 1); } } } ivan.slapSelf(Slap.HARD); throw new IdiotTrollerException(); } }); ivan.run(); -Original Message- From: Ivan Jouikov [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 06, 2004 9:29 PM To: 'Tomcat Users List' Subject: RE: I've officially decided that JSTL is one of the worstthingsto ever happen Ok let's settle this argument simple. Tonight, I'll ask my Christian Science friend to talk to Jesus, and ask him the following: Jesus, if EL really DOES decrease performance significantly, and should not be used at all, please give me absolutely NO sign. However, if EL is a great thing and should be used by everyone, please give me a sign. I'll report to you in the morning and let you know what was God's opinion on that. -Original Message- From: SANTOS, DANIEL (SBCSI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 06, 2004 4:02 PM To: Tomcat Users List Subject: RE: I've officially decided that JSTL is one of the worstthingsto ever happen If this is the case then I ask you why Java has been the number one programming language for 4 years now? Source of this statistic? I assumed that this was fairly common knowledge. I remember when it surpassed C++ in Febuary of 2000 (I thought at the time in development hours). Having been a Java programmer since 1997, this was a pretty big deal for me. I even remembered the month/year it happened (which made it easire for me to find this report). So here is the original report, a Bloor Research study from Febuary of 2000. It even has a cute little graph that plots the various languages-- http://www.bloor- research.com/research_library.php?pid=282 Now that I look back at it I see that this is when the *demand* for java skills surpassed that of C++ skills. It looks like it was just March of last year (http://www.sun.com/aboutsun/media/presskits/edge2003/factsheet.pdf) that that Java actually surpassed C++ in development hours. This was of course the eventual outcome of it's demand surpassing all other skills. The data from this Sun press release is from the Gartner Group BTW. Java is King, there are really no ifs, ands or butts about it. As to your performance issues, I don't have them so I can only sugest that you can examine your environement, your compiler options (are you using hotspot?) and your getters. All of my bottlenecks are in my DB calls. I have done performance analysis and never came up in my EL. As I sugested earlier, maybe you can run hprof and see where the bottleneck really is? Also, I considered myself a fairly hardcode C++ developer (having done it from '95 to 2002). If I am ever in a situation where my memory usage is critical, I'm almost certainly in C or C++. If performance is important, I consider C or C++. But IPC, threading, and networking is so phenominally better on Java not to mention the benefits of garbage
RE: I've officially decided that JSTL is one of the worstthingsto ever happen
Trolling is when you make outrageous postings with the intention of agitating the subscriers. Stuff like saying Java sucks, or C++ is 100% gauruntee that you will have memory leaks, etc, etc. I actually wrote all types of C++ applications. You don't really know what I have written in my career now do you? 600MB of executable? That's a problem. Yes, you are correct, I have never written a C++ application (or system for that matter) with a 600MB executable -- I see something essentially wrong with that. And C++ executables comapred to C executables... I don't think I really ever saw a difference over 50% in size. Your statements are very black and white and close minded and also attacking to the ideas and methodologies of hundreds of thousands of IT professionals -- hence, trolling Anyway, good luck to you -Original Message- From: Ivan Jouikov [mailto:[EMAIL PROTECTED] Sent: Thursday, July 08, 2004 3:44 PM To: 'Tomcat Users List' Subject: RE: I've officially decided that JSTL is one of the worstthingsto ever happen What the hell are you talking about? I am all for java. Java is my #1 language. Oh for crying out loud Ivan! You challanged my assertion that Java is the number one language asking for the source of the stats and I give them to you but you just go on whining. Please take your trolling somewhere else. Get A LIFE. and as to C++? My trolling? I don't even know what that means. And I do have a life. Huge file sizes I wonder what compiler, and linking options are you using? I do not have a problem with my executables being huge at all. Then again, I don't use frameworks that are inefficeint hogs. Sounds like the programmer. Huge file sizes was said about C++ COMPARATIVELY to C. Any program in C++ will be much bigger than exactly same program in C. 100% guaranteed memory leaks Sounds like the programmer. My code doesn't have memory leaks! Then again, I know how to write disciplined code, something that quick and dirty programmers can't understand. I also know how to use tools that track memory leaks. Looks like you've never written a 600MB program. And lo The Heavenly Father doth rest. And whilst He rest, His hand accidentally brushed the keyboard and somehow keyed in the following code. Troller ivan = new Troller(); ivan.setIrrational(true); ivan.setOverEmotional(true); ivan.setLife(null); ivan.setClue(null); ivan.setThinkingStyle(Psychosis.THINKING_STYLE_BLACK_AND_WHITE); ivan.setDailyRoutine(new Runnable() { public void run() { while(ivan.awake()) { Forum target = web.surfForUnsuspectingVictims(); if(target != null) { Iterator i = target.getMessages(); while(i.hasNext()) { ForumPosting intelligentPosting = (Posting) i.next(); intelligentPosting.read(); ForumPostingReplyFactory replyFactory = ivan.getPsychoticReponseGenerator(); Reply reply = replyFactory.createResponse(); while(reply.makesSense()) { reply.rant(); reply.bitch(); reply.whine(); reply.moan(); reply.saySomethingIrrational(); } target.post(reply); ivan.setIQ(ivan.getIQ() - 1); } } } ivan.slapSelf(Slap.HARD); throw new IdiotTrollerException(); } }); ivan.run(); Hahahah :) That was a good one. You telling me to get a life and you have time to do that? BTW Iterator i = target.getMessages(); while(i.hasNext()) { I really like how 1.5 has the for( Element e : collection ) loop. Don't you agree? -Original Message- From: Ivan Jouikov [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 06, 2004 9:29 PM To: 'Tomcat Users List' Subject: RE: I've officially decided that JSTL is one of the worstthingsto ever happen Ok let's settle this argument simple. Tonight, I'll ask my Christian Science friend to talk to Jesus, and ask him the following: Jesus, if EL really DOES decrease performance significantly, and should not be used at all, please give me absolutely NO sign. However, if EL is a great thing and should be used by everyone, please give me a sign. I'll report to you in the morning and let you know what was God's opinion on that. -Original Message- From: SANTOS, DANIEL (SBCSI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 06, 2004 4:02 PM To: Tomcat Users List Subject: RE: I've officially decided that JSTL is one of the worstthingsto ever happen If this is the case then I ask you why Java has been the number one programming language for 4 years now? Source of this statistic
RE: Understanding Java -- I've officially decided that JSTL is one of the worst thingsto ever happen
Absolutely, it's important to understand Java and the dynamic compiler. This study (the pdf linked below) may sound like propaganda, but dynamic compilation does offer the ability to run faster than static compilation, although it's usually not the case and is dependant on what specifically you are doing in your code. Moreover, I would propose that if you have having performance problems with your JSTL-based application that it's probably either caused by config problems or poor utilization of the Java language. I would suggest doing some profiling, with the Sun jvm, using something along these lines: java -Xprof -Dcompiler=NONE -Xrunhprof:cpu=samples,thread=y,depth=16 Then you run your application and I believe that you must terminate normally for profiling to complete (i.e., no CTRL-C, etc). This should show where your bottlenecks are in your application. If you want to see how those bottle necks are effected by the compiler you can run this with it on but it wont always be able to tell you the line numbers then since there is no line-to-instruction mapping once it's been optimized. good luck Daniel -Original Message- From: SH Solutions [mailto:[EMAIL PROTECTED] Sent: Sunday, July 04, 2004 7:28 AM To: 'Tomcat Users List' Subject: RE: I've officially decided that JSTL is one of the worst thingsto ever happen Hi It's not. But the use case is. While Java is definitely a good approach for business apps, it's unacceptable for edited apps, for which look and feel remains a top criteria when the customer makes his choice. I totally agree on this, even though there is a lot of progress going on. While Java is definitely a good approach for business apps, it's unacceptable for edited apps, for which raw performance remains a top criteria when the customer makes his choice. I do not agree on this any more. Java has prooven to be very efficient and is still improving more and more. Right now, I would say that java applications (if well written) are at least half as fast as c applications (also well written). Suns promotion gives you this: http://research.sun.com/techrep/2002/smli_tr-2002-114.pdf I agree, that Sun has interests on saying that java is fast, but read it. Java is even a lot faster in some areas of computing: Assume, you have code that needs to allocate lots (thousands) of very small objects for a short period of time in memory. In C, where you do not have a garbage collector, you need to free these memory peaces one by one, which is a burdon for memory management and will slow down things. In Java, allocation is fast (just one pointer operation) and there is no need to free things. The garbage collector throws all unreferenced objects of the youngest collection away at once, not processing them one by one. Obviously, in such situations, Java has performance advantages. This seems to be a seldom situation, but it occurs much more often, then you might think. Especially in Java, where every function, that returns more then one value needs to return an temporary object. This seemed to be very costly for me, when I startet using Java, but right now I understood that this is has constant costs - like in no conservative language. Regards, Steffen - 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: I've officially decided that JSTL is one of the worstthingsto ever happen
If this is the case then I ask you why Java has been the number one programming language for 4 years now? As was recognized long ago, performance is not everything. And in fact, means little when you can't get your product out the door because you are still trying to chase down memory leaks, buffer overruns and corrupted pointers. As somebody else said, C++ programmers will understand this. Daniel -Original Message- From: Eric VERGNAUD [mailto:[EMAIL PROTECTED] Sent: Sunday, July 04, 2004 11:33 AM To: Tomcat Users List Subject: Re: I've officially decided that JSTL is one of the worstthingsto ever happen le 4/07/04 14:27, SH Solutions à [EMAIL PROTECTED] a écrit : Right now, I would say that java applications (if well written) are at least half as fast as c applications (also well written). Which means that when your java app is in competition with a native app, youve lost the market. --- Eric VERGNAUD - JLynx Software Cutting-edge technologies and services for software companies web: http://www.jlynx.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I've officially decided that JSTL is one of the worst things to ever happen
There are a lot of java classes that return nulls as part of normal operation. For instance - sets. Set.get(someobj) returns null if object is not there. And when you do ${my.set.blah.wee} and blah wasn't found, and you get some crazy EL error, you'll remember my words. This gets back to design issues to me. You should know if a bean can return null if you know your design. Were you to attempt the same thing in java you would get NullPointerException. I agree that the error messages can sometimes not be so easily interprted, but I think it comes back to design. So as far as actually *dealing* with those conditions the sky is the limit: c:if test=${my.set != null} ..blah blah /c:if or You have ${my.set == null ? 'no' : 'some'} blah. or even You have ${my.set == null ? 'no blah' : (my.set.blah == null ? 'blah with no wee' : 'a lot of wee')}. Either way (java, EL) you are going to have to navigate a hierachical tree. The real question that I ask myself is am I doing business logic or processing in my view layer? and if so, does this belong in another layer?. Daniel -Original Message- From: Ivan Jouikov [mailto:[EMAIL PROTECTED] Sent: Monday, July 05, 2004 2:44 AM To: 'Tomcat Users List'; [EMAIL PROTECTED] Subject: RE: I've officially decided that JSTL is one of the worst things to ever happen See below for my replies What should we use instead? Welcome to the front page of JSP manual: % if( yourmoma ) { % Do some things % } % To me, it seems EASIER than this: c:set var=yourmoma value=%=yourMomaFromCode%/ c:if test=${yourmoma} Do some things /c:if What happened to the good old idea of using JAVA, with all its beautiful features, in the JSPs themselves? Understandable output? Do you really think you can find one designer who would understand a simple calendar written in tags? Hell no. And for me, as a programmer, understanding good old java code inside % % is MUCH MUCH easier than understanding all the tag BS. Besides, old java tags % % do very good job of presenting understandable layout. %=% and ${} are both equally to understand to me. A key phrases in that example is To me, it seems EASIER... And for me, as a programmer... both equally to understand to me But that is you, a programmer with experience using various programming languages. Why not use scriplets? Because of the development worlds experiences with ASP and CF where pages were riddled with code and vew developers (not designers) hard a hard time maitaining these view components. View developers in large teams have their respective discipline and it becomes more difficult for them to maintain thier tier. JSTL allows them to use familar syntax and structures from SGML/HTML and all those other markup languages, hence making it easier for them to display data, not processing it. Or would a company rather employ a perfectly good server side developer writing view code? If they have no usability skills it will be a waist of the company resources. The key phrase is display data, not processing it, which is what I agree with. However, that's not what JSTL agrees with. Tags like c:if and c:foreach shift XML from data to logic, which is NOT what XML is for. Didn't I say that before? But you're missing the point, again: the (major) reason JavaScript is NOT server-side, is because of its sloppy syntax which is like a warm oven for bacteria - bugs just GROW in it. EL is making the same mistake over again. Valid point for JavaScript, but again treat JSTL-EL as a view helper component not as a pure processing solution. Also did not mean to mention EJB it had no place in this arguement. That's one of the things that EL might be actually useful for: printing stuff out and escaping XML. Exactly... But again, you're forgetting that taglibs actually FORCES you not to use % % code inside tags (when you make tag files). And tags like c:if and c:foreach have no place in this world, I think we have a consensus on this. But still, what if TModel might return a null value? Then you're in for a nice 2 hour debugging ride with your EL syntax, or a 5 second adding if statement ride, if you used Java. The null values should be handled in the Model or in a heavy Controller... if those values are missing or a failure occurs send them to the appropriate view. There are a lot of java classes that return nulls as part of normal operation. For instance - sets. Set.get(someobj) returns null if object is not there. And when you do ${my.set.blah.wee} and blah wasn't found, and you get some crazy EL error, you'll remember my words. % if( yourmoma ) { % Lets leave yourmoma out of this... lol Cheers!
RE: some problem in tomcat 5.0.25
Forgive the simplicity of my question, but how large is the JSP file? -Original Message- From: archana gupta [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 06, 2004 9:39 AM To: [EMAIL PROTECTED] Subject: some problem in tomcat 5.0.25 Hi , I have deployed an application on Tomcat 5.0.16 which works fine , but same war file if i try to put it into 5.0.25 or 5.0.24 i get an error message Code is too large , unable to complie JSP page . Does anyone have an idea. Regards Archana Yahoo! India Careers: Over 50,000 jobsonline. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I've officially decided that JSTL is one of the worstthingsto ever happen
If this is the case then I ask you why Java has been the number one programming language for 4 years now? Source of this statistic? I assumed that this was fairly common knowledge. I remember when it surpassed C++ in Febuary of 2000 (I thought at the time in development hours). Having been a Java programmer since 1997, this was a pretty big deal for me. I even remembered the month/year it happened (which made it easire for me to find this report). So here is the original report, a Bloor Research study from Febuary of 2000. It even has a cute little graph that plots the various languages-- http://www.bloor-research.com/research_library.php?pid=282 Now that I look back at it I see that this is when the *demand* for java skills surpassed that of C++ skills. It looks like it was just March of last year (http://www.sun.com/aboutsun/media/presskits/edge2003/factsheet.pdf) that that Java actually surpassed C++ in development hours. This was of course the eventual outcome of it's demand surpassing all other skills. The data from this Sun press release is from the Gartner Group BTW. Java is King, there are really no ifs, ands or butts about it. As to your performance issues, I don't have them so I can only sugest that you can examine your environement, your compiler options (are you using hotspot?) and your getters. All of my bottlenecks are in my DB calls. I have done performance analysis and never came up in my EL. As I sugested earlier, maybe you can run hprof and see where the bottleneck really is? Also, I considered myself a fairly hardcode C++ developer (having done it from '95 to 2002). If I am ever in a situation where my memory usage is critical, I'm almost certainly in C or C++. If performance is important, I consider C or C++. But IPC, threading, and networking is so phenominally better on Java not to mention the benefits of garbage collection and all of it's other features that I am hard pressed to leave it or go JNI. I did need JNI recently for some file system stuff that I wanted tweaked (traversing file systems with 100s of thousands of files). Daniel As was recognized long ago, performance is not everything. And in fact, means little when you can't get your product out the door because you are still trying to chase down memory leaks, buffer overruns and corrupted pointers. When performance dependes on whether you use %=hello% or ${hello}, I'll stick with the first one, considering that it boosts performance up by like 5 times. As somebody else said, C++ programmers will understand this. Daniel -Original Message- From: Eric VERGNAUD [mailto:[EMAIL PROTECTED] Sent: Sunday, July 04, 2004 11:33 AM To: Tomcat Users List Subject: Re: I've officially decided that JSTL is one of the worstthingsto ever happen le 4/07/04 14:27, SH Solutions [EMAIL PROTECTED] a crit : Right now, I would say that java applications (if well written) are at least half as fast as c applications (also well written). Which means that when your java app is in competition with a native app, youve lost the market. --- Eric VERGNAUD - JLynx Software Cutting-edge technologies and services for software companies web: http://www.jlynx.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.716 / Virus Database: 472 - Release Date: 05.07.2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.716 / Virus Database: 472 - Release Date: 05.07.2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use oracle pool instead of using DBCP pool?
I use a method similar to this as well. I don't use a servlet listener however. I use a javax.servlet.ServletContextListener instead however. I store the jdbd url in my web.xml also as a context-param (I just just cram it all into one paramater however) and put the pool as an attribute of the Context. Here is the shorthand for that below: public void contextInitialized(ServletContextEvent sce) { String dbUrl = sce.getServletContext().getInitParameter(dbUrl) OracleDataSource pool = new OracleDataSource(); pool.setURL(dbUrl); sce.getServletContext().setAttribute(dbConnectionPool, pool); } and I have my classes12.zip (renamed to .jar) in my WEB-INF/lib folder -Original Message- From: David Short [mailto:[EMAIL PROTECTED] Sent: Friday, July 02, 2004 12:40 PM To: 'Tomcat Users List' Subject: RE: How to use oracle pool instead of using DBCP pool? I'm sure there's another way. This is how I use it. You can extract the connection pool logic and embed in your framework. -Original Message- From: Claudio Carvalho [mailto:[EMAIL PROTECTED] Sent: Friday, July 02, 2004 10:33 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: How to use oracle pool instead of using DBCP pool? Hi Davi, Thanks, but I'm trying to solve this problem without changing my J2EE framework... using JNDI,etc... Do you know any other approach? Claudio Carvalho. - Original Message - From: David Short [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, July 02, 2004 1:55 PM Subject: RE: How to use oracle pool instead of using DBCP pool? Try this. Here's how I do it using Struts on W2K. Modify names and paths to suit your needs. Upon startup, a listener servlet (ResourceManagerListener) is called (See listener tag in the included web.xml source). The listener servlet will create the connection pool based on your web.xml parameters (See ResourceManagerListener.java). Once started, the listener servlet initializes an application scope variable (appDataSource), which when called from your servlets/JSPs will return a DB DataSource object (DB connection). -- -- --- In your main servlet: try { DataSource ds = (DataSource) getServlet().getServletContext().getAttribute(appDataSource); xxxProcess = new xxxProcessBean(); xxxInfo = new xxxInfoBean(); xxxProcess.setDataSource(ds); xxxInfo = xxxProcess.getUser(userName, customerId); } In your process bean: public class xxxProcessBean implements Serializable { private DataSource dataSource; /** * Sets the dataSource property value. */ public void setDataSource(DataSource dataSource) { this.dataSource = dataSource; } public xxxInfoBean getUser(String userName, String customerId) throws SQLException { // Get the user info from the database Connection conn = dataSource.getConnection(); xxxInfoBean xxxResult = null; try { xxxResult = getUserName(userName, customerId, conn); // Execute actual SQL statement. } finally { try { conn.close(); conn = null; } catch (SQLException e) {} // Ignore return xxxResult; -- -- --- Change MachineNameHere to your machine name. Change OracleSIDHere to your DB SID. Change DBUserNameHere to your DB username. Change DBPasswordHere to your DB password Change ApplicationNameHere to a meaningful application designator. Change xxx to your object name. Copy Oracle's classes12.zip and nls_charset12.zip files (should live in C:\OraHome\jdbc\lib) to C:\Tomcat\common\lib. Depending on the version of Tomcat, you may need to rename the .zip files to .jar. I'll let you read/learn about Struts on your own. Hoe this helps. Dave -- -- --- web.xml ?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 !-- Used by the JSTL I18N actions -- context-param param-namejavax.servlet.jsp.jstl.fmt.fallbackLocale/param-name param-valueen/param-value /context-param !-- Context parameters for application -- !-- Oracle thin JDBC driver -- !-- param-valuejdbc:oracle:thin:@MachineNameHere:1521:OracleSIDHere/param-val ue -- context-param param-namejdbcURL/param-name !-- Oracle OCI JDBC driver -- param-valuejdbc:oracle:oci8:@OracleSIDHere/param-value /context-param context-param param-nameuser/param-name param-valueDBUserNameHere/param-value /context-param context-param param-namepassword/param-name
PDF File on Documentation Web Site Corrupted?
When attempting to view a PDF on the Tomcat Architecture at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/architecture/requestProc ess/requestProcess.pdf I get errors in Acrobat Reader. Same thing for http://jakarta.apache.org/tomcat/tomcat-5.0-doc/architecture/startup/ser verStartup.pdf. Does anybody know who is responsible for these and if there is any way to correct them? Thanks Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use oracle pool instead of using DBCP pool?
Yes, that would be better. As it is, I have one pool instantiated in my app and then one at the server level for my auth realm :( -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Friday, July 02, 2004 2:13 PM To: Tomcat Users List Subject: Re: How to use oracle pool instead of using DBCP pool? I use another pool, but I have some context params, as I put below, and a pool servlet that instantiate all the pools and centralizes the connections. So you can see the connection state from a central point. If some is interested i can make it available. The only think you have to change is the pool creation. This way, apps can share pools (I know that dbcp can do it too, it didn't exist at that time) and to add a new one, just change this file. Beyond that, you have to put the jar with the lib in common lib, so every app will get the same pool manager. Names of parameters are in portuguese, but i think you can get the idea. context-param param-namealias1/param-name param-valueca.../param-value /context-param context-param param-namehost1/param-name param-valuehostvalue1/param-value /context-param context-param param-namesenha1/param-name param-valuethepassword1/param-value /context-param context-param param-namesid1/param-name param-valuedatabasename1/param-value /context-param context-param param-nameuser1/param-name param-valueusername/param-value /context-param context-param param-namealias2/param-name param-valuedescartaweb/param-value /context-param context-param param-nameuser2/param-name param-valueusename2/param-value /context-param context-param param-namesenha2/param-name param-valuepass2/param-value /context-param context-param param-namehost2/param-name param-valuehostname2/param-value /context-param context-param param-namesid2/param-name param-valueadm/param-value /context-param SANTOS, DANIEL (SBCSI) wrote: I use a method similar to this as well. I don't use a servlet listener however. I use a javax.servlet.ServletContextListener instead however. I store the jdbd url in my web.xml also as a context-param (I just just cram it all into one paramater however) and put the pool as an attribute of the Context. Here is the shorthand for that below: public void contextInitialized(ServletContextEvent sce) { String dbUrl = sce.getServletContext().getInitParameter(dbUrl) OracleDataSource pool = new OracleDataSource(); pool.setURL(dbUrl); sce.getServletContext().setAttribute(dbConnectionPool, pool); } and I have my classes12.zip (renamed to .jar) in my WEB-INF/lib folder -Original Message- From: David Short [mailto:[EMAIL PROTECTED] Sent: Friday, July 02, 2004 12:40 PM To: 'Tomcat Users List' Subject: RE: How to use oracle pool instead of using DBCP pool? I'm sure there's another way. This is how I use it. You can extract the connection pool logic and embed in your framework. -Original Message- From: Claudio Carvalho [mailto:[EMAIL PROTECTED] Sent: Friday, July 02, 2004 10:33 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: How to use oracle pool instead of using DBCP pool? Hi Davi, Thanks, but I'm trying to solve this problem without changing my J2EE framework... using JNDI,etc... Do you know any other approach? Claudio Carvalho. - Original Message - From: David Short [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, July 02, 2004 1:55 PM Subject: RE: How to use oracle pool instead of using DBCP pool? Try this. Here's how I do it using Struts on W2K. Modify names and paths to suit your needs. Upon startup, a listener servlet (ResourceManagerListener) is called (See listener tag in the included web.xml source). The listener servlet will create the connection pool based on your web.xml parameters (See ResourceManagerListener.java). Once started, the listener servlet initializes an application scope variable (appDataSource), which when called from your servlets/JSPs will return a DB DataSource object (DB connection). -- -- --- In your main servlet: try { DataSource ds = (DataSource) getServlet().getServletContext().getAttribute(appDataSource); xxxProcess = new xxxProcessBean(); xxxInfo = new xxxInfoBean(); xxxProcess.setDataSource(ds); xxxInfo = xxxProcess.getUser(userName, customerId); } In your process bean: public class xxxProcessBean implements Serializable { private DataSource dataSource; /** * Sets the dataSource property value. */ public void setDataSource(DataSource dataSource) { this.dataSource = dataSource; } public xxxInfoBean getUser(String userName, String customerId) throws
RE: Fresh install of 5.0.25 running but not responding
I just looked at your link. Since your tutorial says to set the domain name I imagine that that's just what you did. If you did so, you wont be able to get to it with the address localhost. I'm not sure, but I'm thinking that you can omit the name attribute of the Host tag and Tomcat will listen on *all* IP addresses the machine has. I know that it's the default for sure. GL! Daniel -Original Message- From: Scott D. Anderson [mailto:[EMAIL PROTECTED] Sent: Friday, July 02, 2004 2:45 PM To: [EMAIL PROTECTED] Subject: Fresh install of 5.0.25 running but not responding I just installed tomcat 5.0.25 on my RedHat 9 server. I followed the instructions in http://www.meritonlinesystems.com/docs/apache_tomcat_redhat.html which is linked from the Jakarta home page. I got smoothly (no error messages during installation or startup) to the step that says test that tomcat is working by starting it and typing http://localhost:8080 into your browser. When I did that, I didn't get a response. That is, the browser said waiting for localhost but I never got a reply. I also tried the real name of the server, both locally and from another machine. I thought it might be a firewall thing, but the firewall is turned off on my server. I used nmap and it says that port 8080 is open for http/proxy. To make sure it was Tomcat and not my web browser, I used telnet: When I telnet to port 80 and say GET /index.html; I get the desired page back from Apache, but if I telnet to port 8080 and say the same thing, I get no response. (I have to use the escape character to exit telnet.) I checked the logs, but I don't see any error messages there, either in ~tomcat/logs or in /var/log/messages. I used ps to find the process, and there is indeed a java process running as expected: tomcat 30722 1 0 10:34 pts/100:00:23 /usr/java/sdk/bin/java -Djava.endorsed.dirs=/usr/local/jakarta-tomcat-5.0.25/common/endorsed -classpath /usr/java/sdk/lib/tools.jar:/usr/local/jakarta-tomcat-5.0.25/bin/bootstr ap.jar:/usr/local/jakarta-tomcat-5.0.25/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/j I'm running out of ideas. I googled for info and also searched one of the mailing list archives, but since there's no error message to search for, I'm coming up empty. Can anyone suggest any more tests I can run to narrow this down? Thanks very much, Scott -- Scott D. Anderson Computer Science Department Wellesley College [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: Fresh install of 5.0.25 running but not responding
Actually, all machines have 127.0.0.1 with the name of localhost unless they are alternately configured. So if you have a network card or PPP connection they will have an IP address and you will still have localhost. So you can actually configure Tomcat to only listen on localhost if you chose to. But back to your problem, have you made any changes at all to any configuration files? And are you sure that you aren't seeing any errors in the log file? The line would start with SEVERE and might not be conspicuous if you are looking for a huge explosion. Also, telnet to localhost 8079 and make sure that you get connection refused (I just want to validate the issue) and make sure that telneting to 8080 just hangs (no connection refused). That is what I understand the situation as at least, just wanted to make sure. If none of this gets you anywhere you can always debug the tomcat process and suspend all threads and take a snapshot while your request is timing out. Another sanity check on this is to try to connect to losthost:8080 both when tomcat is running and not. If you don't get connection refused when tomcat is down then I would venture to tell you to look at your OS. But if you get connection refused while tomcat is down and a no response when it's up, then a snapshot of all of the threads (where all if you are using sun's jdb) has to tell you something about what it's doing. If this doesn't help send me your log file (pls zip it if it's big) and any config files you have changed and I'll try to help ya. Daniel -Original Message- From: Scott D. Anderson [mailto:[EMAIL PROTECTED] Sent: Friday, July 02, 2004 3:52 PM To: Tomcat Users List Subject: Re: Fresh install of 5.0.25 running but not responding Tomcat Users List [EMAIL PROTECTED] writes: I just looked at your link. Since your tutorial says to set the domain name I imagine that that's just what you did. If you did so, you wont be able to get to it with the address localhost. I'm not sure, but I'm thinking that you can omit the name attribute of the Host tag and Tomcat will listen on *all* IP addresses the machine has. I know that it's the default for sure. Thanks for your lightning-fast response. I searched the tutorial for domain and I see that it doesn't mention setting the domain name until step 4.2 (Server XML). I'm getting stuck at the end of step 3.4 (Tomcat Standalone). Sorry I wasn't more clear about where I was getting stuck. So, I don't think the hostname is the problem, unless the directions are seriously out of order, which doesn't seem likely. Oh, and this machine only has one IP address. Any other ideas? Scott -- Scott D. Anderson Computer Science Department Wellesley College [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: DataSource.getConnection() hangs
org.apache.jasper.JasperException: Exception retrieving attribute 'driverClassName' is caused from an unrelated error in your server.xml. I fixed the problem with this error not reporting correctly but I just submitted it to be added to CVS. The root cause exception is not being returned currently so just know that it's probably not your driverClassName. Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SOLUTION!! -- Cannot load JDBC driver class 'null'
Using Sun JDK 1.4.1_02 on Win2k SP2 and Jakarta 4.1.27. The tutorial in the tomcat docs failed for me also with the Cannot load JDBC driver class 'null'. I banged my head and had to get stitches and an ice pack. After that I came back to the office and cleaned out my server.xml and web.xml completely. Then I went to http://localhost:8080/admin http://localhost:8080/admin , browsed to the context that I am writing my app in, the full path from the tree being Tomcat Server/Service (Tomcat-Standalone)/Host (localhost)/Context(/myapp)/Resources/Data Sources. I added the data source from there specifying the JNDI name, driver class, URL, user and pass, etc. Then I did some tests with a jsp to make sure it was really in my context (you may have to restart tomcat, I did). Next I added the code back into my web.xml that is in the tutorial resource-ref descriptionDB Connection/description res-ref-namemyData Source/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref And it works!!! I just have a new problem now of DBCP borrowObject failed: String index out of range: -1, I suppose I'll figure that out too... Good Luck and thanks to all who posted info on this, Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]