MDK Development Cycle | MDK Wizard Configuration | Import a .war file into a new project | Export a Project into a .war File
This function sets basic options for the mobile application. To activate
this function you have to click onto to the Project Properties icon in
the toolbar ().
A dialog window with all MI projects on the workbench is displayed. Select the
project and choose Next. The dialog window for the project properties
is displayed.
![]() |
When you have a MI project, that you created as regular Java project (and not with the New MI Project function of the MDK plug-in), this project is not be displayed in the project selection window and therefore, can not be selected. In order to make a regular Java project to a M project, you have to select the Java project in the Package Explorer window and than choose the Project Properties icon. The selected project is than displayed with the other MI projects and you can select it. |
web.xml for EXAMPLE.war <web-app> <servlet-mapping> <servlet-name>Example1</servlet-name> <url-pattern>/start</url-pattern> </servlet-mapping> <servlet> <servlet-name>Example1</servlet-name> <servlet-class>example1Servlet</servlet-class> </servlet> </web-app> This entries define, that the class example1Servlet is called when the mobile application is started with the URL: http://localhost:4444/EXAMPLE1/start |
WEB-INF/classes
folder of the .war file. When this option is enabled all resource bundle
files, with the extension .properties of the selected project are
packed into the WEB-INF/lib/ApplicationName.jar file.![]() |
When you set this option manually, be sure to use the MDK project
folder structure (for more details, see Export
Project into a .war file). If you use a different folder structure,
the "export to .war file" function will produce an error. |
Start MI Homepage when browser is launched: When you export your
project to a .war file (for more details, see Export
Project into a .war file), you can select an option to instantly deploy
the application and view it in the web browser. The URL to your application
is generated with the name of the .war file and the URL pattern. If you
want to start your applications out of the MI Homepage (not with a direct
URL), you have to enable this option. In this case your application is deployed
and the web browser comes up with the Mobile Infrastructure login screen.
![]() |
When you change this option you have to export (for more details, see Export Project into a .war file) the application at least once, so that the setting takes effect. You do not have to run the application, just export. After that, the Eclipse Launch Configuration is updated and you can start the application with the Eclipse "Run ..." or "Debug ..." command. |
When you change options (for example, Option 7 and 8) that have an effect on the Launch Configuration (The configuration that is used by the Run...
or Debug...
command)
you have to use the export function (for more details, see Export
Project into a .war file) to change the launch configuration. You do not have to enable the "Run the application" option in the export function dialog window.
The Launch Configuration is update just by generating a new .war file.
The Mobile Infrastructure provides a listOfJars.txt file, which includes all necessary .jar files for application development. It also defines the order in which the .jar files have to be loaded. The MDK plug-in adds all .jar files that are listed in the listOfJars.txt file and stored in the WEBINF/lib folder of the current project to the classpath of the current project whenever a .jar/.war file is imported into a new Eclipse project. The classpath of the current project is updated when you choose the FINISH button on the project properties dialog window. You should perform a classpath update every time a new Mobile Engine release or service pack has been installed.
When a WAR file is imported with the MDK plug-in, Javadoc for the MEg.jar
libraries is automatically assigned. You can see the Javadoc for MEg.jar
by clicking on MEg.jar
and then press the keys <Shift> F2.
To assign Javadoc to your project or to the different libraries yourself, click with the right mouse key on the library or on the project you want to assign Javadoc to. Select the "Javadoc Location" command in the "Properties" menu. You can choose the "Browse" button to select the Javadoc location. The Javadoc for the Mobile Infrastructure is located in:
<ME_HOME>/webapps/mdk/content/javadoc
To use assigned Javadoc in Eclipse, select the project or library with the left mouse button and then press the <Shift> F2 key combination or you use the Eclipse commands Navigate > Use External Javadoc.