Scala compile message - Class file or Jar is broken

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 [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 [/sourcecode] And my instinct tells me to focus on the jar file or the class file and in this case, “DefaultHttpClient.

Forwarding to a URL from Wicket

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”] <?xml version=“1.0” encoding=“UTF-8”?> <!DOCTYPE web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN” “"> Wicket Example MyApplication org.apache.wicket.protocol.http.WicketFilter applicationClassName wicket.configuration deployment ignorePaths images/,s/ MyApplication /* SomeServlet com.

ContextPath in Apache Wicket

One of the first things I found as I was getting familiar with Wicket is how do you point to resources that are part of a page. Well I did some digging around to find out so I’m documenting it here for others who might be facing the same challenges as they discover Apache Wicket. Problem: You have pages in Wicket that are HTML with “Wicket” tags. But then you might want to point to resources such as CSS style sheets or JavaScript that’s part of a page.

First Date with IntelliJ Community Edition and Scala

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.