Hi

I had once worked on an application with approximately 40 tags. I had an Ant
task that compiled these tags and build a jar file. Then the ant task would
also deploy it on tomcat and restart the webapp. The webapp restart time was
very low and also client http request servicing was very quick.

What I find strange is the amount of time taken to compile the classes in
your case? I think you have already suggested the improvements, so just try
those out. Please also post the results.

Thanks
Tejas


-----Original Message-----
From: John Cherouvim [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 26, 2006 1:36 PM
To: users@tomcat.apache.org
Subject: JSP 2.0 tag files slowing development/deployment


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete  this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail. 
_____________________________________________________________________

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

Reply via email to