Skip navigation
All Places > Blackboard Developer Community > Blackboard Learn Developers > Blog > Authors scott.hurrey

As many of you know, Java 8 is a thing of the past. Blackboard has been working to release Blackboard Learn with Amazon's Corretto 11 OpenJDK distribution. To help you prepare your Building Block integrations for this release, we have made early access availability for the Blackboard Learn B2 JAR files available in our external maven repository. The version to use with this is 3700.99.0. 

 

Happy developing!

scott.hurrey

Precompiling JSPs

Posted by scott.hurrey Jun 9, 2017

If you haven't read the Tomcat 8 section of the Preparing Your Building Blocks For Learn SaaS and Newer Learn Versions document, you should. As Blackboard continues to update to newer technologies, we are often looking at it as an opportunity to improve the product from a security, performance, and code quality perspective. This upgrade was certainly no different. As a matter of fact, the changes involved in Tomcat 8 to the way Building Blocks are handled is pretty substantial. While not a huge effort on your part is required to take advantage, some refactoring is required.

 

One of the biggest changes is that all Java Server Pages (JSPs) in your Building Block are expected to be precompiled. Its not a terribly difficult thing to do, but it does require an additional step in your build process. Historically -- and even currently if I'm honest -- Tomcat has handled the compilation on-demand; that is to say, the first time a user accesses a JSP, all of the JSPs are compiled. Not a huge deal, particularly if there are only a few to go through, but there is always the chance of a runtime compilation error and even if not, a busy system with a large number of compilations can be quite inconvenient to a student trying to get some work done.

 

So, as I set out to update the Building Blocks documentation, I realized I had never actually compiled a JSP myself. As you are probably aware, I am a Gradle user, and so I assumed someone out there must have tackled this problem before. I was right, sort of, but not nearly as many as I'd anticipated. Because of that, and because using the Blackboard Tag Libraries without having the tld and jar file in the WEB-INF directory introduced a complexity I could not find a solution to, I thought I would share what I did so you can think about how you might approach this.

 

Enter Benjamin Muschko.

 

Benjamin has done quite a bit of work around Gradle plugins, some of which I have used before, so I wasn't too surprised to see he had built the gradle-tomcat-plugin. There are others out there, but since I was familiar with the author, I decided to use this one. Setting it up and installing it is pretty trivial and pretty well documented in the README for the project. Essentially you must create a build script at the top of the build.gradle file to set up the classpath with a link to the plugin so you can apply it in your build file. Here is what that looks like:

 

buildscript {
    repositories {
        jcenter()
    }


    dependencies {
        classpath 'com.bmuschko:gradle-tomcat-plugin:2.2.5'
    }
}


apply plugin: 'com.bmuschko.tomcat'
apply plugin: 'eclipse'
apply plugin: 'java'

 

Pretty straight forward, really. I should point out that I am using Gradle 3.3. If you are using an older version, upgrade. But if you don't want to, know that some of the syntax is different, and specifically, jcenter() is not a valid identifier, so you will need to manually reference as a maven repository, similar to how you declare the Blackboard maven repository. There are a millions google results to help you achieve that goal.

 

So I did this and the plugin was installed, and everything was great. The next step is to configure the plugin to use the appropriate version of Tomcat. This is extra important, because this plugin actually allows you to spin up a Tomcat server and run your code directly from Gradle. I'm not using it, but you definitely can. This also sets up your environment for compiling your JSPs.

 

Here is what that looks like according to the README :

 

// define the project's dependencies
dependencies {
   def tomcatVersion = '8.0.42'
    tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
           "org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
           "org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}"
  
    providedCompile "javax.servlet:servlet-api:2.5"


  // Dependencies are libraries needed to build, but should not be included in the B2 WAR.
  // You should NEVER include Learn JARs (other than webapis) in your B2.
  providedCompile( "blackboard.platform:bb-platform:$project.ext.learnVersion" ) { transitive = false }
  providedCompile( "blackboard.platform:bb-taglibs:$project.ext.learnVersion" ) { transitive = false }

 

So this was great. I did some optional configuration to turn of TLD verification and blam. Off to the races. Well, so I thought...

 

I ran the gradle command to compile the JSPs: gradle tomcatJasper, and after a few seconds, I received an error:

$ gradle tJ

:compileJava UP-TO-DATE
:processResources
:classes
:tomcatJasper FAILED


FAILURE: Build failed with an exception.


* What went wrong:
Execution failed for task ':tomcatJasper'.
> org.apache.jasper.JasperException: Unable to find taglib "bbNG" for URI: /bbNG

 

I did some noodling and playing and testing, and I figured that the problem must be that the classpath of the project wasn't being used as the classpath for the JSP compilation. I googled and yahooed and binged and I couldn't find any clear answer, so I did what I always do in this situation. I cried. Well, ok, I didn't, but I wanted to! Instead, I got a fresh cup of coffee and started reading the plugin code. In TomcatRun task, I came across a comment that said: "The web application's classpath. This classpath usually contains the external libraries assigned to the compile and runtime configurations."

 

I then looked at what the code was doing to set up the directory that the compilation was taking place, and it was essentially copying the WEB-INF folder. Because we use provideCompile to add the taglibs to the classpath but explicitly not include the jar file in the WEB-INF directory, there was no TLD to be found.

 

To test, I changed the dependency to compile and re-ran the test. I got a different message this time. AH HA!!

 

Of course, I can't leave the taglib in the Building Block, and I'm too lazy to change it back and forth to compile the JSP and then the WAR file, I had essentially confirmed the cause, but was still no closer to figuring out the solution. Again, I set my fingers in web crawl mode and hunkered down to search for ideas. After a couple of hours, my head hurt from banging it on the desk and my fingers were tired, and I still had no solution.

 

I took a step back and just looked through the build.gradle file to see what was there. I had tried adding additionalRuntimeResources, but that only works for TomcatRun and TomcatRunWar. I had tried creating my own classpath and adding the taglibs to the Gradle class path, and nothing. Then I noticed the tomcat dependency, and specifically how it was adding in a few libraries specifically to configure the plugin to setup the correct Tomcat version. I thought, what the heck, lets add the taglib there. I ran the task, and wouldn't you know it! I got the same error I got when I used compile instead of providedCompile. The error referenced the fact that it could not find one of the Blackboard objects, so i said, what the heck, let's add the platform jar, too, and low and behold, I got an error about the JSTL fmt tag library. I added that one, too, and I got those two words every Gradle user loves: BUILD SUCCESSFUL.

 

Here's what that looked like:

 

// define the project's dependencies
dependencies {
   def tomcatVersion = '8.0.42'
    tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
           "org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
           "org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}",
           "blackboard.platform:bb-taglibs:$project.ext.learnVersion",
           "blackboard.platform:bb-platform:$project.ext.learnVersion",
           "javax.servlet:jstl:1.2"


  providedCompile "javax.servlet:servlet-api:2.5"


  // Dependencies are libraries needed to build, but should not be included in the B2 WAR.
  // You should NEVER include Learn JARs (other than webapis) in your B2.
  provompile( "blackboard.platform:bb-platform:$project.ext.learnVersion" ) { transitive = false }
  providedCompile( "blackboard.platform:bb-taglibs:$project.ext.learnVersion" ) { transitive = false }

 

So after all of that, I finally had Gradle compiling my JSPs. Since I already survived the struggle, I thought I would share here with you!

 

I am very overdue in updating the basic-b2-template project, so I am doing that now, to include the precompilation and any other updates that are missing since Gradle 1.6 was cool. I will update the group when it is complete.

 

happy Developing!!

-scott

Greetings Developer Community,

 

It’s been a few months since the Developer Community moved to community.blackboard.com. We hope you’re enjoying the collaborative features that this site offers. Between discussions, blogs, ideas, and questions, there are a lot of content types to help you learn from other developers and post your own successes for fellow community members.

 

Now that we’re properly established on the Community site, we are entering the next phase of migration from edugarage.com: moving all developer documentation to this site. Soon you will be able to find all Blackboard Learn developer resources here. This is exciting news, but we also want to give you advance warning: we’re retiring EduGarage.com on Dec 31, 2015, after the migration is complete.

 

We’ll have a few redirects in place from the most common links that people visit, so those links will take you directly to the corresponding section on this site. Jive will continue to serve the community well when it comes to finding, using, and discussing developer information. For a long time, the EduGarage forums were the most active part of the site and we hope that trend continues here. We are still identifying if and how to archive the data in the edugarage forums in how to make them searchable if we do, but all further communication will take place here in the discussions section. We will redirect forums.edugarage.com to the new site, as well.

 

As we move the content in the next few weeks, we’re also updating it for accuracy and usefulness. Please bear with us while some of the content is under construction or if some information is initially moved and then removed (i.e. Powerlinks documentation). We will be tagging everything that is migrated as 'migrated from edugarage' so you know where it came from. If you notice a broken hyperlink or something looks a bit off, let an admin know by leaving a comment or sending a message and we’ll take care of it as soon as possible.

 

If you have any questions, please let us know! We don’t want this to be a surprise, so we’re putting a banner on EduGarage to announce the migration there as well. Please share the news with your networks as appropriate.

 

Thank you for your patience and understanding. I look forward to continuing to build the Developer Community in collaboration with all of you here in Jive!

scott.hurrey

And The Winner Is...

Posted by scott.hurrey Sep 29, 2015

Szymon Machajewski!

 

Of what, you ask? The name the new Blackboard API contest, as documented in this discussion.

 

Szymon suggested that we keep the naming convention simple and in keeping with marketplace trends, so hence forth, the impending Blackboard Rest APIs will be known as the Blackboard API, and the integrations you will build will be Blackboard Apps.

 

I will be contacting Szymon to work out his prize, but in the meantime, keep on your thinking caps, folks. Soon it will be time to name the overall integration platform, and we hope to hear from you with your ideas.

 

Check back here for more information.

 

Thanks!

-scott

scott.hurrey

DevCon 2015: The Keynotes

Posted by scott.hurrey Jun 18, 2015

One of the highlights of DevCon is always the key note sessions. These sessions are always a great place to learn about the direction of the Blackboard Learn platform from Blackboard leaders, as well as external speakers that bring new insight and vision into topics of emerging or evolving importance to Developers and System Administrators.

 

DevCon 2015 continues this tradition in glorious fashion!

Opening Session

 

The opening session at this year's DevCon will feature Peter George, Senior Vice President, Product Development, Support And Cloud Services at Blackboard. Peter is the new head of Blackboard's Product Development group, and as such, is responsible for driving the innovation for the entirety of the Blackboard portfolio. This will be a chance for DevCon attendees to hear about the direction of Blackboard directly from the proverbial horse's mouth.

 

Peter's Keynote, entitled, "Working Together to Shape the Future of Learning," will introduce the foundation of Blackboard's New Learning Environment and focus on learner-centric design. The session will cover key concepts in this approach, such as the integration of the Blackboard suite of products from a disparate group of related products into a cohesive, unified experience. George will also discuss the new Blackboard Learn SaaS deployment model, and why it enables Blackboard to provide a greater innovation is a more scalable and stable way. He will also discuss the new Ultra experience, and why and how an institution should prepare for the transition, Blackboard's focus on the mobile, always-on experience, and leveraging analytics to make insightful decisions. Lastly -- but certainly not least -- Peter will emphasize the continued investment in the Learn Platform.

 

Attendees should leave this opening session with the high-level knowledge needed to understand where Blackboard is headed and to be prepared for the rest of the conference, and specifically, which break out sessions are must-see for them.

 

External Keynote

 

The DevCon team is excited to announce that Ryan Baker, Associate Professor of Cognitive Studies in Education from Columbia University has agreed to be the external keynote for DevCon 2015. Ryan is a leader in the use of data analysis to predict student outcomes. While this is a seemingly new trend to the marketplace, Baker and his research laboratory have been studying this for more than a decade.

 

In "Predicting Learner Outcomes with Learning Analytics," Ryan will talk about the work his team has done to predict a large range of outcomes, including course success, a Learner's preparedness for future learning opportunities, long-term educational attainment, and even participation in scientific communities of practice. Baker will discuss what to keep in mind when developing a product to capture the best data for analysis, as well as providing insight into best practices for developing data analytics.

 

Attendees will leave this session cognizant of the data their applications should be tracking and why, as well as how to approach the use of this data to make informed decisions around student outcomes.

 

Closing Session

 

Jon Kolko will close out this year's DevCon with his talk, "Well Designed: How to Use Empathy to Design Products People Love." Jon is Blackboard's Vice President of Design, and he brings to Blackboard his innovative approach to design; that design is a feeling that is evoked by human-application interaction that is above and beyond just a flashy screen or smooth workflow. Jon will use this keynote session to share that vision with DevCon.

 

This session will be less about the specificities of Blackboard Learn, and more about the philosophy behind good design. It is not only the visual appeal of a product, but also the process by which a product is conceived, utilizing empathy for the end users using a product and the goals they hope to achieve to anticipate problems and challenges and to identify solutions that will have a strong emotional appeal to the user, while still fitting in with product and market requirements. This is the philosophy of Blackboard's Design team, and the impetus for the usability and user experience improvements across the spectrum of the Blackboard suite of products that have been shown over the past year.

 

Attendees will leave this session with a new way to think about the overall design process, as well as new insight into the internal thought process behind Blackboard's product innovations.

 

Learn More about DevCon or Register now. Then stay tuned over the next few weeks for more information about the sessions, events, and networking opportunities you can look forward to at DevCon. We’ll see you in DC!

After a year off, Blackboard’s Developers Conference is back. Back in 2013, DevCon was very much focused on extending Blackboard Learn Release 9.1. We introduced a number of new tools, like the external Maven repository and the Developer Virtual Machine. Since that time, Blackboard announced a new release model, a new, cohesive user interface, and even began delivering on that new strategy.

 

 

Without a Developers Conference during this time, a lot of questions have arisen. DevCon 2015 in Washington, DC is the chance to get answers to those questions. The Architects and Product Managers that have been driving this innovation will be on-hand and on stage providing deep technical insight into the future direction of the Blackboard suite of product with a specific focus on Blackboard Learn SaaS and what it means for both Administrators and Developers.

 

 

While the agenda has not been posted yet, a number of sessions have been identified that will highlight these new and upcoming features and functionality. Administrators will find out what it means to move to SaaS, the future of Learning Analytics, and all about the Cloud Stack behind the SaaS delivery model of Blackboard Learn. Developers will get a sneak peek at the future of the integration framework, Angular and extension points, preparing custom Building Blocks for Learn Custom SaaS, and even a Round Table Q&A session with Blackboard Architects.

 

 

If information about the future of Blackboard Learn is of interest, DevCon 2015 should be required. There has been much in the way of opinion and conjecture about what is on the horizon, but DevCon will provide the facts Administrators and Developers need to move forward in the Blackboard ecosystem. Stay tuned for more information in the coming weeks about what to expect in Washington, DC July 20-21!