Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
Main
Tomcat5Logging
Tomcat5Logging_ko




JSPWiki v2.2.33

[RSS]


Hide Menu

Tomcat5Upgrade


Difference between version 25 and version 6:

At line 23 added 13 lines.
!Solution:\\
This may be old news, but for the sake of solving the issue for future generations:\\
Change
{{{
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
}}}
to
{{{
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
}}}
--[ScottDavis]
At line 26 changed 1 line.
<a name="5.0.3"></a> !!Tomcat 5.0.3 (June 23, 2003)
!!Tomcat 5.0.3 (June 23, 2003)
<a name="5.0.3"></a>
At line 43 added 65 lines.
----
!!Tomcat 5.0.4 (July 15, 2003)
<a name="5.0.4"></a>
Tomcat 5.0.4 Alpha [was released|http://jakarta.apache.org/site/news.html#20030715.1] today, and according to [Dave|http://www.rollerweblogger.org/page/roller/20030714#first_usable_tomcat_5_release] it's a useable release. Unfortunately, I cannot get it to work out-of-the-box with [AppFuse]. I'm getting the my favorite error:
{{{
java.sql.SQLException: Cannot load JDBC driver class 'null'
}}}
This app works beautifully in Tomcat 4.1.24 and I can put the exact same directory, appfuse.xml and jdbc driver in common/lib and it works. I've sent a message to the tomcat-user group, but I'm not expecting a response as this question often goes unanswered.
__Update 1:__ I found that adding log4j.jar to $CATALINA_HOME/common/lib solved my problem, but now I get the following error when I start Tomcat and there is no logging to catalina.out:
{{{
log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded).
log4j:WARN Please initialize the log4j system properly.
}}}
;:''Solved no logging by adding my generated log4.properties file to $CATALINA_HOME/common/classes''
__Update 2:__ I had to put appfuse.xml in $CATALINA_HOME/conf/Catalina/localhost. So I guess the context.xml file must go in $CATALINA_HOME/conf/Catalina/localhost, rather than $CATALINA_HOME/webapps. Doh! Now I have to figure out a way to modify my "setup-tomcat" task to detect and deploy appropriately for Tomcat 5. Here is the relevant part:
{{{
<echo level="info">Copying ${webapp.name}.xml to ${tomcat.home}/webapps</echo>
<copy tofile="${tomcat.home}/webapps/${webapp.name}.xml"
file="metadata/web/tomcat-context.xml" />
}}}
----
!!Tomcat 5.0.5 (July 28, 2003)
<a name="5.0.5a"></a>
Everything works the same as it did in Release 5.0.4 Alpha (above).
----
!!Tomcat 5.0.6 (August 4, 2003)
<a name="5.0.6a"></a>
Everything works the same as it did in Release 5.0.5 Alpha (above). A did get a new error about parsing struts-menu.tld, but after looking at the logs, I discovered it's solved by putting log4j.jar in $CATALINA_HOME/common/lib.
To summarize - to install [AppFuse] (or [StrutsResume]) on Tomcat 5.0.4+, perform the following steps:
* Run <code style="font-size: 1.1em; color: green; font-weight: bold">ant setup-tomcat</code>, then <code style="font-size: 1.1em; color: green; font-weight: bold">mv $CATALINA_HOME/webapps/appfuse.xml $CATALINA_HOME/conf/Catalina/localhost/.</code>
* <code style="font-size: 1.1em; color: green; font-weight: bold">cp lib/jakarta-log4j*/dist/lib/log4j*.jar $CATALINA_HOME/common/lib/.</code>
* <code style="font-size: 1.1em; color: green; font-weight: bold">cp build/appfuse/WEB-INF/classes/log4j.properties $CATALINA_HOME/common/classes/.</code>
__Later:__ I discovered (with [Remy's|http://jakarta.apache.org/site/whoweare.html] help) that if I removed ''privileged="true"'' from my &lt;Context&gt; definition - then my Log4j issues went away. I thought that parameter meant that the app used a Realm, but after reading [the documentation|http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html] (Set to true to allow this context
to use container servlets, like the manager servlet), I realize that I'm using it incorrectly.
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\

Back to Tomcat5Upgrade, or to the Page History.