I want to know what parts of my web page the users use and then present it in a nice graphic interface. The only thing I could come up with was this:
@Controller
public class WebController {
@Autowired
private DatabaseResource dbr;
@RequestMapping("/foobar")
public String getFoobar(Principal principal, ModelMap model, HttpServletRequest req) {
dbr.logVisit(req); //write the request to a database
//...
At each @RequestMapping I write the request to the database. Is this the best way to do it?
Does it exists a library for this so I do not have to write it all my self? A package that works a bit like Eclipse Usage Data Collector.
I'm using Spring and Spring Security.