tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Cherouvim ...@eworx.gr>
Subject JSP 2.0 tag files slowing development/deployment
Date Wed, 26 Jul 2006 08:06:16 GMT
Hello

I'm building a mid scale web application for use within an intranet. I'm 
using a custom web framework to handle flow, user input, validations, 
persistence with hibernate and views with JSP and JSP 2.0 tag files. I 
use tomcat 5.0.28 and in particular this feature it has where you can 
write you own tag files in the WEB-INF/tags folder, and tomcat will 
compile them and make them available in the JSPs.

I like this feature because it provides me encapsulation. I can call any 
tag I like with parameters and in addition I also use JSTL and EL which 
allows me to do anything I would ever want on the presentation side of 
the application.

I've used jsp tag files before, in a much smaller application where I 
had something like 10 tags.
Right now I am 50% done with this application and I already have 120 tag 
files to render pojos, fields, various html controls etc. Most tags call 
other tags in order to generate the whole page.
The first (small) problem is that every time I change something on a 
tag, particularly in fine grained tags (which are heavily being used 
from other tags) then tomcat has to recompile everything. It takes 
around 1.5 minutes to do that on my workstation.

The second (big) problem, is when I try to deploy on the client's web 
server (intel xeon with 4 cpus with tomcat 5.0.28). I deploy and tomcat 
starts up in something like 9 seconds. Then I access the application for 
the first time, using a browser, and it takes more than an hour to build 
the work\Catalina\localhost\MY-APPLICATION\org\apache\jsp folder. 
Looking at the generated sources of those tag files it seems to me that 
its taking so much because tomcat has to calculate all the dependencies 
between tags. As soon as everything has compiled, the application runs 
smothly as expected. There are 118 tag files, and the 
work\Catalina\localhost\MY-APPLICATION\org\apache\jsp folder ends up 
with 238 files (one for .java and one for .class) and takes up 2.7mb. I 
don't know why such a fast machine needs so much time to generate 1.47mb 
of source code, and compile it.

This situation is really bad for me and I'd like to know what can I do 
to improve the situation.
1. Would tomcat 5.5.17 improve anything on this issue?
2. Would precompiling the JSPs and tags improve anything?
3. Can I upload my work\Catalina\localhost\MY-APPLICATION folder to the 
client's server and force that tomcat not to re-compile? I tried it and 
it did start compiling the jsps/tags again.
4. Would changing some tags from tag files to proper Java 
javax.servlet.jsp.tagext.Tag classes improve anything?
5. If I package my tag files into a jar, would then tomcat had to do the 
work thing?
6. Should I change to another templating engine, such as Velocity?

thanks,
Ioannis

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message