RSS Feed
15
October
2003

What's coming in JDK 1.4.2?

Posted by woeye | Comments: 0

Read this article and you will know =)

15
October
2003

Tips 'n' Tricks: Prevent NullPointerException in string comparison

Posted by woeye | Comments: 2

Very often I read the following statement:

if (someString.equals("foo")) ...
Now if someString is null this code would produce a nasty NullPointerException. One solution might be:
if ((someString != null) && someString.equals("foo")) ...
But there's a better way:
if ("foo".equals(someString)) ...

Very easy =)

15
October
2003

Back from holidays

Posted by woeye | Comments: 0

I had some very nice three weeks in Sachsen, Germany. The weather was great and we had a lot of sun. I had a lot of fun riding on my race bike through the beatiful landscape of Sachsen.

Meanwhile Don Brown contacted me and we talked about integrating my IoC stuff into struts.sf.net. Before we can add the sources we must tune them a little bit first, e.g. package renaming, code style and moving from log4j to commons-logging. Fortunately there are only a handful of files to touch so I think we can add the sources very soon.

15
October
2003

Next version of my engine almost done

Posted by woeye | Comments: 0

For the last weeks I was busy on rewriting several parts of my engine. I decided to drop EJBs completely because this way it is possible to use my engine in Tomcat as well. Furthermore I am quite sure that I won't need clustering support any time soon =) The result of the work is a much easier and simplier codebase. Migration to Hibernate 2.0.1 is worth mentioning as well.

15
October
2003

JBoss, Jetty, welcome-file and index.do

Posted by woeye | Comments: 4

Unfortunately it is a little bit tricky to get the default welcome file index.do working with Struts and Jetty. Suppose you have th following web.xml:

...
<welcome-file-list>
  <welcome-file>index.do</welcome-file>
</welcome-file-list>
...
and you have configured the ActionServlet to listen on *.do requests. Then you would assume that
http://some.url.com/index.do
would work? Right? No! I guess the problem is that the default servlet (which handles the welcome-file stuff) looks for the file index.do on the filesystem. Unless there is no such file the ActionSerlvet will never be called.
The trick is to simply add an empty index.do file in the root directory of your WAR. That's it =)

« 1 2 3 ...  25 26 27 28 29 30 »