Java
Java Power
daniel Fri, 03/30/2007 - 2:19pm
A truly excellent series of books from the Pragmatic Programmers.
- Read more about Java Power
- Log in to post comments
Ant Tools
daniel Fri, 03/30/2007 - 2:12pm
Create a project Skeleton with Megg
Create a visual dependency map of your Ant File with Grand
- you'll need Graphviz to use Grand with Command Line
Now automate the Build Process with CruiseControl
- Read more about Ant Tools
- Log in to post comments
Java 5 on OpenBSD
daniel Thu, 03/29/2007 - 6:06pm
Say Hello To Java 5 On OpenBSD/amd64
http://www.undeadly.org/cgi?action=article&sid=20060518065549
Thank you Kurt and others who helped this come true.
I have just now today succeeded in building a JDK 1.5 on
a OpenBSD 3.9-current snapshot!
I installed a snapshot with kernel on a "clean machine":
OpenBSD 3-9-current (GENERIC) Sun May 28
- installed all base packages including X
I then fetched ports sources and went into /usr/ports/devel/jdk/1.5
and typed make install
It took some hours compiling dependencies yesterday and
took about two hours building the JDK package today.
Timing on a Athlon64 2GHz with slow IDE disk:
JDK compile today from 09:15 until 11:21, with a short break
needing "ulimit -d 1000000" and restart
- Read more about Java 5 on OpenBSD
- Log in to post comments
Design Patterns
daniel Wed, 02/28/2007 - 12:26pm
The Design Patterns Java Companion
Enterprise Integration Patterns enterpriseintegrationpatterns.com
- Read more about Design Patterns
- Log in to post comments
Display Session and Parameters
daniel Wed, 02/21/2007 - 1:17pm
private void displaySessionAndParams(HttpServletRequest request) {
// Use with following: displaySessionAndParams(request);
// What do the session & params look like? - Display in Console Output
System.out.println("This is the Session:");
for (Enumeration e = request.getSession().getAttributeNames(); e
.hasMoreElements();) {
String attrib = new String(e.nextElement().toString());
System.out.println("SessionAttribute: " + attrib);
System.out.println(request.getSession().getAttribute(attrib));
System.out.println("-");
}
System.out.println("END SESSION");
System.out.println("-");
System.out.println("Selected Local Vars:");
// System.out.println(id);
System.out.println("END Local Vars");
System.out.println("-");
System.out.println("These are the Form Parameters:");
for (Enumeration f = request.getParameterNames(); f.hasMoreElements();) {
String paramet = new String(f.nextElement().toString());
System.out.println("FormParameter: " + paramet);
System.out.println(request.getParameter(paramet));
System.out.println("-");
}
System.out.println("END FORM PARAMETERS");
}
- Read more about Display Session and Parameters
- 1 comment
- Log in to post comments
JSP - JSTL and tags for each example
daniel Wed, 02/21/2007 - 1:11pm
<ul>
<c:forEach var="output" items="${statusTypes}">
<li><c:out value="${output}"/></li>
</c:forEach>
</ul>
- Read more about JSP - JSTL and tags for each example
- Log in to post comments
Compare two Objects
daniel Wed, 02/21/2007 - 1:08pm
class StatusComparator implements Comparator
{
// Compare two Objects. Callback for sort.
// effectively returns a-b;
// e.g. +1 (or any +ve number) if a > b
// 0 if a == b
// -1 (or any -ve number) if a < b
public final int compare ( Object a, Object b )
{
String oa = ((objectclass) a).getter();
String ob = ((objectclass) b).getter();
System.out.println("A:"+oa+". "+"B:"+ob+". ");
return ((oa).compareTo(ob));
} // end compare
} // end class StringComparator
- Read more about Compare two Objects
- Log in to post comments
Setting up a Java Development Environment in Windows
daniel Mon, 02/19/2007 - 7:58pm
Remove everything from classpath in windows to get ant, tomcat, and jboss behaving properly.
Add Environment Variables
Add ant to path
add ANT_HOME =c:\ant
add CATALINA_HOME = c:\tomcat
add JAVA_HOME = c:\program files\java\jdk1.5.0_10
