<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SQUARISM &#187; Java</title>
	<atom:link href="http://squarism.com/category/development/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://squarism.com</link>
	<description>addicted to pixels</description>
	<lastBuildDate>Tue, 20 Jul 2010 15:12:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Data Structures Book</title>
		<link>http://squarism.com/2005/09/19/data-structures-book/</link>
		<comments>http://squarism.com/2005/09/19/data-structures-book/#comments</comments>
		<pubDate>Mon, 19 Sep 2005 15:29:48 +0000</pubDate>
		<dc:creator>Dillon</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://squarism.com/2005/09/19/data-structures-book/</guid>
		<description><![CDATA[On a slashdot thread I was discussing whether I should roll my own data structure or try to use one of the many, many Sun data structures. Someone recommended this book.]]></description>
			<content:encoded><![CDATA[<p>On a slashdot thread I was discussing whether I should roll my own data structure or try to use one of the many, many Sun data structures.</p>
<p>Someone recommended this <a href="http://he-cda.wiley.com/WileyCDA/HigherEdTitle/productCd-0471469831.html">book</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://squarism.com/2005/09/19/data-structures-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spring Framework</title>
		<link>http://squarism.com/2005/08/04/spring-framework/</link>
		<comments>http://squarism.com/2005/08/04/spring-framework/#comments</comments>
		<pubDate>Thu, 04 Aug 2005 18:09:35 +0000</pubDate>
		<dc:creator>Dillon</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://squarism.com/2005/08/04/spring-framework/</guid>
		<description><![CDATA[Researching this Spring Framework. Most interesting so far is it's touting of being modular. As in, you might only use it for a single feature and it wouldn't be bloated.]]></description>
			<content:encoded><![CDATA[<p>Researching this <a href="http://www.theserverside.com/articles/article.tss?l=SpringFramework">Spring  Framework</a>.  Most interesting so far is it's touting of being modular.  As in, you might only use it for a single feature and it wouldn't be bloated.</p>
]]></content:encoded>
			<wfw:commentRss>http://squarism.com/2005/08/04/spring-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>swt, eclipse and OS X problems</title>
		<link>http://squarism.com/2004/01/17/swt-eclipse-and-os-x-problems/</link>
		<comments>http://squarism.com/2004/01/17/swt-eclipse-and-os-x-problems/#comments</comments>
		<pubDate>Sat, 17 Jan 2004 23:37:45 +0000</pubDate>
		<dc:creator>Dillon</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://squarism.com/2004/01/17/swt-eclipse-and-os-x-problems/</guid>
		<description><![CDATA[Following a hello world tutorial, I got stuck on this error: java.lang.UnsatisfiedLinkError: no swt-carbon-3034 Couldn't find anything so I thought I'd post the fix for someone like me out there: Found it from an unusual source. Seems I couldn't get the VM parameters to work so I have to do SWT's not recommended suggestion of [...]]]></description>
			<content:encoded><![CDATA[<p>Following a hello world tutorial, I got stuck on this error:</p>
<pre>
java.lang.UnsatisfiedLinkError: no swt-carbon-3034
</pre>
<p>Couldn't find anything so I thought I'd post the fix for someone like me out there:</p>
<p>Found it from an <a href="http://llama.logos.k.u-tokyo.ac.jp/~simokawa/archives/000247.html">unusual source</a>.  Seems I couldn't get the VM parameters to work so I have to do SWT's not recommended suggestion of copying the file to the jre bin path.  <b>Although they never gave the file or the path!</b> (I'm going to send them an email.)</p>
<p>Just do this:</p>
<pre>
cp [path to libswt-carbon-3034.jnilib] \
/System/Library/Frameworks/JavaVM.framework/Versions/1.4.1/Libraries/
</pre>
<p>Note that libswt-carbon-3034.jnilib is version dependant.  It could be named libswt-carbon "anything" .jnilib.  I found in [ECLIPSE HOME] /plugins/org.eclipse.swt.carbon_3.0.0/os/macosx/ppc</p>
]]></content:encoded>
			<wfw:commentRss>http://squarism.com/2004/01/17/swt-eclipse-and-os-x-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validation Action</title>
		<link>http://squarism.com/2003/11/15/validation-action/</link>
		<comments>http://squarism.com/2003/11/15/validation-action/#comments</comments>
		<pubDate>Sun, 16 Nov 2003 00:46:11 +0000</pubDate>
		<dc:creator>Dillon</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://squarism.com/2003/11/15/validation-action/</guid>
		<description><![CDATA[Finished coding a validation action that parses a word followed by an array of words. For example, "ABC" would validate if "Another Bad Creation" was passed with it. This is going to be used in the ever complicated Acronym project that has been taking me forever to finish. It's case insensitive, you can see the [...]]]></description>
			<content:encoded><![CDATA[<p>Finished coding a validation action that parses a word followed by an array of words.  For example, "ABC" would validate if "<b>A</b>nother <b>B</b>ad <b>C</b>reation" was passed with it.  This is going to be used in the ever complicated Acronym project that has been taking me forever to finish.</p>
<p>It's case insensitive, you can see the usage example in the 'main' class.<br />
<span id="more-29"></span></p>
<pre>

/*
 * Created on Sep 20, 2003
 *
 */

/**
 * @author chris
 *
 */
public class ValidateThing {

	private String acronym;
	private String[] answer;

	/**
	 * @param string
	 * @param values
	 * This object is used for validating the acronym
	 * it parses 'string' and checks the first letter
	 * of 'values'.  It should return 1 if the string
	 * passes, 0 if it doesn't.
	 */
	public ValidateThing(String string, String[] values) {
		acronym = string;
		answer = values;
	}

	public boolean isValid() {

		// keep a record of mistakes
		int errorCount = 0;

		// validate length
		if (acronym.length() != answer.length) {
			errorCount++; // wrong number of answers
		}

		// validate letter content
		try {

			// process string one character at a time
			for (int i = 0; i <acronym> 0) {
			return false;
		} else {
			return true;
		}
	}

	// cheap unit test
	public static void main(String[] args) {
		String acronym = new String("java");
		String[] values =
			new String[] { "JUst", "another", "vague", "acronym" };
		ValidateThing validateThing = new ValidateThing(acronym, values);

		if (validateThing.isValid()) {
			System.out.println("yay!");
		} else {
			System.out.println("boo!");
		}
	}

}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://squarism.com/2003/11/15/validation-action/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mathematical constant e generator in Java</title>
		<link>http://squarism.com/2003/04/30/mathematical-constant-e-generator-in-java/</link>
		<comments>http://squarism.com/2003/04/30/mathematical-constant-e-generator-in-java/#comments</comments>
		<pubDate>Thu, 01 May 2003 04:59:53 +0000</pubDate>
		<dc:creator>Dillon</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://squarism.com/2003/04/30/mathematical-constant-e-generator-in-java/</guid>
		<description><![CDATA[A small class to generate the mathematical constant "e". Complete with timer and digits per second clock. Unpolished. Here's a quick benchmark and you can see that it doesn't scale. import java.math.BigDecimal; import java.math.BigInteger; import java.util.Date; /** * calculate mathmatical constant e */ public class ECalculator { private static final int numberOfDigits = 1000; public [...]]]></description>
			<content:encoded><![CDATA[<p>A small class to generate the mathematical constant "e".  Complete with timer and digits per second clock.  Unpolished.  Here's a quick benchmark and you can see that it doesn't scale.</p>
<p><img src="/files/eBenchmark.png"></p>
<pre>
import java.math.BigDecimal;<br />
import java.math.BigInteger;<br />
import java.util.Date;</p>
<p>/**<br />
 * calculate mathmatical constant e<br />
 */</p>
<p>public class ECalculator {<br />
	private static final int numberOfDigits = 1000;<br />
	public static void main(String[] args) {<br />
		ECalculator myEClass = new ECalculator();<br />
		System.out.println("Calculating e to " + numberOfDigits + " digits ...\n");<br />
		Date start = new Date();<br />
		BigDecimal e = myEClass.doCalculation();<br />
		Date stop = new Date();<br />
		long elapsedSeconds = (stop.getTime()-start.getTime()) / 1000;<br />
		System.out.println("e is: \n" + e);<br />
		if (elapsedSeconds </p>
]]></content:encoded>
			<wfw:commentRss>http://squarism.com/2003/04/30/mathematical-constant-e-generator-in-java/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Made useful build.xml file for use with Ant</title>
		<link>http://squarism.com/2003/04/21/made-useful-buildxml-file-for-use-with-ant/</link>
		<comments>http://squarism.com/2003/04/21/made-useful-buildxml-file-for-use-with-ant/#comments</comments>
		<pubDate>Mon, 21 Apr 2003 05:30:47 +0000</pubDate>
		<dc:creator>Dillon</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://squarism.com/2003/04/21/made-useful-buildxml-file-for-use-with-ant/</guid>
		<description><![CDATA[The following build.xml file has a few targets that make compiling a project much simplier. Read on for more details. I have the following directory structure: (chris@hobbes)-(BackupLink)$ ls -l total 20 drwxrwxr-x 3 chris chris 4096 Apr 21 00:07 bin -rw-rw-r-- 1 chris chris 2776 Apr 21 00:15 Build.xml drwxrwxr-x 2 chris chris 4096 Apr [...]]]></description>
			<content:encoded><![CDATA[<p>The following build.xml file has a few targets that make compiling a project much simplier.  Read on for more details.</p>
<p>I have the following directory structure:</p>
<pre>
(chris@hobbes)-(BackupLink)$ ls -l
total 20
drwxrwxr-x    3 chris    chris        4096 Apr 21 00:07 bin
-rw-rw-r--    1 chris    chris        2776 Apr 21 00:15 Build.xml
drwxrwxr-x    2 chris    chris        4096 Apr 13 19:07 CVS
drwxrwxr-x    2 chris    chris        4096 Apr 20 14:32 include
drwxrwxr-x    4 chris    chris        4096 Apr 21 00:06 src
</pre>
<p>
In Eclipse, I set the project preference to make [project root]/src the only folder on the source path.  Lastly, I set bin to be the output folder.  The ant script grabs any jars out of include (mostly useless to me).
</p>
<p>
When I want to create a jar, I just run the jar target.  I removes the java source files before creating the jar archive.  You can also increment the version number to create 'releases'.  This is the best I can come up with right now.
</p>
<pre>
&lt;?xml version='1.0'?&gt;

&lt;project name=&quot;BackupLink&quot; default=&quot;jar&quot; basedir=&quot;.&quot;&gt;
	&lt;!-- set global properties for this build --&gt;
	&lt;property name=&quot;version&quot; value=&quot;0.1&quot; /&gt;
	&lt;property name=&quot;src&quot; value=&quot;src&quot;/&gt;
	&lt;property name=&quot;build&quot; value=&quot;build&quot;/&gt;
	&lt;property name=&quot;jarname&quot; value=&quot;backUplink.${version}.jar&quot;/&gt;
	&lt;property name=&quot;docs&quot; value=&quot;docs&quot;/&gt;
	&lt;property name=&quot;include&quot; value=&quot;include&quot;/&gt;
	&lt;property name=&quot;lib&quot;  value=&quot;lib&quot;/&gt;
	&lt;property name=&quot;runclass&quot; value=&quot;com.squarism.backUplink.BackUplink&quot;/&gt;
	&lt;property name=&quot;classpath&quot;  value=&quot;classes&quot;/&gt;
	&lt;target name=&quot;init&quot;&gt;
	    &lt;!-- Create the build directory structure used by compile --&gt;
	    &lt;mkdir dir=&quot;${build}&quot; /&gt;
	    &lt;mkdir dir=&quot;${build}/classes&quot; /&gt;
		&lt;!-- Create the directory for the jar file --&gt;
	    &lt;mkdir dir=&quot;${lib}&quot; /&gt;
		&lt;!-- Create the directory for the java docs --&gt;
	    &lt;mkdir dir=&quot;${docs}&quot; /&gt;
	&lt;/target&gt;
	&lt;target name=&quot;compile&quot; depends=&quot;init&quot;&gt;
		&lt;!-- copy all .java files from ${src} to ${build}  --&gt;
		&lt;copy todir=&quot;${build}/&quot;&gt;
			&lt;fileset dir=&quot;${src}&quot; /&gt;
			&lt;!-- apply a substitution @version@ with the value of ${version} --&gt;
			&lt;filterset&gt;
				&lt;filter token=&quot;version&quot; value=&quot;${version}&quot;/&gt;
			&lt;/filterset&gt;
		&lt;/copy&gt;
		&lt;!-- run javac to compile the source files --&gt;
		&lt;javac srcdir=&quot;${build}&quot; destdir=&quot;${build}&quot;&gt;
			&lt;classpath&gt;
				&lt;!-- use the value of the ${classpath} property in the classpath --&gt;
				&lt;pathelement path=&quot;${classpath}&quot;/&gt;
				&lt;!-- include all jar files  --&gt;
				&lt;fileset dir=&quot;${include}&quot;&gt;
					&lt;include name=&quot;**/*.jar&quot;/&gt;
				&lt;/fileset&gt;
			&lt;/classpath&gt;
		&lt;/javac&gt;
	&lt;/target&gt;
	&lt;target name=&quot;jar&quot; depends=&quot;compile&quot;&gt;
		&lt;delete&gt;
			&lt;fileset dir=&quot;${build}&quot; includes=&quot;**/*.java&quot;&gt;&lt;/fileset&gt;
		&lt;/delete&gt;
	    &lt;!-- make a jar file --&gt;
	    &lt;jar jarfile=&quot;${lib}/${jarname}&quot; basedir=&quot;${build}&quot; manifest=&quot;${build}/manifest&quot; /&gt;
	&lt;/target&gt;
	&lt;target name=&quot;run&quot; depends=&quot;jar,docs&quot;&gt;
		&lt;!-- run the class --&gt;
		&lt;java classname=&quot;${runclass}&quot;&gt;
			&lt;!-- add a command line arg: &lt;arg value=&quot;-h&quot;/&gt; --&gt;
			&lt;classpath&gt;
				&lt;!-- use the value of the ${classpath} property in the classpath --&gt;
				&lt;pathelement path=&quot;${classpath}&quot;/&gt;
				&lt;!-- include all jar files  --&gt;
				&lt;fileset dir=&quot;${include}&quot;&gt;
					&lt;include name=&quot;**/*.jar&quot;/&gt;
				&lt;/fileset&gt;
				&lt;fileset dir=&quot;${lib}&quot;&gt;
					&lt;include name=&quot;**/*.jar&quot;/&gt;
				&lt;/fileset&gt;
			&lt;/classpath&gt;
       &lt;/java&gt;
	&lt;/target&gt;
	&lt;target name=&quot;docs&quot; depends=&quot;compile&quot;&gt;
		&lt;!-- create javadocs --&gt;
		&lt;javadoc packagenames=&quot;com.squarism.backUplink.*&quot;
		sourcepath=&quot;${build}&quot;
		defaultexcludes=&quot;yes&quot;
		destdir=&quot;${docs}&quot;
		author=&quot;true&quot;
		version=&quot;true&quot;
		use=&quot;true&quot;
		windowtitle=&quot;BackUplink API Documentation Version: ${version}&quot;&gt;
		&lt;/javadoc&gt;
	&lt;/target&gt;
	&lt;target name=&quot;clean&quot;&gt;
		&lt;delete dir=&quot;${build}&quot;/&gt;
		&lt;delete dir=&quot;${docs}&quot;/&gt;
		&lt;delete dir=&quot;${lib}&quot;/&gt;
	&lt;/target&gt;
&lt;/project&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://squarism.com/2003/04/21/made-useful-buildxml-file-for-use-with-ant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Acronym Project &#8211; Ant and Eclipse</title>
		<link>http://squarism.com/2003/03/30/acronym-project-ant-and-eclipse/</link>
		<comments>http://squarism.com/2003/03/30/acronym-project-ant-and-eclipse/#comments</comments>
		<pubDate>Sun, 30 Mar 2003 17:21:00 +0000</pubDate>
		<dc:creator>Dillon</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://squarism.com/2003/03/30/acronym-project-ant-and-eclipse/</guid>
		<description><![CDATA[Having some problems getting Ant running the way I want to. It's another question of whether the IDE (Eclipse) is being too inflexible or if I'm not doing something right. Eclipse doesn't ship with functionality that allows ant build options. Here's a log of what I've been trying. Trying to get Cactus / JUnit automated. [...]]]></description>
			<content:encoded><![CDATA[<p>Having some problems getting Ant running the way I want to.  It's another question of whether the IDE (Eclipse) is being too inflexible or if I'm not doing something right.  Eclipse doesn't ship with functionality that allows  ant build options.  Here's a log of what I've been trying.<br />
<span id="more-19"></span></p>
<p>
Trying to get Cactus / JUnit automated.  Added this to my build.xml:</p>
<pre>
  &lt;target name="junit.cactus"&gt;
  	&lt;junit printsummary="yes" haltonfailure="yes" haltonerror="yes" fork="yes" /&gt;
  	&lt;classpath refid="classpath.project" /&gt;
  	&lt;formatter type="plain" usefile="false" /&gt;
  	&lt;batchtest fork="yes" todir="build"&gt;
  		&lt;fileset dir="src"&gt;
		  	&lt;include name="**Test*.java" /&gt;
	  	&lt;/fileset&gt;
  	&lt;/batchtest&gt;
  &lt;/target&gt;
</pre>
<p>But it seems that the Eclipse Ant pluging doesn't ship with the junit jar/functionality.  So I went to Preferences and tried to set my ANT_HOME to be my external install of ant (1.5.2).  When I looked at the build.xml file again in Eclipse, I got this horrible error:</p>
<pre>
Buildfile: /home/chris/workspace/AcronymChallenge/acronym/WEB-INF/build.xml
BUILD FAILED: java.lang.VerifyError: (class: org/apache/xerces/parsers/IntegratedParserConfiguration, method: configurePipeline signature: ()V) Incompatible type for getting or setting field
Total time: 206 milliseconds
</pre>
<p>After some research, I'm thinking that the cause of the problem is conflicting Xerces classes.  Eclipse must include Xerces somewhere as a part of it's core libraries (like under [Eclipse_Install_Dir]/plugins/org.apache.ant_1.5.2).  So I was at a dead end.  I signed up for an <a href="http://www.eclipse.org/newsgroups/index.html">Eclipse newsgroup account</a> and hit the archives.  I found this.</p>
<pre>
You are correct Christian.

The ant.jar and optional.jar provided with the Ant 1.5.* distributions
contain a manifest file that has classpath entries for the Xerces JARs.
If these JARs are in the same location as the ant.jar or optional.jar, these
Xerces JARs will be used to load the Xerces classes.

The classpath manifest entry has been removed in the Ant 1.6.* distribution.

HTH
Darins

"Christian van der Leeden"  wrote in message
news:b4kubc$tog$1@rogue.oti.com...
&gt; Hi,
&gt;
&gt; I'm getting this behaviour even when
&gt; following the advice from the build notes.
&gt; You will have to remove the files from the file system
&gt; (just removing them from the runtime panel in the preferences
&gt; won't help, this is with ANT_HOME set).
&gt;
&gt; Christian
&gt;
&gt;
&gt;
&gt;
&gt;
&gt; Darin Swanson wrote:
&gt; &gt; From the build notes for 20030306:
&gt; &gt; Note: Adding the Xerces JARs to your runtime Ant classpath is no longer
&gt; &gt; required. In fact, adding these JARs can cause problems. The Xerces
classes
&gt; &gt; are loaded from the Xerces plugin provided with Eclipse.
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; This change is a result of fixes for bugs:
&gt; &gt;
&gt; &gt; http://bugs.eclipse.org/bugs/show_bug.cgi?id=33117
&gt; &gt;
&gt; &gt; http://bugs.eclipse.org/bugs/show_bug.cgi?id=33664
&gt; &gt;
&gt; &gt; HTH
&gt; &gt; Darins
&gt; &gt;
&gt; &gt; "Christian van der Leeden"  wrote in message
&gt; &gt; news:b4kmk8$mq1$1@rogue.oti.com...
&gt; &gt;
&gt; &gt;&gt;Hi,
&gt; &gt;&gt;
&gt; &gt;&gt;when setting the ANT_HOME directory to my normal
&gt; &gt;&gt;ant 1.5.2 installation I get an error inside the "Run Ant..."
&gt; &gt;&gt;panel (which appears context sensitive for the build.xml file)
&gt; &gt;&gt;It says in the top panel:
&gt; &gt;&gt;(class org.apache.xerces.parsers.IntegratedParserConfiguration, method:
&gt; &gt;&gt;configurePipeline
&gt; &gt;&gt;signature()V) Incompatible for getting or setting field).
&gt; &gt;&gt;
&gt; &gt;&gt;When deleting the xercesImpl.jar and xml-apis.jar this problem goes
&gt; &gt;&gt;away. Is this related to:
&gt; &gt;&gt;http://bugs.eclipse.org/bugs/show_bug.cgi?id=33117 ?
&gt; &gt;&gt;
&gt; &gt;&gt;Thanks
&gt; &gt;&gt;
&gt; &gt;&gt;Christian
&gt; &gt;&gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt;
</pre>
<p>So then I attemped to use Ant 1.6 (alpha).  I got the same error.  I tried to remove xercesImpl.jar from the filesystem but then got:</p>
<pre>
Buildfile: /home/chris/workspace/AcronymChallenge/acronym/WEB-INF/build.xml
BUILD FAILED: Target `(class: org/apache/xerces/parsers/IntegratedParserConfiguration' does not exist in this project.
Total time: 243 milliseconds
</pre>
<p>So I tried a series of adding jars, removing jars, editing plugins, adding a junit task under the Ant Perferences.  Nothing seemd to work.  I finally found this suggestion:</p>
<pre>
&lt;requires&gt;
	&lt;import plugin="org.apache.xerces"/&gt;
&lt;/requires&gt;

To:

&lt;requires&gt;
	&lt;import plugin="org.apache.xerces"/&gt;
	&lt;import plugin="org.junit"/&gt;
&lt;/requires&gt;

This should make the junit ant task work ;-)
</pre>
<p>The ant task is there, it just doesn't seem to do anything.  The build is displayed as <b>successful</b> but I know that most of my tests fail.  Now I'm questioning what I'm actually trying to accomplish.  Although I have junit as an Ant task, Eclipse doesn't have the tight integration I wanted.  I'm going to play with Ant outside of Eclipse and/or use Eclipse's integrated JUnit plugin for TestSuites.</p>
]]></content:encoded>
			<wfw:commentRss>http://squarism.com/2003/03/30/acronym-project-ant-and-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Acronym Controller &#8211; cookies</title>
		<link>http://squarism.com/2003/03/29/acronym-controller-cookies/</link>
		<comments>http://squarism.com/2003/03/29/acronym-controller-cookies/#comments</comments>
		<pubDate>Sun, 30 Mar 2003 04:44:39 +0000</pubDate>
		<dc:creator>Dillon</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://squarism.com/2003/03/29/acronym-controller-cookies/</guid>
		<description><![CDATA[Update on new functionality. Received my XP programming book in the mail. It is fabulous. I spent all day reading it. Wonderfully written. Great advice. Real world examples and overviews. With XP advice in belt, I cleaned up many things in the Voting actions and I have cookies working to prevent people from voting twice [...]]]></description>
			<content:encoded><![CDATA[<p>Update on new functionality.<br />
<span id="more-18"></span></p>
<p>
Received my <a href="http://www.oreilly.com/catalog/jextprockbk/">XP programming book</a> in the mail.  It is fabulous.  I spent all day reading it.  Wonderfully written.  Great advice.  Real world examples and overviews.
</p>
<p>
With XP advice in belt, I cleaned up many things in the Voting actions and I have cookies working to prevent people from voting twice on an acronym response.  I'll post an updated version soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://squarism.com/2003/03/29/acronym-controller-cookies/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Acronym Challenge Demo</title>
		<link>http://squarism.com/2003/02/28/acronym-challenge-demo/</link>
		<comments>http://squarism.com/2003/02/28/acronym-challenge-demo/#comments</comments>
		<pubDate>Sat, 01 Mar 2003 03:15:08 +0000</pubDate>
		<dc:creator>Dillon</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://squarism.com/2003/02/28/acronym-challenge-demo/</guid>
		<description><![CDATA[I've deployed the 1st version of the Acronym Challenge webapp to the server at this location. The controller passes off the request to an Action class. The URL is preserved because it forwards the whole request object along to the action object. See the code below: action.perform(this, req, res); The action object above is an [...]]]></description>
			<content:encoded><![CDATA[<p>
I've deployed the 1st version of the Acronym Challenge webapp to the server at <a href="http://www.fuzzylemon.net:8080/acronym/controller">this location</a>.
</p>
<p><span id="more-14"></span></p>
<p>
The controller passes off the request to an Action class.  The URL is preserved because it forwards the whole request object along to the action object.  See the code below:
</p>
<pre>
action.perform(this, req, res);
</pre>
<p>
The action object above is an interface.  Action objects have to have this perform method in it.  'this' refers to the servlet itself so the hand off is transparent (by design).  The user is handed off to an Action servlet based on the URL (hover over the plus and minus signs to see the href) and then forwarded back to the controller in one motion.</p>
]]></content:encoded>
			<wfw:commentRss>http://squarism.com/2003/02/28/acronym-challenge-demo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customized Ant Within Eclipse</title>
		<link>http://squarism.com/2003/02/28/customized-ant-within-eclipse/</link>
		<comments>http://squarism.com/2003/02/28/customized-ant-within-eclipse/#comments</comments>
		<pubDate>Fri, 28 Feb 2003 05:13:56 +0000</pubDate>
		<dc:creator>Dillon</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://squarism.com/2003/02/28/customized-ant-within-eclipse/</guid>
		<description><![CDATA[Restarting Tomcat everytime I deployed with the Lomboz Eclipse plugin was proving to be too lengthy, so I set out trying to customize Ant a bit. The following files were edited from the Lomboz generated webapp defaults. ie: create a project and edit the files found under WEB-INF. The generated Ant config files copy all [...]]]></description>
			<content:encoded><![CDATA[<p>
Restarting Tomcat everytime I deployed with the <a href="">Lomboz Eclipse plugin</a> was proving to be too lengthy, so I set out trying to customize Ant a bit.
</p>
<p><span id="more-13"></span></p>
<p>
The following files were edited from the Lomboz generated <i>webapp</i> defaults.  ie: create a project and edit the files found under WEB-INF.
</p>
<p>
The generated Ant config files copy all the compiled classes (redundant), the plain JSPs and all directories under WEB-INF to a temporary space  jars it all up and copies that JAR to the webapp folder in tomcat.  I didn't want that.  I just want the directory structure to be copied so that I can make changes faster and shorten my testing lifecycle (ooo buzzword).
</p>
<p>
Here's my build.properties:</p>
<pre>
domain = /home/chris/jakarta-tomcat-4.1.12-LE-jdk14/webapps
serverhome = /home/chris/jakarta-tomcat-4.1.12-LE-jdk14/
build = ../../acronym/WEB-INF/classes
webapp = acronym
</pre>
</p>
<p>
And here's my build.xml:</p>
<pre>
&#60;project name="AcronymChallenge"  default="deploy"  basedir="."&#62;

  &#60;!-- set global properties for this build --&#62;
  &#60;property file="build.properties"/&#62;
  &#60;property name="dist" value="${domain}/${webapp}" /&#62;
  &#60;property name="web" value="../" /&#62;

  &#60;target name="init"&#62;
    &#60;!-- Create the dist directory structure used by compile
         and copy the deployment descriptors into it--&#62;
    &#60;mkdir dir="${dist}"/&#62;
    &#60;mkdir dir="${dist}/WEB-INF"/&#62;
    &#60;mkdir dir="${dist}/WEB-INF/classes"/&#62;
    &#60;mkdir dir="${dist}/WEB-INF/lib"/&#62;
    &#60;copy todir="${dist}"&#62;
      &#60;fileset dir="${web}"&#62;
        &#60;include name="**/*.*"/&#62;
        &#60;exclude name="**/jsp_servlet/*.class"/&#62;
        &#60;exclude name="**/build.xml"/&#62;
        &#60;exclude name="**/build.properties"/&#62;
        &#60;exclude name="**/servers.xml"/&#62;
        &#60;exclude name="**/container.xml"/&#62;
        &#60;exclude name="**/*.war"/&#62;
      &#60;/fileset&#62;
    &#60;/copy&#62;
    &#60;copy todir="${dist}/WEB-INF/classes"&#62;
      &#60;fileset dir="${build}"&#62;
        &#60;include name="**/*.*"/&#62;
        &#60;exclude name="**/jsp_servlet/*.class"/&#62;
      &#60;/fileset&#62;
    &#60;/copy&#62;

  &#60;/target&#62;

  &#60;target name="deploy" depends="undeploy,init" &#62;
	&#60;copy todir="${dist}"&#62;
		&#60;fileset dir="${web}"&#62;
        &#60;include name="**/*.*"/&#62;
        &#60;exclude name="**/jsp_servlet/*.class"/&#62;
        &#60;exclude name="**/build.xml"/&#62;
        &#60;exclude name="**/build.properties"/&#62;
        &#60;exclude name="**/servers.xml"/&#62;
        &#60;exclude name="**/container.xml"/&#62;
        &#60;exclude name="**/*.war"/&#62;
      &#60;/fileset&#62;
    &#60;/copy&#62;
    &#60;copy todir="${dist}/WEB-INF/classes"&#62;
      &#60;fileset dir="${build}"&#62;
        &#60;include name="**/*.*"/&#62;
        &#60;exclude name="**/jsp_servlet/*.class"/&#62;
      &#60;/fileset&#62;
    &#60;/copy&#62;
  &#60;/target&#62;

  &#60;target name="undeploy"&#62;
  &#60;!-- Tomcat --&#62;
  &#60;delete dir="${domain}/${webapp}"/&#62;
  &#60;!-- Tomcat 4.0.x--&#62;
  &#60;delete dir="${serverhome}/work/localhost/${webapp}"/&#62;
  &#60;!-- Tomcat 4.1.x--&#62;
  &#60;delete dir="${serverhome}/work/Standalone/localhost/${webapp}"/&#62;

  &#60;/target&#62;

&#60;/project&#62;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://squarism.com/2003/02/28/customized-ant-within-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
