|
Mobile Phone Development
Colin P. Fahey
<<< BACK TO MOBILE DEVELOPMENT
APPLICATION DEPLOYMENT
MAKE SURE THE WWW SERVER KNOWS JAR/JAD MIME TYPES
If you have an Apache web server, you need to create an ".htaccess" file for
your web page root directory. This file allows you to override the Apache
configuration, such as adding or overriding MIME types. You must add the JAR
and JAD types, as shown in the following text file:

[FILE: .htaccess ]
AddType text/vnd.sun.j2me.app-descriptor jad
AddType application/java-archive jar
AddType text/vnd.wap.wml wml
|
FIGURE: My custom ".htaccess" file for the Apache WWW server.
(NOTE: Under Windows this file was called ".htaccess.txt"
for editing purposes, but you MUST change the name to just
".htaccess" once the file is transferred to the WWW server.)
Apparently, creating or modifying this file results in an immediate change of
server behavior. I guess the server checks if the ".htaccess" file
modification date and time has changed before processing each transaction.
If you have another kind of web server, you must determine how to specify MIME
types and make sure JAR and JAD are specified just as they are above.
You will know if the MIME types have not been set up if the phone refuses to
download your *.JAD file with a message like:
"406: Not Acceptable"
OPTIONALLY PROVIDE LINKS TO YOUR *.JAD FILE
With the Motorola T720 J2ME phone with AT&T, I am able to type in the URL of
the *.JAD file directly, and the application downloads and installs. This may
hold for other phones and carriers. But you may want to have links to the
*.JAD files in your HTML or WML (WAP) pages:

FIGURE: A simple HTML page with a link to the *.JAD file.

FIGURE: A simple WML (WAP) page with a link to the *.JAD file.
<<< BACK TO MOBILE DEVELOPMENT
CONTACT INFORMATION
Colin P. Fahey
cpfahey@earthlink.net
http://www.colinfahey.com
|
|