Sometimes when compiling my Scala code, the compiler output may need a little bit of help in sorting out what’s the real issue. For example, when I compiled today I received the following error: [sourcecode language="jscript”] [scalac] error: error while loading DefaultHttpClient, class file ‘C:\A_OpenSource\WicketNotesApp\lib\httpclient-4.0.jar(org/apache/http/impl/client/DefaultHttpClient.class)’ is broken [scalac] (class net.jcip.annotations.ThreadSafe not found.) [scalac] error: error while loading AbstractHttpClient, class file ‘C:\A_OpenSource\WicketNotesApp\lib\httpclient-4.0.jar(org/apache/http/impl/client/AbstractHttpClient.class)’ is broken [scalac] (class net.jcip.annotations.ThreadSafe not found.) [/sourcecode] And my instinct tells me to focus on the jar file or the class file and in this case, “DefaultHttpClient.
Sometimes we need to forward to a servlet or resource that’s outside of Wicket such as a servlet. Here’s how: Modify your web.xml to define your servlet as well as your Wicket application “ignorePaths” init-param: [sourcecode language="xml”] Wicket Example MyApplication org.apache.wicket.protocol.http.WicketFilter applicationClassName com.gu.MyApplication wicket.configuration deployment ignorePaths images/,s/ MyApplication /* SomeServlet com.gu.SomeServlet SomeServlet /s/koolkat.do [/sourcecode]
Downloaded the Community Edition of IntelliJ a few days ago. Although most J2EE features are not available in the community edition, one of the features that did like was the Scala Plugin. After I downloaded it and added the scala plug-in, I was very impressed with the tool. I have been using Eclipse (a little Netbeans) for most of my Java development and although I have tried the scala plugin that’s available for Eclipse, I wasn’t all that impressed.