Installation guide
33
com.demo.mobile -> New -> Class, fill Location (JavaBeans) in the Name: field, click Finish.
Modify Location.java as it is shown in Appendix-4. Right click com.demo.mobile -> New -> Class,
fill ConnDB (Database Access) in the Name: field, click Finish. Modify Location.java as it is
shown in Appendix-5. Now the basic architecture of JSP is ready.
1.3. Configure an Apache Tomcat Web Server
We have to configure an Apache Tomcat web server to run the website. In Eclipse, click File ->
New -> Other… -> Server -> Next -> Apache – Tomcat v6.0 Server -> Next -> add DynWeb from
Available to Configured -> Finish. Now the server is added as it is shown in the figure below.
1.4. Create a userinfo Database
Open pgAdminⅢ, click Postgres -> Tables -> SQL (as it is shown in the figure below). Create a
userinfo table, and insert values as it is given in Appendix-6. NOTE: execute SQL statement one
by one.
Now run the Android app and use Emulator Control in DDMS to simulate changes of GPS
locations, and check the result of the database by executing the SQL statement of select * from
userinfo. Congratulations if values of reportlat and reportlon in the table of userinfor changes
accordingly.
Section 2 – Create a JSP Webpage
Create a jsp file with the name of stockholm.jsp, and copy style.css file given in the Bilda into
the project. The structure of the website is now as it is shown below. Modify stockholm.jsp as it
is in Appendix-7.