We are now testing our use of Blackboard Learn 9.1 web services in Service Pack 6. Previously, up to Service Pack 5, we were not able to use Blackboard's User web service to update an existing Blackboard user's data. The same tests that were failing for updating an existing Blackboard user using the User web service now pass in Service Pack 6.
It is sometimes useful to use an enum type as a field in a model class or as a field in a Struts 2 ActionSupport class. This article discusses how to use enumerations with the Struts 2 framework and provides a complete example application to demonstrate the use of enumerations in a Struts 2 application.
Blackboard Learn provides extensive web services that external applications may use to get information from and add information to Blackboard. The below links can be used to learn about Blackboard Learn 9.1 web services and to download Java applications that demonstrate how to use the web services.
I wrote these Java example applications, tutorials and documentation based on updated versions of my previous blog articles on Blackboard Learn's web services. Each file includes a link to download an example Java application that can be viewed in any Maven compatible Java IDE. The example applications include a detailed ReadMe.txt file that explains how to build and run the example either in Eclipse or just using Maven.
On March 24, 2011, springsource released milestone 2 of the Spring Data JPA library. Per the Spring Data project website, Spring Data JPA:
Simplifies the development of creating a JPA-based data access layer and provides 'cross-store' persistence functionality for JPA managed entites [sic].
Since I recently started using JPA 2 in my Spring applications, I decided to learn more about Spring Data JPA. To assist my learning, I took an example project that uses Struts 2, Spring 3, JPA 2 (with Hibernate 3.5 as the JPA provider) and modified it to use Spring Data JPA. This blog article is about what I had to modify so the project could use Spring Data JPA and what I could then get rid of.
One of the new features in Spring 3.1 is cache abstraction that allows developers to easily cache method results. This blog article provides a simple Maven Java project that demonstrates how to use the new cache annotations.
As I worked my way through the Contexts and Dependency Injection (CDI) part of the Java EE 6 tutorial I wanted to learn how to use CDI with Tomcat 7 and Maven. The examples that come with the Java EE 6 tutorial provided by Oracle are NetBeans projects and use the GlassFish 3 server (which has built in support for CDI). Since my development environment is Maven and Tomcat, I wanted to translate the CDI examples in the Java EE 6 tutorial to my environment. Just like with my work on converting the JSF 2 example to Maven and Tomcat, converting the CDI example meant a ride on the JSF 2 - Tomcat 7 pain train.
As I worked my way through the Java EE 6 tutorial I needed to learn how to use JSF 2 with Tomcat 7 and Maven. The examples that come with the Java EE 6 tutorial provided by Oracle are NetBeans projects and use the GlassFish 3 server (which has built in support for JSF 2). Since my development environment is Maven and Tomcat, I wanted to translate the JSF 2 examples in the Java EE 6 tutorial to my environment. This work went pretty smoothly except for one big GOTHCA caused by a little advertised bug in the latest version of Oracle's reference implementation of JSF 2.
The Struts 2 web application framework has a long-standing security vulnerability that may not be well known to new Struts 2 developers. By default the framework enables a technique called dynamic method invocation. This technique allows a developer to specify in a Struts 2 action url what method should be called in the Action class. The security problem is that any user of the Struts 2 web application can also use dynamic method invocation to call a public method that is in the Action class. The purpose of this article is to explain the vulnerability and how to fix it. Note this problem occurs through the Struts 188.8.131.52 release, which is the latest release as of February 2011.
With the release of Tomcat 7, Java web application developers have an alternative to GlassFish 3 for testing and running web applications that use the new Servlet 3.0 specification that is part of Jave EE 6. Oracle provides a good online tutorial for learning about Java EE 6 and Servlet 3.0. However, the tutorial's example applications are geared toward either using NetBeans or Ant and the GlassFish 3 server. Since I use Maven and Tomcat, I wanted to try out the Servlet 3.0 example application in Tomcat 7. This article provides a Maven version of the mood example application that is part of the Servlet 3 tutorial. The "mavenized" version of the tutorial's mood project can be easily packaged and deployed to the Tomcat 7 Servlet/JSP container.
I updated the tutorials I wrote about Shiro (http://shiro.apache.org, formerly known as JSecurity and Ki) to use the latest version of the library. Shiro is a "Java security framework that performs authentication, authorization, cryptography, and session management". Shiro became a Top Level Apache project in September 2010 and version 1.1.0 of the library was released in November 2010.
In 2009, when I wrote the tutorials, Shiro was known as JSecurity and was on version 0.9. With the move to the new name and to Apache, the package structure of the library changed. I wanted to update my tutorials so that users trying to learn Shiro would have a better reference.
Shiro is licensed under the Apache Software License, Version 2.0
You can view the tutorials on Shiro (version 1.1.0) starting here.