John Topley’s Weblog

Jakarta Struts Demystified On Tomcat

I’ve been working on modifying the Web Forum application so that it runs on the open-source Jakarta Tomcat web container, instead of the proprietary Oracle OC4J application server. Thanks to help from readers Rubén Suárez Alvarez and David B, the modifications are now complete and I’m able to offer a Tomcat-ready source code download.

  • I had to modify the JNDI data source name constant in the BaseDAO class:
/**
 * The name of the JNDI data source.
 */
private static final String JNDI_DATASOURCE = "java:comp/env/jdbc/WebForumDS";
  • I also had to remove the session directive from the start of the JSPs:
<%@ page session="false" %>;
  • Finally, I had to downcast the postcount variable to a String in the author information code block in topic.jsp:
<p class="authorinfo">
  <bean:message key="topic.author.joineddate" arg0="<%=joineddate%>" /><br />
  <bean:message key="topic.author.postcount" arg0="<%=(String) postcount%>" />
</p>

Note that there is some configuration that needs to be performed in order to use Tomcat with a MySQL data source.


Source Code Downloads

To reduce the download sizes, I’ve split the Struts JAR files that go into WEB-INF/lib into a separate download.


Jakarta Struts De-Mystified On Sitepoint

Another major change to the Jakarta Struts De-Mystified series is that I’ve sold the rights to SitePoint. I was approached by SitePoint in early October and asked if I’d be interested in maintaining a Java blog and writing some articles for them. I was impressed by their site and was extremely flattered that they’d asked me. Choosing to get paid for something I was doing anyway wasn’t a hard decision to make. A smiley emoticon

I’ve had to turn down the blog offer because I find it hard enough to find time to maintain this blog, but we agreed that I should continue the Struts series on SitePoint. Note that in no way does this mean the end of Jakarta Struts De-Mystified on this site! What it does mean is that new articles in the series will appear first at SitePoint, and then after at least thirty days they’ll appear here.

I haven’t ruled out writing exclusive Java content for SitePoint in future, just as I haven’t ruled out writing exclusive Java content for this site. I’ll just have to see how it plays out. I already have lots of ideas about where I can take the series and the Web Forum tutorial application in the future, so stay tuned.

Comments

There aren’t any comments on this post. Comments are closed.

Choosing to get paid for something I was doing anyway wasn’t a hard decision to make.


Archives

  • Jan
  • Feb
  • Mar
  • Apr
  • May
  • Jun
  • Jul
  • Aug
  • Sep
  • Oct
  • Nov
  • Dec
  • 2019
  • 2018
  • 2017
  • 2016
  • 2015
  • 2014

More Archives


Sign In