dtkhshi 0 Newbie Poster

I have written a web app with a few JSP pages and Java servlets running on a Tomcat server. The app needs to be able to send location updates to a Servlet every x seconds. I have found the html5 watchPosition(sucess_callback, error_callback) function to get the location updates from the web page. I'm thinking.. once I get the update from this function.. I'll put code in the success_callback function to send the update to a Servlet. But adding the watchPosition function to every JSP page in the app seems cumbersome. What is the right way to send periodic GPS updates to the server no matter whatever webpage the user is viewing in the app?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.