Wednesday, January 14, 2009

GWT in Sakai, Hello World.

You may recall that I totally mongled the back deployment of the IPBUserManager. What I didn't mention is that I also hand built another Sakai tool but had all the useual grief with tool registration and all that miserable stuff and tried to merge the IPBUserManager GWT stuff in there. But Sakai's kung-foo was too powerful for me.

Punt!

I used the Sakai App generator to get a skeleton of an app. I should of used this in the first place. I generated a JSP "hellow world" app - all I wanted to do was to get a tool in place at this first step. And I want the tool to present a web page containing the GWT Application, for Sakai to serve up unto that web page all the GWT bits, and for those to make their way back to a servlet .

Aaron's plug-in slams out the framework.

So I dug up a clear GWT example from somewhere. I had been plowing through GWT In Action but had found the sequence of that book awkward.

Exactly, where?

http://developerlife.com/tutorials/?p=125, which is titled "Building a GWT RPC Service." It was a clear and easy to follow mini-tutorial.

then it was mixing and munging.

I copied the String Reverser bits into the generated Sakai app directory. The various GWT generated cache bits in the web-inf directory, the client, public and server directuries under the web-inf/classes directory, etc.

I hacked up the generated app's web.xml
  1. to include the references to the tutorial's StringReverser servlet.
  2. to use the tutorials StringReverser.html as welcome-file
I had a couple of typos and all that, but hey.

This manual wonkery worked.




I'll now see what I can do to make it useful. One of the more useful things will be to make the canonical Sakai User Directory Service call, which we see in many Hello Sakai apps.

No comments: