Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Developping with Content Services
mangetak
Hi,
we are working on a project adding new functionalitity to TeamSite 6.1
Every time we change something (Java Class or JSP), we have to rebuild the whole application (using make and then install_webapps.ipl).
The question is, is It possible to configure Tomcat in some way to automatically compile JSPs or java classes every time we change them in /IW-HOME/httpd/webapps/... ?
Thank you very much in advanced.
Find more posts tagged with
Comments
stimpy
The way I approached it is to have a separate web server instance running either on the same machine or different machine.
Pretty much the same way as the example in the cssdk pack. No recompile is required upon changes.
The drawback to that is authentication. You need a valid IWAUTH or user/pass when declaring factory objects (to create CS objects). This is solved if you read the IWAUTH cookie created by TS (provided the web server also sits on the same TS box).
cheers,
Ray
Edited by stimpy on 06/14/04 11:41 PM (server time).
Gregg Faus
mangetak,
Try compiling your web app with the -nojsp_precompile option. If your changes don't show up immediately you'll need to delete the work file(s) located in the servlet daemon directory (e.g. \iw-home\servletd\work\Standalone\localhost\iw-cc). You don't have to delete all of them, just the corresponding file that you're trying to modify.
mangetak
Thanks...
It works for JSPs, but when I try to change customer.jar and update with new classes... I have to shutdown the server.
Migrateduser
Can you elaborate a little more about the nojsp_precompile command, how and where do I use it. Is there some documentation that you can point me to?
Gregg Faus
You can find documentation on this option within the UI Customization Guide. Basically this specifies whether your web application is precompiled (jsp_precompile) or not (nojsp_precompile). With precompilation, all the source code would be compiled into Java byte code and would run faster on initial execution. Conversely, if you don't precompile your web app, each time a new page is requested for the first time, your page will get precompiled and placed into the work directory. Any subsequent requests will use the precompiled version (in work directory). Now I'm not a Java/Tomcat expert, so I'm probably missing a few details, but that is the basic idea.
You would want to use the nojsp_precompile option on a development server so you can test JSP customizations and to build your app faster as precompiling takes a lot of time.
Gregg Faus
mangetak,
How are you building the customer web app? Through the "make_toolkit.ipl" or "install_webapp.ipl"? And what options are you using.
Both of these should restart the servlet daemon. Do you have precompilation turned ON?
Migrateduser
I was looking in version 1.0.0 of the UICG and couldn't find anything on jsp_precompile. I decided to download 1.1.0. Behold, there it is!!
However, I cannot find /make_toolkit.ipl. It's not in iw-home/bin. Do I have to install something else? Is it just missing or is it a part of Teamsite 6.1 and not 6.0.
Gregg Faus
Look at the latest UICG (for TS 6.1). The script make_toolkit.ipl was introduced in 6.1 for faster web app builds and is not present in 6.0. This isn't necessary though for the jsp_precompile option as it was present in 6.0 as an option of install_webapps.ipl.
Migrateduser
Thanks for helping point me in the right direction gfaus. I was having a hard time with how and where to run the command. The 1.0.0 documentation didn't mention anything about being able to run the following (iw-home/install/install_webapps.ipl -nojsp_precompile). This was what was throwing me off.
From the 1.1.0 UICG documentation
-----------------------------------------
Once JSP precompilation has been switched off, it will continue to be off in future rebuilds
of the ContentCenter web application until it is explicitly switched on by issuing:
iw-home/iw-perl/bin/iwperl iw-home/bin/make_toolkit.ipl -jsp_precompile
from iw-home/local/config/lib/content_center/customer_src.
Once JSP precompilation has been switched on, it will continue to be on in future rebuilds
of the ContentCenter web application until it is explicitly switched off again.
Note: JSP precompilation for the ContentCenter web application can also be switched off
and on with -nojsp_precompile and -jsp_precompile flags when invoking the
install script iw-home/install/install_webapps.ipl. These two scripts,
make_toolkit.ipl and install_webapps.ipl will both, when invoked without
one of these flags, respect the current setting of JSP precompilation (on or off),
regardless of which script last set it.