I have googled around attempting to find an answer to this question, but I have had no luck so I will ask it hear in the hopes that one of you can help!
I am attempting the use the javascript method navigator.geolocation.watchPosition to continuously gather location data.
The scenario is that I have a java web application using servlets and jsps, and I would like to begin geolocation collection when the user logs in, and stop when the user logs out. The data would be uploaded to a sql database after being collected. I have successfully been able to collect data for a single page, but I don't know how to implement a solution that works across all pages in the application.
I appreciate any and all help, thanks!
Since you are developing a Java web application, I would suggest
<script src="url to tracking JS file">
right before </head>
tag. The filter doesn't need to inject this script reference if it finds current user hasn't logged in yet.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.