Using with Jetty or other Servlet framworks

May 28, 2010 at 3:52 PM
We want use Waffle with Jetty. The first that we receive is: java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory It look like that you has hard code to the JULI API. Do you want change this to Commons Logging API? Then your library can use the configured logging of Tomcat.
May 28, 2010 at 3:55 PM

Sure, that's easy. It means distributing commons-logging.jar as well I believe. Want to send me a patch?

May 28, 2010 at 3:55 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
May 29, 2010 at 1:12 AM

Thanks for the patch! I had to make a few more changes (mostly build-related), see rev. 53262 for details. Uploaded build 1.3.3262.0, please give it a try.

May 31, 2010 at 3:07 PM
I have test the patch and I receive now: java.lang.ClassNotFoundException: org.apache.catalina.realm.GenericPrincipal It look like that there are many references to the Tomcat API. Can you tell me why there are so much references? This make problems with other serlet framworks. But it can also produce problems with future versions of Tomcat. Does you need this references for the concept? Or do you have use it because it was simple? I want understand if it is possible to convert it to a more generic project.
May 31, 2010 at 7:44 PM

I overlooked this one. The references were really because it was simple to reuse GenericPrincipal and because Tomcat does special things with a GenericPrincipal (logout). But there's nothing conceptually needed from it and eventually I'd like more things than less to work with any server.

Build 1.3.3429.0 should fix it. I've tested the filter with Jetty 6.1.24. Let me know.

Jun 1, 2010 at 1:16 PM
Now it has work with Jetty and IE. Many thanks for your changes.
Jun 1, 2010 at 1:35 PM

Cool. If you end up using it in the "real world", please take a minute to reply to this post. Don't hesitate to post feature requests and suggestions too!

Feb 8, 2011 at 3:12 PM

I had a bit of a time getting this to work with waffle because one parameter was not well documented in the jetty documentation - how to specify the "Role Principal Implementation Class".  Fortunately I found one (and only exactly one) reference in a JIRA on the 'net that gave me the necessary clue, when combined with the Tomcat examples.  Here is an example for Jetty

    <Set name="UserRealms">
      <Array type="">
           <New class="">
              <Set name="name">jay desktop test</Set>
              <Set name="LoginModuleName">Jaas</Set>
              <Set name="RoleClassNames">
               <Array type="java.lang.String">

Along with a logon configuration module specified via something like:  Where Jaas in the waffle-login.conf matches the Jaas in the above jetty.xml

Jaas {

   waffle.jaas.WindowsLoginModule sufficient debug=true;