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)
Problem adding servlet to Content Center Web App
Bill Klish
TeamSite 6.1 SP1, TeamSite 6.1 SP2
Windows 2003
Not sure if this should be posted in the developer suite forum, but I am working on adding a simple servlet to the content center web app. However, I am getting an error when I run make_toolkit.ipl that is very strange. If I attempt to use log4j within any servlet, I get the following message:
import org.apache.log4j.*;
org.apache.log4j does not exist
If i import the same path into a JSP page, it compiles and logs appropriately.
I attempted to use it in one of the servlets in the customer_samples toolkit and had the same problem.
Is there something screwy with the class paths in the make_tooklit.ipl or build.xml file that is not giving proper access to the class path? Has anyone else run into this.
Find more posts tagged with
Comments
bhall
I just had the same problem and addressed it by adding a reference to the log4j.jar in the reference build.xml.
That is, I made the following addition in C:\iw-home\local\config\lib\content_center\reference\build.xml
<target name="compile" depends="init"
description="Create the toolkit's .jar from source files">
<mkdir dir="${output}/src" />
<javac srcdir="${sourceDir}"
destdir="${output}/src"
excludes="**/*.properties"
deprecation="on" >
<classpath>
<pathelement path="${iw-home}/servletd/common/lib/jsp-api.jar"/>
<pathelement path="${iw-home}/servletd/common/lib/servlet-api.jar" />
<pathelement path="${iw-home}/cssdk/cssdkiface.jar" />
<pathelement path="${iw-home}/httpd/webapps/content_center/WEB-INF/lib/log4j.jar" />
<fileset dir="lib" />
<pathelement path="${output}/src"/>
</classpath>
</javac>
I'd appreciate any comments on whether that was the right way to go.
Thanks,
Ben Hall
Bill Klish
Sorry I never responded to this. I added the customer_src/lib directory to build.xml to account for log4j or any other jars that were referenced in the future.