Mail4ME servlet setup and MIDlet setup (READ THIS)
Johannes Zellner <[email protected]> Fri, 27 Feb 2004 02:38:00 +0100
| Newsgroups | gmane.comp.java.enhydra.mail4me |
|---|---|
| Message-ID | <[email protected]> |
Hello,
there seemes really few documentation about this subject.
Here's how I got it working with a Nokia 6100 the servlet running on
tomcat / debian:
[-- SERVLET INSTALLATION --]
1. install tomcat
2. download http://mail4me.enhydra.org/software/downloads/mail4me-classes-j2se.zip
3. download http://mail4me.enhydra.org/software/downloads/web.xml
4. create a 'war'-file:
a) mkdir WEB-INF
b) mkdir WEB-INF/classes
c) copy the web.xml from above to WEB-INF/
d) copy de/trantor/mail/proxy/ to WEB-INF/classes/
e) jar cvf mail4me.war WEB-INF
the mail4me.war should now contain (verify with jar tvf mail4me.war)
META-INF/
META-INF/MANIFEST.MF
WEB-INF/web.xml
WEB-INF/classes/de/trantor/mail/proxy/
WEB-INF/classes/de/trantor/mail/proxy/ProxyServlet$1.class
WEB-INF/classes/de/trantor/mail/proxy/ProxyServlet.class
WEB-INF/classes/de/trantor/mail/proxy/ProxySession.class
5. place mail4me.war in the directory /var/lib/tomcat4/webapps (on debian)
or whereever tomcat is looking for webapps.
6. as tomcat is started with the security option on debian, you must grant
access to java.net.SocketPermission to mail4me. On debian, you've to
create a file /etc/tomcat4/policy.d/20mail4me.policy which contains
the following lines:
grant codeBase "file:${catalina.home}/webapps/mail4me/WEB-INF/classes/-" {
permission java.net.SocketPermission "*", "connect";
permission java.net.SocketPermission "*", "resolve";
};
on other systems these lines should be placed somewhere in
tomcat's "conf/catalina.policy".
7. the port 8080 is hardcoded in the Mail4ME MIDlet. You've to make sure,
that tomcat listens to this port. On debian tomcat listens by default
to 8180. You've to edit tomcat's "conf/server.xml" and replace the
port 8180 by 8080 for the "Tomcat-Standalone" service. Make sure that
no other web service (e.g. apache) is listening to 8080.
8. restart tomcat. (e.g. /etc/init.d/tomcat4 restart)
9. optional: verify that tomcat ist listening to 8080: connect to
http://localhost:8080/, that should give some tomcat startup pages.
[-- PHONE SETUP --]
1. "Local host" --> "localhost"
2. "Inbox host" --> whatever your server is, e.g. "fred.dot.com"
3. "HTTP proxy" --> "On"
4. "Proxy host" --> the server where tomcat is running, e.g. "my.server.org"
- you must not preceed the server name with http://
- a port number CAN NOT be appended (it defaults to 8080)
As I didn't find the MIDlet sources, I found out stuff like the
hard-coded port number mainly by using different devices (e.g. emulators
as microemulator or sun's j2me emulator).
--
Johannes