Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

This is another post  of our Netweaver Mobile 7.1 series where we share best practices and tips and tricks for development of mobile applications. The available blogs in this series are

This is the 3rd post in this series. It describes how the autologin feature of Netweaver Mobile 7.1 helps to increase productivity during development.

During development of an Netweaver Mobile application redeploying components and restarting the container is required quite often. It can become annoying to login to the container on each startup again, especially when the container is running on a PDA and no keyboard is available. It would be preferable to skip the login to shorten the roundtrip time.

To achieve this Netweaver Mobile 7.1 offers a feature called "autologin" to supply the username and password credentials through Java system properties. So it is not necessary anymore to enter the credentials manually in the login screen. The name of the according system properties are mobile.dbguser.name and mobile.dbguser.password. These have to be appended to your startup command line. If you use myuser / mypass  as username / password the appropriate line is

-Dmobile.dbguser.name=myuser -Dmobile.dbguser.password=mypass

For the desktop version of the client it has to be added to MI/bin/startup.bat, the wince version uses MI/bin/launch.properties. E.g. after modification the startup.bat looks somehow like this:

set MOBILE_JVM_OPTS=%MOBILE_JVM_OPTS% -Dmobile.home=.. -Dtomcat.home=..     omcat  -Dmobile.dbguser.name=myuser -Dmobile.dbguser.password=mypass 
"%JAVA_HOME% injava" -Xmx512M -classpath "%MOBILE_BIN%sap.com~tc~mobile~cfs~startup~impl.jar" %MOBILE_JVM_OPTS% com.sap.tc.mobile.cfs.startup.pda.Startup %MOBILE_OPTS%

If the container is started from within Eclipse the arguments can be added to the VM arguments of the launch configuration.

Note: The user is not automatically created by setting these system properties, so you still have to manually create it on your first container login. To login with a different user you can just use the logoff menu entry to come to the login screen again.

This hint applies to Netweaver Mobile 7.1 beginning with SP3 and a recent patch level.

4 Comments