Why you should add the encoding property to your javac ant task
Yesterday I compiled a project on my iBook and deployed the resulting jar files. Today the customer called me and told me that the CSV parser wasn't working anymore. After some research I found out that javac on OS X doesn't use ISO-8859-1 as the default encoding (I guess it uses MacRoman). Acutally the problem is that we have german umlauts in some of our source files. Therefore it is a good idea to specifiy the enconding property in your ant task:
<javac encoding="iso-8859-1" ...
...
Tips 'n' Tricks: How to keep JSP compilation results with JBoss/Jetty
If you want to keep your JSP compilation results between server restarts you have to tell Jetty where to put the results. Otherwise Jetty will use a different directory on each restart. The simplest way is to add an init-parameter in webdefault.xml:
[code]
Why extending Struts? Why not simply use WW2?
Some people might wonder why I worked on IoC and interceptor support for Struts. Though I really like WW2 for it is very well designed it is sometimes not possible for me to use WW2 in production enviroments. Decision makers are seldom interesseted in "technical well designed" but rather in "well known". Struts is nowadays a well known framework. Even IBM has a hole chapter about Struts in one of its WebSphere 4.0 RedBooks. But I really hope that WW2 gets more publicity so that it is easier for me to convince those decision makers :-)
JBoss, Jetty, welcome-file and index.do
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.dowould 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 =)
Back from holidays
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.