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


Vintage V-Mac Industries Inc. Pipe Threader Vosper Drophead Threader - READ picture

Vintage V-Mac Industries Inc. Pipe Threader Vosper Drophead Threader - READ

$199.00



Vintage Mac Warehouse  3.5ā€¯ Floppy Disk Solar Powered Calculator Company Swag picture

Vintage Mac Warehouse 3.5ā€¯ Floppy Disk Solar Powered Calculator Company Swag

$66.60



Vintage Mac Tools AW343 Series 1/2 Pneumatic Impact Driver  picture

Vintage Mac Tools AW343 Series 1/2 Pneumatic Impact Driver

$50.00



Vintage MAC Tools UVEX Adjustable Safety Glasses Motorcycle Mechanic Lawnmower picture

Vintage MAC Tools UVEX Adjustable Safety Glasses Motorcycle Mechanic Lawnmower

$64.99



Vintage VTG A. W. Mack 122387 Large Industrial Fuse Puller 100 Amp - 600 Amp picture

Vintage VTG A. W. Mack 122387 Large Industrial Fuse Puller 100 Amp - 600 Amp

$104.99



Vintage UNHOLTZ-DICKIE MAC-6C Equipment - Untested As-is picture

Vintage UNHOLTZ-DICKIE MAC-6C Equipment - Untested As-is

$71.99







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