BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 02-06-2005, 01:29 PM   #1
stefan
Knows Where the Search Button Is
 
stefan's Avatar
 
Join Date: Oct 2004
Model: Curve
Carrier: Vodafone
Posts: 26
Default TUTORIAL - Setup OTA test environment

Please Login to Remove!

I recently bumped into the following problem: I needed to setup a test environment for OTA download. For this I planned to use Tomcat version 4, and JDE 3.7 which comes with MDS and simulators for the different Blackberry devices available. Below is a description of how to do it:

Step 1: Install Tomcat
- run setup and indicate a listening port other than 8080(which is default) for example 8001. This is necessary as MDS (which by the way is also a Tomcat implementation) listens on port 8080. Do not forget to check the option that installs Tomcat as a Windows service. It is very useful when restarting the application server very often.
- if during the installation you forget to set Tomcat to listen on a different port, you can edit the file %TOMCAT HOME%/conf/server .xml and look for 8080 inside it. Tomcat documentation has more if you need to enter into details
-verify that Tomcat installed correctly by accessing with a web browser (I prefer Firefox) http://localhost:8001. You should see Tomcat homepage.

Step 2: Create a small web application that will represent the webpage you will connect to using the simulator. For that write a small jsp page:

Start.jsp
Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "httpxxx58;//www.wapforum.org/DTD/wml13.dtd">
<%@ page contentType="text/vnd.wap.wml" %>

<wml>
<head>
        <meta http-equiv="Cache-Control" content="max-age=0" forua="true"/>
</head>
<card title="MyTest">
<p align="center">
Welcome to my wml test page
</p>
<p>Please click on the link below to download your application</p>
<p align="left">
<%
String a="<a href='TestAplic.jad' accesskey='1'>TestAplic</a><br/>";
out.printlnxxx40;axxx41;;
%>
</p>
</card>
</wml>
Also needed is the web.xml file where you should include the MIME types for .jad and .cod files:

web.xml
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
  "httpxxx58;//java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
  <display-name>MyTest</display-name>
  
  <!-- The Usual Welcome File List -->
  <welcome-file-list>
    <welcome-file>start.jsp</welcome-file>
  </welcome-file-list>

<!—Added the MIME types -->
<mime-mapping>
	<extension>jad</extension>
	<mime-type>text/vnd.sun.j2me.app-descriptor</mime-type>
	<extension>cod</extension>
	<mime-type>application/vnd.rim.cod</mime-type>
</mime-mapping>
  
</web-app>
Step 3: Deploy the web application including .jad and .cod files
The directory structure should be “webapps/mytest/WEB-INF/web.xml”
Also in “mytest” directory copy the files “start.jsp” the TestAplic.jad file and the TestAplic.cod file

Step 4: Run it:
- Start Tomcat
- Start MDS by clicking on Start->Programs->RIM->JDE3.7->MDS
- Start the simulator and using the web browser access the page “http://localhost:8001/mytest”
- Click on the link to download the application into the Blackberry simulator

Note: During the testing I noticed that when using JDE 4.0 one does not need to specify the MIME types for jad and cod files.
Offline  
Old 02-09-2005, 06:33 AM   #2
Mark Rejhon
Retired BBF Moderator
 
Mark Rejhon's Avatar
 
Join Date: Aug 2004
Location: Ottawa, Ontario, Canada
Model: Bold
Carrier: Rogers
Posts: 4,870
Default

Good job! Thanks for posting.
__________________
Thanks,
Mark Rejhon
Author of XMPP extension XEP-0301:
www.xmpp.org/extensions/xep-0301.html - specification
www.realjabber.org - open source
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


6.3V 10V 16V 25V 35V 50V 100V 400V SMD Aluminum Electrolytic Capacitor 1-1000 UF picture

6.3V 10V 16V 25V 35V 50V 100V 400V SMD Aluminum Electrolytic Capacitor 1-1000 UF

$155.59



CBB61 250V  Capacitor 2 wires 1/2/3/3.5/4/5/6/7/8/9/10/12/15/18/20/24/25/30 UF picture

CBB61 250V Capacitor 2 wires 1/2/3/3.5/4/5/6/7/8/9/10/12/15/18/20/24/25/30 UF

$129.95



45/5 MFD ±5% Dual Run Capacitor 370 450 VAC CBB65 AC Motor HVAC 45+5 uF Fan 10pk picture

45/5 MFD ±5% Dual Run Capacitor 370 450 VAC CBB65 AC Motor HVAC 45+5 uF Fan 10pk

$85.99



5pc Radial Electrolytic Capacitor 250V 100V 50V 25V 16V 0.22uF-4700uF 10000uF picture

5pc Radial Electrolytic Capacitor 250V 100V 50V 25V 16V 0.22uF-4700uF 10000uF

$27.99



500pc Radial Electrolytic Capacitor Assortment Kit 24 Value 0.1uF-1000uF 10V-50V picture

500pc Radial Electrolytic Capacitor Assortment Kit 24 Value 0.1uF-1000uF 10V-50V

$13.04



6.3V~450V 10uF~10000uF High Frequency LOW ESR Radial Electrolytic Capacitor picture

6.3V~450V 10uF~10000uF High Frequency LOW ESR Radial Electrolytic Capacitor

$39.07







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.