Thursday Jan 17, 2008
Thursday May 10, 2007
By paulsen on May 10, 2007
How to win a helicopter @ JavaONE
BT had a booth at JavaONE for their Web21C SDK. The SDK, among other things, allows you to write software that invokes a WebService hosted by BT to place a phone call between 2 parties. You simply need to provide 2 phone numbers and BT calls both parties and connects the two. They provide a limited amount of usage for free, and for a small fee you can use their service more, here's a link to their pricing. The Web21C SDK opens up the door to many possibilities, however, that's outside the scope of this blog.
BT was offering a challenge at their booth: Use their SDK to place a phone call and win a remote controlled helicopter. My son is 5 and would love to crash the helicopter, and it sounded like any easy task for GlassFish + JSFTemplating... so I got to work!
Here's what I had to do:
2) I added the Web21C jar files to my WEB-INF/lib directory of the demo app. They gave me a memory stick with these, but I think you can find them here.
3) I had problems w/ some of their jar files because many of them are already part of GlassFish and were not needed. Also some of the versions may not have been compatible. I ended up turning off classloader delegation by adding this to my sun-web.xml file:
4) I registered my application. BT requires you to register your application. This was a necessary, but the most painful part of the process. It required me to download the Web21C-Certificate-Tool, patch the JDK with the unlimited strength policy files, run their certificate tool, place the generated file in the WEB-INF/classes directory of the demo app, and create / place a security.properties file in the WEB-INF/classes directory that pointed to the generated file.
5) With the environment finally setup, I was ready to write the app! I created the following JSFTemplating page:
6) I created the following handler in a new java file called Web21Handlers.java (see above call.jsf page where the button is invoking this handler):
7) I compiled the app (just typed "ant" on the command line, the demo application already has the build environment setup), started the server and went to http://localhost:8080/demo/call.jsf where I saw:
After typing in the 2 phone numbers and clicking the "Make Call" button... the 2 phones rang!
8) Finally... I showed this to the Web21C people and they gave me a helicopter!
(I'm in the blue Sun shirt. You can also see this on flickr.)
That's how to get a helicopter using JSFTemplating + Web21C + GlassFish at JavaONE.
Thursday Feb 15, 2007
By paulsen on Feb 15, 2007
Woodstock JavaServer Faces Components
Sun has delivered some great components as part of Sun Java Studio Creator and NetBeans Visual Web Pack. But if you don't use one of those products, you probably didn't know it. Well, now you don't have to use these tools to enjoy the rich JavaServer Faces components they provide. In fact not only are they available outside these products, they are now Open Source!
Project Woodstock is the Java.net project which contains the source code for these components. Both Creator's and NB VWP components were derived from earlier versions of this code base. The code is released under the very flexible CDDL license. These components have been in the making for over 2 years and have gone through several development cycles. They're stable, full featured, and work seemlessly together sharing a common theme -- they're ready for production!
Let's take a look at what some of these components look like:
All of these components are "themed" so you can adapt the look of these components to your company's look and feel by creating your own theme. Many of the components use Ajax (via Ed Burn's Dynamic Faces project), and more Ajax features are sure to come. The TLD document and example application included in the project provide more than enough information to get you started.
If you're a Faclets user, Jason Lee is already working on creating a Facelets taglib for Woodstock. And of course if you're a JSFTemplating user, I have full support for the Woodstock components built in... plus I have a simple example app on the site to get you started. Plus, the entire GlassFish admin console (source here) is built using JSFTemplating and Woodstock components. So whatever your JSF environment (NetBeans, Facelets, JSFTemplating), you'll be able to use these components.
So what are you waiting for? Go download the components and try them out!
- The Ajax Experiment
- JavaOne Hidden Treasure
- Looking for Opinions...
- Introducing GlassFish Performance Tuner
- Tips for creating a GlassFish Admin Console Plugin
- GlassFish Birds Of a Feather (BOF) Session at JavaOne 2008
- Don't forget your laptop!
- Where will you be at JavaOne?
- JavaServer Faces overview @ the Salem JUG
- GlassFish Book Review