BLTI Devel Notes

Jan. 21, 2011

Downloaded the source files using:

svn checkout http://ims-dev.googlecode.com/svn/trunk/ ims-dev

In the ims-dev directory is a folder called basiclti. It includes:

  • blti-cert
  • java-appengine
  • java-servlet
  • php-simple
  • python-appengine

I had a closer look at the java-servlet, which is using JSP files to handle interaction. The readme at the top level says:

Thu Jan 21 18:35:24 EST 2010

This is a minimal reference implementation of the IMS Basic Learning Tools Interoperability protocol.

This is distributed as a Java Web Application (war file) which can be dropped into a servlet container. The source code is included in the WEB-INF/classes folder so that it is self contained and self-deploying. There is a README.txt in that folder describing developer issues.

This includes three JSP files :

  • lms.jsp - Simulates a LMS that does launches
  • tool.jsp - Simulates a tool
  • cc.jsp - Very simple Common Cartridge Loader and Player

There is also a Java version of a tool under /provider which can be tested as well.

You can use these files to test your tool or LMS, or you can use these as sample code that are starting points.

If you are checking this out from SVN you will need to compile the classes - go into WEB-INF and see README.txt.

To install this, simply drop the war file into a Tomcat instance and navigate to the web application in your browser.

– Chuck

An immediate issue is that no WAR file is included, nor is there a way to build the system short of the instructions given in WEB-INF:

Thu Jan 21 18:31:38 EST 2010

Developer Guide

The source code is in the classes folder. To compile,

cd classes
javac -cp .:../../../../common/lib/servlet-api.jar ProviderServlet.java

This compiles both the Java version of the provider and all of the support classes. You need to compile the servlet to get all of the OAuth and IMS Support code - even to use the JSP files.

Note that the code in the net folder is taken from the sample Java code from oauth.net and is unchanged in this distribution.

/Chuck

This does NOT create a WAR that can be deployed.
What it needs is an ANT file to create it. I think I'll try to create one as it will give me a view into the file organization.

I got the basic ant build file working. It creates a WAR that is deployed to Tomcat. I had to make the project name and the servlet name agree. Both are called ProviderServlet. Several JSP files are include:

  • "http://localhost:8084/ProviderServlet/lms.jsp" - main entry point with various forms.
  • "http://localhost:8084/ProviderServlet/blti_util.jsp" - Gives 500 error and exception message.
  • "http://localhost:8084/ProviderServlet/tool.jsp" - Says that the oauth_consumer_key is missing.

Now that I have the basic files working, I can start poking into them and see how they work. The "lms.jsp" seems like a good place to start.