Wednesday, February 29, 2012

XLight FTP server

As a web developer, I sometimes get the task to communicate with an FTP server. Usually, that server is remote, and not under your own control. Therefore, it is often difficult to troubleshoot and pinpoint possible problems. For instance, last I wrote some code to transfer a file to an FTP-folder, where it was supposed to be picked up and printed. My code was executed without errors, but the document was never (or partially) printed.

The FTP server was actually a printer, and there was no way to view the actual folder. And even if that would have been possible, we could never be sure the file had been transferred, because the printer was constantly polling for new files.

So, to be sure our file transfer worked, we had to transfer the file to a 'regular' FTP-printer. While some people have an FTP-server running somewhere, I do not, so I had to download, install and configure one. That seemed like a tedious job, to just run a simple test. So I started looking for a simpler solution, and found one.

The answer was XLight FTP Server. This is a very lightweight FTP server, that does not require installation. You download the standalone FTP Server, unzip it, and run the .exe file included. You create a new virtual server, adjust some configurations, start said server and your own FTP server is up and running.

Tuesday, February 28, 2012

ADF 11g: SelectOneChoice not showing

Creating a dropdownlist with a List of Values for an attribute is easy in ADF 11g: create a ViewObject, link it with a List of Values through a View Accessor and add the List of Values to your attribute. That's basically it. If you now drag-and-drop said attribute on your page, JDeveloper will ask you if you want to drop it as a 'Single Selection'. There you select 'ADF Select One Choice', and voila, there you have a dropdownlist with your List of Values.

But sometimes, and it has happened to me before, the dropdownlist is not showing. Of course, you start to check and double check, even up to the point where you just delete everything you just did, and start over. To no avail.

If you ever face this issue, bear in mind that 1 simple configuration can mess up your result. In this particular case, I had the List of Values linked to a Transient Attribute. Of course, Transient Attributes are, by default, not editable. This is quickly fixed by changing the 'Updatable'-property to 'Always'.


If you now run your application again, the dropdownlist is showing correctly! This is one of those things you actually know, but run into every now and again. Especially if it's been a while since you linked a List of Values to a Transient Attribute...

Google App Engine

Recently, I started building my own website. Since I'm a Java developer, I wanted to build a website in Java. For work, I usually build web applications using Oracle's ADF, so for now, I wanted to use some other technology.

Of course, building a website in Java offers a lot of possibilities, but it also has its drawbacks. For example, most free webhosting solutions don't support Java applications. Therefore I had to either put up my own server, or find some cloud solution.

I opted for the latter, and quickly encountered Google as a provider for my needs. And more specifically: Google App Engine. After some quick research, I found that there are plugins for Eclipse (or STS, in my case) to get started easily. After installing the Google App Engine SDK Plugin for Eclipse, creating and deploying an application to the web is a matter of a few clicks!

More information on how to build applications for Google Apps Engine will follow shortly, in upcoming posts.

Stay tuned!