Thursday Dec 10, 2009
Tuesday May 26, 2009
Wednesday Feb 25, 2009
By paulsen on Feb 25, 2009
- Try the working prototype at: http://184.108.40.206:9999/admingui/. This link will not be up long, so try now!
- Post your thoughts to this blog.
- Do you like (or dislike) the menus?
- Do you like (or dislike) the tree? (Be sure to click the "Toggle Scheme" button.)
- Do you like / dislike the tagging feature? (See first screen shot above.)
- Many broken button clicks (particularly posts that don't do a redirect)
- 404 pages cause a loop due to a JSF bug
- Performance -- it's not good right now, it will be MUCH better when it's not a prototype (note: it also doesn't help that this prototype is running on a small desktop machine over a DSL-line... ).
- Many pages are broken (some intentionally for the public demo, others are simply not implemented)
- List of tagged pages can sometimes show duplicates
- Ajax for updating tags and other portions of the screen is not implemented
- Breadcrumbs do not exist
So... as you can see we're not looking for bugs, but rather general feedback on the navigation and Look-and-Feel. So post your thoughts and help make GlassFish better.
Thanks for taking a look!
Friday May 02, 2008
By paulsen on May 02, 2008
Are you lucky enough to be going to JavaOne 2008? If so, don't forget your laptop!
This year at JavaOne there will be quite a few Hands-on Lab sessions where you will be able to try out cool technologies rather than just hear about them. In many of them you'll be given courseware and the software needed to use the technology on your laptop, other labs will provide machines for you to use.
I will be one of the presenters for the "Plug into GlassFish v3 with JavaServer Faces and jMaki" lab. The lab will show how GlassFish v3 will provide a pluggable platform which enables anyone to extend the functionality provided by the GlassFish v3 administration console. This is done in the context of our JavaServer Faces application with the help of OSGi bundles and our plugin API for our application. If you're already signed up, great! If not, you can try to get in (the lab is already full) or stop by the GlassFish booth #175 in the Pavilion and you can get a copy of the lab to try on your own time. Oh... and if you do create a GlassFish v3 plugin during JavaOne, you're eligible for a chance to win a Canon PowerShot SD1000 Digital Camera! See the contest rules for more details.
Thursday May 01, 2008
By paulsen on May 01, 2008
Here's my schedule of events I'm considering:
I'm unsure about many of them, but I will definitely be at the GlassFish BOF at 7:30 PM on Tuesday, (Gateway 104). I am speaking at the "Plug into GlassFish v3 with JavaServer Faces and jMaki" Hands-on Lab (Wednesday @ 6:30PM, Hall E 132). I also helped out with a demo that will be shown during the 1:30 PM General Session on Tuesday, so I don't want to miss that. Everything else I'll try to make on a best effort basis.
See you at JavaOne!
Wednesday Apr 02, 2008
By paulsen on Apr 02, 2008
Yesterday I made a nice drive down I-5 from my home in Brush Prairie, WA to Oregon's state capital, Salem. I spoke with the Salem Java Users Group about JavaServer Faces, and also demoed JSFTemplating and GlassFish. Many of the members of the JUG were already using JavaServer Faces and had lots of good questions. I had a great time and look forward to visiting them again to talk more about GlassFish!
You can find my slides here. If you want me to come talk to your JUG (or company), send me an email (and possibly a plane ticket )... or better yet, meet me at JavaOne 2008!
Wednesday Feb 20, 2008
By paulsen on Feb 20, 2008
A couple months ago I found a book called Java EE Development using GlassFish Application Server. As a GlassFish developer, I was immediately curious as I hadn't heard anything about this book until it was already published. Perhaps this is a sign of how popular GlassFish has become.
When I first opened the book and thumbed through it, I was impressed (flattered?) by the number of screen shots of the GlassFish Admin Console -- which for those who don't know is the part of GlassFish I help develop. The book's chapters are well organized and topics are very easy to find. The book reads like a well-written tutorial that easily takes someone completely new to GlassFish (or even Java EE) and walks them step-by-step through building applications and learning each major component. I was impressed. To give you an idea of the topics covered, here are the chapter titles:
- Getting Started with GlassFish
- Servlet Development and Deployment
- JavaServer Pages
- Database Connectivity
- JSP Standard Tag Library
- JavaServer Faces
- Java Messaging Service
- Enterprise Java Beans
- Web Services
- Beyond Java EE
So as you can see from the chapter titles, the book covers it all. However, it's only about 400 pages, so as you can imagine the depth of coverage for any one of these technologies is minimal. However, this is perfect for an introduction to each of these technologies so that you know what the each one is good for and how to get started with them. It certainly beats buying and wading through half a dozen different books to come up to speed on all of these technologies!
However, there are a few things in the book that I would have liked to see different. First, JSP is introduced early and doesn't mention JSF for a few more chapters. Since this book is aimed at an introductory level, I would have expected the text to at least suggest using JSF instead of JSP before it discussed JSP in detail -- new users should start on JSF instead of JSP, or at least be given the option. Why learn bad habits from JSP? In fact, I think the book should have done its readers a favor and deemphasized JSP a lot more in general. The 2 chapters dedicated to JSP (JSP & later JSTL) should have been combined.
As for the JSF chapter, again it used JSP. However, in this case, I can see the authors dilemma. JSP is the only view technology that is immediately available out-of-the-box when GlassFish is installed, but JSP isn't the way anyone should write JSF applications. In my opinion, the author should have mentioned JSP, maybe showed one quick example... then merged the Facelets section at the back of the book (in the Beyond Java EE chapter) into the JSF chapter. The majority of the examples should have been using Facelets -- or better yet JSFTemplating (ok I'm biased and I admit it! BTW, did you know JSFTemplating supports the Facelets syntax and is a GlassFish project?). While we're at it, throw in Ajax4JSF which would otherwise be left lonely at the back of the book.
Another thing I would have liked to have seen is a chapter, or maybe an appendix, on GlassFish sub-projects explaining what they are (JSFTemplating, Metro, jMaki, Phobos, Grizzly, Sailfin, Shoal, Woodstock, HK2, etc. -- there's a list on the bottom of the GlassFish homepage). I would have also liked to see a couple paragraphs at the beginning of the book when introducing GlassFish about the GlassFish community. It could have point users to The Aquarium blog, GlassFish Forums, the GlassFish Wiki, GlassFish IRC Channels, and of course give some information on how to participate in the community.
So, would I recommend this book? I would absolutely recommend it, to anyone just learning Java EE or anyone that would like a quick overview of everything Java EE offers. It's also a great book for more experienced developers that may not be familiar with all parts of Java EE. However, if you're looking for an in-depth book on any one of the topics covered in this book... do the math, the book is 400 pages and covers ALL of Java EE (with lots of screen shots!).
If you're ready to buy the book, here's a link to it on Amazon (I don't get paid if you click on this link... unless someone can tell me how! ).
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.
Sunday May 06, 2007
By paulsen on May 06, 2007
I have received questions from several people about how to use the "FileStreamer" feature of JSFTemplating. So I thought a blog would be the best way to demonstrate how it works.
FileStreamer provides the ability for the FacesServlet to stream content to the client (i.e. web browser). If that sounds generic, it is because FileStreamer is very generic. It allows you to define a ContentSource that is capable of getting content from just about anywhere. You might choose to get content from a database, retrieve it via a web service, generate it in code, access it from the filesystem or the classpath, or just about anywhere else. The ContentSource interface allows you to specify the content and information about it so that appropriate http headers will be set, causing the client (browser) to treat it correctly (i.e. Content-type, Content-Disposition, etc.). In addition to this, FileStreamer works in the context of JSF, meaning you will have access to managed beans or anything you require from your JSF environment. (NOTE: FileStreamer actually provides a Context which interacts with its environment. This allows different Context implementations to be provided for different environments; Servlet and JSF Contexts are currently available, see: ServletStreamerContext and FacesStreamerContext).
Lets look at a couple of examples.
First you have to have your JSFTemplating evironment setup. Follow these instructions for this.
Next to configure FileStreamer for JSF, add the following to your web.xml file:
The context-param registers 2 ContentSources. The source to both of these is checked into JSFTemplating's demo application. You can browse that source online here. The servlet-mapping requires a prefix mapping and needs its own dedicated FacesServlet mapping. "/resource/\*" is the default, however, this can be configured, see RESOURCE_PREFIX for more info.
Let's take a look at the key part of the ExampleContentSource to see how it works.
The above ContentSource (ExampleContentSource) is very simple, it generates its content from a String (see green text above). The String is some text with the request path (which is the PATH_INFO of the request, in other words the part of the URL after the "/resource"). Notice I added some HTML tags to show how they're treated. The red text shows that the Content-type is being explicitly set to "text/plain". This should cause the browser not to parse any html (so we should see those <b> tags on the screen).
As you can see, this simple ContentSource produces plain text in the browser. You also see that the URL requires "contentSourceId=example". "example" comes from the "id" of ExampleContentSource.
Let's take a look at 1 more example ContentSource. We'll use the same URL, except we'll use the contentSourceId of "proxy" to target our other ContentSource. Below is the interesting part of the source code for ProxyContentSource.java:
Again we are creating an InputStream, however, this time we are getting it via a URL. This time instead of hard-coding the Content-type, we're setting the extension of the file so that it will be mapped to an appropriate Content-type. Here's the output for the same URL as before (except w/ our "proxy" contentSourceId):
In this example, the content is pulled from java.sun.com from the server (not the client), then streamed to the client. The appropriate Content-type of "image/gif" was sent to the browser so that it could treat the content correctly. If you run this example, try other urls and types of media (html, pdf, doc, etc.).
I hope this blog gives you an idea of how FileStreamer functionality is useful. Please leave a comment and let me know what you think! Below is one more section describing how to configure FileStreamer in a Servlet environment (doesn't need JSF):
That's it... the rest is the same as above. You can change the url mapping directly in the web.xml file in this case. Oh... and yes, you can use the same ContentSources in both environments!
- 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