Bruce Phillips Blog on Java, ColdFusion, Flex and Spry /blog/index.cfm Tutorials on using Java, ColdFusion, Flex, and Spry en-us Tue, 15 Nov 2016 00:49:15 -0700 Tue, 29 Dec 2015 10:36:00 -0700 BlogCFC http://blogs.law.harvard.edu/tech/rss Bruce@Phillips.name Bruce@Phillips.name Bruce@Phillips.name Bruce Phillips Blog on Java, ColdFusion, Flex and Spry /blog/index.cfm no Review - Starter Class of Build Your REST API With Spring /blog/index.cfm/2015/12/29/Review--Starter-Class-of-Build-Your-REST-API-With-Spring <p>I completed the <a href="http://www.baeldung.com/rest-with-spring-course?utm_source=blog&utm_medium=web&utm_content=rest_start&utm_campaign=rws" target="_blank">Starter Class of Build Your Rest API with Spring</a>. This course was developed by <a href="https://plus.google.com/u/0/+EugenParaschiv/posts">Eugen Paraschiv</a> and is the first part of a 3 part course in learning how to use Spring to create REST web services.</p> [More] Java Tue, 29 Dec 2015 10:36:00 -0700 /blog/index.cfm/2015/12/29/Review--Starter-Class-of-Build-Your-REST-API-With-Spring New Struts 2 Plugin For JSR 303 Bean Validation /blog/index.cfm/2013/10/29/New-Struts-2-Plugin-For-JSR-303-Bean-Validation <h3>Introduction</h3> <p>A talented Struts 2 developer, Umesh Awasthi, has created a new <a href="http://struts.apache.org" target="_blank">Struts 2</a> plugin to provide Bean (JSR 303) validation as part of the Struts 2 framework.</p> <p>This article provides notes and an example application you may review to learn how to use the Struts 2 JSR 303 validator plugin. Generally, including the plugin and a JSR 303 compliant implementation in your project will cause the Struts 2 framework to apply the validation constraints you have included on your Bean classes. Note that the 1.0 version of the plugin does not allow you to combine both JSR 303 bean validation with the Struts 2 XML validation.</p> [More] Java Tue, 29 Oct 2013 08:38:00 -0700 /blog/index.cfm/2013/10/29/New-Struts-2-Plugin-For-JSR-303-Bean-Validation Using Spring Web MVC to Create a REST Web Service and Spring RestTemplate to Consume It /blog/index.cfm/2013/9/13/Using-Spring-Web-MVC-to-Create-a-REST-Web-Service-and-Spring-RestTemplate-to-Consume-It <h3>Introduction</h3> <p>As Spring continues to evolve each new release improves support for creating and consuming REST web services. This brief article provides two simple example projects: one that uses Spring Web MVC to create a REST web service and one that uses Spring RestTemplate to call the REST web service and process the response.</p> [More] Java Fri, 13 Sep 2013 17:13:00 -0700 /blog/index.cfm/2013/9/13/Using-Spring-Web-MVC-to-Create-a-REST-Web-Service-and-Spring-RestTemplate-to-Consume-It Blackboard Building Block Development - Problem With Using log4j For Logging /blog/index.cfm/2013/4/15/Blackboard-Building-Block-Development--Problem-With-Using-log4j-For-Logging <p>We recently deployed a new Blackboard building block (B2) to our production system. After deployment I noticed that this new B2 was not writing log messages. This article explains how I solved that problem.</p> [More] Java Mon, 15 Apr 2013 08:11:00 -0700 /blog/index.cfm/2013/4/15/Blackboard-Building-Block-Development--Problem-With-Using-log4j-For-Logging Upgrading A Spring JDBC Project To Spring Version 3.2.2 /blog/index.cfm/2013/3/20/Upgrading-A-Spring-JDBC-Project-To-Spring-Version-322 <h3>Introduction</h3> <p>I recently updated a Java project that uses Spring JDBC from Spring version 3.1.0.RELEASE to Spring version 3.2.2.RELEASE.  To get everything to work correctly I had to make a few changes that I thought others might find helpful to know about.</p> [More] Java Wed, 20 Mar 2013 13:18:00 -0700 /blog/index.cfm/2013/3/20/Upgrading-A-Spring-JDBC-Project-To-Spring-Version-322 Struts 2 How To Exclude Parameters From Being Processed By The Framework /blog/index.cfm/2012/12/31/Struts-2-How-To-Exclude-Parameters-From-Being-Processed-By-The-Framework <p>Introduction</p> <p><a href="http://struts.apache.org" target="_blank">Apache Struts 2</a> released version 2.3.8 in December 2012. In this version, when <a href="http://struts.apache.org/2.3.8/docs/strutsproperties.html" target="_blank">development mode is set to true</a> additional messages are written to the log. These messages include ones that indicate whether or not a specific parameter will be handled by the parameter interceptor and made available to the Action class. These log messages can be helpful in clearly identifying parameters that you do not want the parameter interceptor to process for security or other reasons. This article discusses how to exclude parameters from being handled by the parameter interceptor.</p> [More] Java Mon, 31 Dec 2012 17:29:00 -0700 /blog/index.cfm/2012/12/31/Struts-2-How-To-Exclude-Parameters-From-Being-Processed-By-The-Framework Spring Release 3.2 - Easier Spring MVC Tests /blog/index.cfm/2012/12/20/Spring-Release-32--Easier-Spring-MVC-Tests <h3>Introduction</h3> <p>I've been learning how to use the Spring MVC web application framework as I contemplate switching from Struts 2 to Spring MVC. In December 2012, <a href="http://blog.springsource.org/2012/12/13/spring-framework-3-2-goes-ga/" target="_blank">Spring announced the release of version 3.2</a>. One of the new features in this release is easier testing of Spring MVC applications (which is a weak area for Struts 2). So this article provides a simple Spring MVC example project that includes JUnit tests of the Spring MVC controller class.</p> [More] Java Thu, 20 Dec 2012 12:41:00 -0700 /blog/index.cfm/2012/12/20/Spring-Release-32--Easier-Spring-MVC-Tests Blackboard Building Block Development - Setting The Initial Sort For An inventoryList /blog/index.cfm/2012/12/11/Blackboard-Building-Block-Development--Setting-The-Initial-Sort-For-An-inventoryList <h3>Introduction</h3> <p>We needed to display a list of Blackboard Course objects on a view page and wanted the list to be sorted by a specific field (courseId). We used the inventoryList Blackboard tag to display the list. Consulting the <a href="https://blackboard.secure.force.com/btbb_articleview?id=kA770000000CaUy" target="_blank">Blackboard Learn Building Blocks Tag Library Guide for Release 9.0 and 9.1</a>, I found that the inventoryList tag has an attribute, initialSortCol with this description:</p> <blockquote><em>The column to initially sort by when the list is displayed. The value should match the name of a list element.</em></blockquote> <p>So we set the value of initialSortCol to be the name value for the listElement tag that displays the course ID for each Course object in the collection. But the list of Course objects still was not sorted correctly.</p> <p>Thanks to some bright colleagues where I work, we were able to get the list sorted correctly. Hopefully this article will save other developers hours of frustrating work caused by incomplete and missing Blackboard documentation.</p> [More] Java Tue, 11 Dec 2012 10:33:00 -0700 /blog/index.cfm/2012/12/11/Blackboard-Building-Block-Development--Setting-The-Initial-Sort-For-An-inventoryList A Blackboard Building Block That Allows Instructors To Merge Blackboard Courses /blog/index.cfm/2012/11/1/A-Blackboard-Building-Block-That-Allows-Instructors-To-Merge-Blackboard-Courses <p>My university is moving to Blackboard Learn 9.1 Service Pack 9 and to <a href="http://www.oracle.com/us/industries/education-and-research/052367.html" target="_blank">Oracle's Student Administration and Integration Pack</a> (SAIP). We will be using SAIP to provide all our classes and enrollments to Blackboard so that each class has an associated Blackboard course. As part of these changes we need to implement a Building Block (B2) that will allow instructors to add one or more child courses to a parent course in Blackboard. Some of our instructors prefer to have one Blackboard course for multiple sections of the same class they are teaching or to have one Blackboard course for both their lecture and lab sections. </p> <p>This article discusses our research into creating such a Building Block and the Blackboard API classes we use. There is a prototype Building Block available on <a href="https://github.com/phillips1021/phillips_b2_examples" target="_blank">my Github repository</a>. I want to share what we've learned, but I also hope to get feedback on our approach and any lessons learned from others experiences.</p> [More] Java Thu, 01 Nov 2012 09:35:00 -0700 /blog/index.cfm/2012/11/1/A-Blackboard-Building-Block-That-Allows-Instructors-To-Merge-Blackboard-Courses How To Use The Blackboard Building Block Eclipse Plugin /blog/index.cfm/2012/10/25/How-To-Use-The-Blackboard-Building-Block-Eclipse-Plugin <p>Blackboard provides a Building Block Eclipse plugin that simplifies setting up a Building Block project and deploying a Building Block application to a Blackboard development server. Using the plugin saves Building Block developers significant time. </p> [More] Java Thu, 25 Oct 2012 10:05:00 -0700 /blog/index.cfm/2012/10/25/How-To-Use-The-Blackboard-Building-Block-Eclipse-Plugin Building Block Examples For Blackboard Learn 9.1 /blog/index.cfm/2012/10/22/Building-Block-Examples-For-Blackboard-Learn-91 <p>As part of learning how to develop Building Blocks (B2) for <a href="http://www.blackboard.com/Platforms/Learn/Overview.aspx" target="_blank">Blackboard Learn 9.1</a> I've put together several example projects. I've posted these examples<a href="https://github.com/phillips1021/phillips_b2_examples" target="_blank"> on my GitHub repository</a>. Hopefully other new Building Block developers will find them helpful.</p> <p>Blackboard Building Blocks are Java web applications that run in the Blackboard Learn platform. Building Blocks allow schools to extend what Blackboard Learn can do or customize what it currently does. Blackboard provides an <a href="http://library.blackboard.com/ref/598135ae-501e-46f6-9910-190d7ea0a17c/" target="_blank">extensive API</a> and also a <a href="https://blackboard.secure.force.com/btbb_articleview?id=kA770000000CaUy" target="_blank">JSP tag library</a>. The downside is that as of <s>October 2012</s> July 2013 (!) there is little documentation on how to develop Building Blocks for the Blackboard Learn 9.0 and 9.1 platforms. Much of the documentation available is too old. </p> [More] Java Mon, 22 Oct 2012 14:28:00 -0700 /blog/index.cfm/2012/10/22/Building-Block-Examples-For-Blackboard-Learn-91 Tutorial On Using Building Block Feature That Creates Database Tables In the Blackboard Database /blog/index.cfm/2012/10/12/Tutorial-On-Using-Building-Block-Feature-That-Creates-Database-Tables-In-the-Blackboard-Database <h3>Introduction</h3> <p>Beginning with Blackboard Learn 9.1 Service Pack 1, Blackboard enabled a Building Block (B2) to create database tables in the Blackboard Learn schema and insert records into those tables when the Building Block is deployed to the Blackboard Learn application server (ref. 1). This makes it simpler for B2 applications that need to store data in database tables, especially if those tables should contain foreign keys to other Blackboard tables. </p> <p>The documentation available on how to setup a Building Block so it creates the tables and inserts records into the tables is very limited (at least what I could find) and confusing. After I learned how to do this I thought a tutorial and example on how to have a B2 create tables and insert records that are part of the Blackboard Learn database schema would be useful for other B2 developers.</p> [More] Java Fri, 12 Oct 2012 14:51:00 -0700 /blog/index.cfm/2012/10/12/Tutorial-On-Using-Building-Block-Feature-That-Creates-Database-Tables-In-the-Blackboard-Database References For Blackboard Building Block Development For Blackboard Learn 9.1 /blog/index.cfm/2012/10/2/References-For-Blackboard-Building-Block-Development-For-Blackboard-Learn-91 <h3>Introduction</h3> <p>The university I develop Java applications for needs to create some Building Block (B2) applications for Blackboard Learn release 9.1 service pack 9. I'm somewhat familiar with Blackboard's Building Block technology but needed to update my knowledge for Building Blocks that will work with Blackboard Learn release 9.1 service pack 9. This article lists some resources I found helpful in getting me started and updating my B2 knowledge. Hopefully you will avoid the frustrations I experienced in trying to find up-to-date references.</p> [More] Java Tue, 02 Oct 2012 16:45:00 -0700 /blog/index.cfm/2012/10/2/References-For-Blackboard-Building-Block-Development-For-Blackboard-Learn-91 Using Spring Data REST To Easily Create RESTful Endpoints For Data Stored In A Database /blog/index.cfm/2012/9/25/Using-Spring-Data-REST-To-Easily-Create-RESTful-Endpoints-For-Data-Stored-In-A-Database <h3 class=MsoNormal>Introduction</h3> <p class=MsoNormal><a href="http://www.springsource.org/spring-data">Spring Data</a> is an ambitious project designed to make data access even simpler.<span style="mso-spacerun:yes">  </span>Spring Data consists of several sub-projects such as <a href="http://www.springsource.org/spring-data/jpa">Spring Data JPA</a>, which makes it easier for coding an application that uses JPA.<span style="mso-spacerun:yes">  </span>I had <a href="/blog/index.cfm/2011/3/25/Using-Spring-Data-JPA-To-Reduced-Data-Access-Coding">previously written</a> about Spring Data JPA and found it significantly reduced the amount of code I had to write.</p> <p class=MsoNormal>A relatively new addition to the Spring Data family of projects is <a href="http://www.springsource.org/spring-data/rest">Spring Data REST</a>, which simplifies exposing JPA-based repositories as RESTful endpoints.<span style="mso-spacerun:yes">  </span>After reading <a href="http://xebee.xebia.in/2012/09/23/giving-rest-to-your-jpa-repositories/">Vijay Rawat's excellent blog article</a> on how to use Spring Data REST I decided to modify the Struts 2 ? Spring Data JPA example application I used in my <a href="/blog/index.cfm/2011/3/25/Using-Spring-Data-JPA-To-Reduced-Data-Access-Coding">Spring Data JPA blog article</a> to include Spring Data REST.</p> [More] Java Tue, 25 Sep 2012 15:46:00 -0700 /blog/index.cfm/2012/9/25/Using-Spring-Data-REST-To-Easily-Create-RESTful-Endpoints-For-Data-Stored-In-A-Database NetBeans Java IDE 7.2 - Comments From An Eclipse User /blog/index.cfm/2012/5/25/NetBeans-Java-IDE-72--Comments-From-An-Eclipse-User <h3>Introduction</h3> <p>I've been using Eclipse for Java development for over 5 years. I'm currently using Eclipse 3.7. Recently NetBeans 7.2 beta was released and I decided to give it a try. I'm working on refactoring/improving a large Java project that was written over 4 years ago. I'm adding Spring, Maven, unit tests and improving the projects flexibility and maintainability. I spent a day using NetBeans 7.2 beta instead of Eclipse to see how well I liked using NetBeans.</p> [More] Java Fri, 25 May 2012 16:30:00 -0700 /blog/index.cfm/2012/5/25/NetBeans-Java-IDE-72--Comments-From-An-Eclipse-User