Introducing Atjeews

What is Atjeews?

Atjeews is a full blown application server is capable to run on mobile devices as phones and tablets powered by Android. It is 100% based on TJWS. So far Atjeews is the first product of such class available. There are several products looking similarly including Jetty, but after close look they do not provide all functionality given by Atjeews.

Why Application Server for mobile platform?

Application Server tremendously extends capabilities of the mobile platform for all levels of users. It gives also an opportunity to application vendors launching a new line of web interfaced products targeting mobile platforms. Just out of the box it is possible managing content of a mobile device, install applications from SD card, share music and video, install certificates and much more. The possibilities get extended after installing first web application taking the role of a web interfaced file manager with such useful functionality as file exchange with mobile device over wi-fi. Since Atjeews is capable to deploy standardly packaged web applications, nothing specific is required for development such applications. Say more the applications do not need to be designed specifically to run on a particular mobile platform and it is a great way for portability of mobile applications.

Google have already made one important step in this direction, just read the following quote "On the mobile team, we strive to produce web apps which look and feel just like installed apps." It means a whole revolution in mobile application development, no needs to learn a particular mobile platform and have a separate team porting applications there. Adobe is also persuading same approach. Read the following quote: "Taking an app to multiple devices no longer requires writing separate code for each platform. Watch how Flex and Adobe® Flash® Builder® 4.5 software let you develop dynamic, high performance apps for multiple platforms".

Another revolutionary step provided by Atjeews is migrating to a new approach named as Cloud in pocket. Cloud computing is very popular nowadays, but not many people realize that cloud can be just in your pocket. So be first who entered in the new era.

What do I need to get started with Atjeews?

You need to install Atjeews.apk. You can either get it from Google Play or build from GitHub repository. Android will take care of installing the archive. Server isn't enabled after launch to safety reason. Enable it first checking off corresponding box. The server comes with pre installed Settings servlet. You can access it after launch and manipulate with Atjeews settings, enable HTTPD servlet, deploy web applications and manage serviced IP addresses.

Note that if you'd like to password protect settings servlet access (good idea), user name will be empty string, so leave this field blank (not filled), when a browser requests your access credentials. There is youtube video helping to get started with Atjeews, especially for people not having any computer background.

How can I create web application to deploy under Atjeews?

Nothing is specific to develop and package web applications running on Android. Just follow web UI guide for mobile device browsers if you plan to use application from Android itself. You can develop also multi faced applications using WebBee framework allowing to use it as from mobile device browsers as from desktop browsers. Since Android devices may have limited hardware resources, it is recommended to use small footprint web application frameworks as Aldan3 and WebBee for web application development. You are not restricted to use any standard Java web application development techniques. JSP are completely supported. JDBC connection pool is available, so SQLite JDBC driver can be used. Android specific JNDI will be available since next version.

Is my web application .war file ready to be deployed?

Actually not. Android JVM can't understand standard Java bytecode, so all Java binaries have to be converted in Dalvik format first. However you do not need to do that manually, just use 7Bee script to do that. The script will also precompile all JSP, since no Java compiler is available on Android platform to do so. TJWS, Jasper (TJWS version) and Android SDK have to be installed on computer where such conversion happens.

How run Atjeews using SSL

First step is obtaining web server certificate. It has to carry host name of Android device and be signed by CA. However for testing or personal purpose, a certificate can be generated using gencert target of 7Bee script. The certificate keystore file has to be uploaded to a server. Use Settings screen and upload keystore file. It is important that your key containing keystore file has name keystore. Atjeews will manage it properly and stash it.

Since Android doesn't support JKS keystore format, the file has to be generated in BKS format. So 7Bee environment variable BC_PROVIDER_LIB has to point to Bouncy Castle provider jar file corresponding to your JDK version. (Note that you need Bouncy Castle provider jar of version 1.46, otherwise you will get error incorrect store version). Unlimited key policy file has to be downloaded and applied when JDK is used from Oracle site. The link to unlimited key policy file is on bottom of JDK download page. Instead of using 7Bee script, Portecle keytool GUI wrapper can be used. Please note that currently keystore password has to be changeme or matching to Settings password when set. Therefore if you decide to change or set password after deploying keystore, then you need to update keystore file with proper password. Android and any other browser will warn you about not CA signed certificate, so eventually it is recommended to get it signed by CA.

Since certificate carries device host name as CN attribute, Android device host name has to be fixed somehow, for example in DHCP.

Quick guide how to start web applications development for Android

I receive many requests how to develop web applications for Android. As it was stated nothing specific required for development such applications. However I would provide a good starting point as a small "Hello world" application. Please download the guide from here.

If you access Atjeews application from a desktop and use Internet Explorer then make sure you do not use Android assigned host name as android_<8 bytes hex number>. This host name doesn't follow respective RFC having underscore in the name. Internet Explorer has awareness of that and doesn't send cookies to such named hosts. Other browsers may not aware and send cookies. As a work around can be either use IP address, or root Android and change default host name, or provide DNS alias, or the best one as switch to a browser of other vendor.

What should I aware at long run?

If you run Atjeews on everyday base, like me, then you need periodically clean log directory. It is usually located at /sdcard/Android/data/

Back to TJWS