Yoav talks about:
- The stability of Tomcat 5.5.1
- Why the team ported Tomcat to use Eclipse JDT instead of the Sun JDK
- Commons-Logging :/
- Other proprietary parts of Tomcat which may get externalized
- Server startup time
- Tomcat 6
The ability to load JSP's from StringBuffers/CharArrays rather than just the filesystem.I suppose tomcat could implement it and have it be optional. I don't think it violates the spec, since a user can deploy a webapp without extracting the war file. Does that qualify as loading from stringbuffer?
JSP have to be compiled after each change. So, JSP source is designed to be static and usability of dynamic JSP is limited.The ability to load JSP's from StringBuffers/CharArrays rather than just the filesystem.I suppose tomcat could implement it and have it be optional. I don't think it violates the spec, since a user can deploy a webapp without extracting the war file. Does that qualify as loading from stringbuffer?
JSP have to be compiled after each change. So, JSP source is designed to be static and usability of dynamic JSP is limited.Not everyone uses Jasper .. have you ever looked at what it generates? :-o
As to the comment that not everyone uses Jasper -- that's right of course, as virtually no product has 100% of any market ;) But Jasper does have a huge user base. It's embedded in Jetty, JBoss, WebSphere, JonAS, and some smaller products, so it's not only Tomcat users that rely on Jasper. And you don't hear performance complaints often to boot, so I'll give credit for that to Jasper's developers (I myself only implementede extremely minor feature additions to it, none of the core stuff).If basically everyone uses Jasper, you wouldn't hear about performance issues.
Not everyone uses Jasper .. have you ever looked at what it generates? :-oFurthermore, just because the current implementation of JSP -> Servlet conversion in Tomcat is relatively static and slow doesn't mean that it has to always stay that way.The real question is this: Why does dynamic JSP loading make sense? Does it help solve real problems? If so, someone will find a good way to make it work well.Peace,Cameron PurdyJasper generates Java code, so after Jasper there is javac, then class loader, JIT and class garbage collector (or memory leak :). You can't avoid java compilation if you don't restrict JSP not to use Java scriplets. Compiling JSP on each request is too costly anyway.
Jasper generates Java code, so after Jasper there is javac, then class loader, JIT and class garbage collector (or memory leak :). You can't avoid java compilation if you don't restrict JSP not to use Java scriplets. Compiling JSP on each request is too costly anyway.What are you talking about: "compiling it on each request"? I don't remember anyone asking for such a silly thing.
What are you talking about: "compiling it on each request"? I don't remember anyone asking for such a silly thing.When you generate something dynamically, it isn't unusual to generate it on each request. If you generate JSP on each request, then you will compile it also.
When you generate something dynamically, it isn't unusual to generate it on each request. If you generate JSP on each request, then you will compile it also.They are two different things. While it is possible that you could occasionally be correct, decrying dynamic content generation because someone could theoretically mis-use it is a great excuse to stay with COBOL ;-)
They are two different things. While it is possible that you could occasionally be correct, decrying dynamic content generation because someone could theoretically mis-use it is a great excuse to stay with COBOL ;-)Read my posts more carefully. I have said that usability of dynamic JSP is limited and that dynamic JSP make sense in content management systems where JSPs should be stored in database, but you don't change JSPs to frequently.
What are you talking about: "compiling it on each request"? I don't remember anyone asking for such a silly thing.The problem is that doing it the "Jasper" way is slow both for compilation and actually running the JSPs. Please don't limit the imagination of the market place by constraining it to use such a poorly implemented approach.A substantial JSP file can be parsed and compiled (.class) and loaded into a running JVM in a small fraction of a second. That it takes several seconds with various shipping products (e.g. Tomcat) is a travesty, and simply indicates that they never bothered to try to make it performant. Further, that the code produced is so sub-standard as to be cringeworthy.Since I follow tomcat development, I can say that is categorically not true. Remy and several other people have tried to improve Tomcat's performance. Tomcat5 is pretty much equal to the top servlet containers today. I've compared the source generated by Jasper vs Resin and resin is impressive. One particular example is Resin's Fast JSTL, which is faster than jakarta JSTL. Having done quite a bit of benchmarks on tomcat, I can say that jasper is neither slow or super fast. In terms of runtime performance, the biggest bottleneck in compiled JSP is jsp tags. Jsp compilers that convert tags to pure java code definitely run faster, but strictly speaking they aren't tags and don't operate the same way.
That it takes several seconds with various shipping products (e.g. Tomcat) is a travesty, and simply indicates that they never bothered to try to make it performant.I set my client's network timeout at 5 seconds because I was told not to make users wait longer. Usually Tomcat makes my client time out on the first request to a JSP that wasn't loaded. My acceptance tests always send the first request twice. Is there an easy way (Ant tasks or deployment descriptor tweaks) to precompile and preload a web application into Tomcat? And would it make a noticable difference?
Hi, You can use JSPCompiler that comes with Jasper. Infact we use the same in our production environment, we precompile every JSP, before it gets shipped to production.That it takes several seconds with various shipping products (e.g. Tomcat) is a travesty, and simply indicates that they never bothered to try to make it performant.I set my client's network timeout at 5 seconds because I was told not to make users wait longer. Usually Tomcat makes my client time out on the first request to a JSP that wasn't loaded. My acceptance tests always send the first request twice. Is there an easy way (Ant tasks or deployment descriptor tweaks) to precompile and preload a web application into Tomcat? And would it make a noticable difference?