• Post Reply Bookmark Topic Watch Topic
  • New Topic

User Behavior Tracing

 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are developing an application based on MVC architecture.

I want to trace the user navigational behavior. We plan to have logic implemented in controller.

But when user clicks on any link in JSP, it calls another JSP page directly and not sending request to the controller.
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use Session attributes to track a user.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chetan Parekh:
We are developing an application based on MVC architecture.

I want to trace the user navigational behavior. We plan to have logic implemented in controller.

But when user clicks on any link in JSP, it calls another JSP page directly and not sending request to the controller.


As you said that you are following MVC architecture. So, isn't it better to navigate through the controller rather than JSP to JSP directly. All your request should go to the controller first in order to make log from a single place. Controller is there to entertain the requests. By passing controller would result in something, navigation logs, you couldn't go for sure. And you know that.
[ November 18, 2005: Message edited by: Adeel Ansari ]
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moreover, Filter is a good candidate for logging stuff.
[ November 18, 2005: Message edited by: Adeel Ansari ]
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Adeel Ansari:


As you said that you are following MVC architecture. So, isn't it better to navigate through the controller rather than JSP to JSP directly. All your request should go to the controller first in order to make log from a single place. Controller is there to entertain the requests. By passing controller would result in something, navigation logs, you couldn't go for sure. And you know that.

[ November 18, 2005: Message edited by: Adeel Ansari ]


Problem is that I have nearly 5,000 static HTML pages that have over 100,000 cumulative hyper links.

I have converted them into JSP pages by renaming them to .jsp from .html and added necessary common JSP code.

Presently JSP is calling another JSP using hyperlink, but now that has to be done via controller.

How to do that at 100,000- places across 5,000 file?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem is that I have nearly 5,000 static HTML pages that have over 100,000 cumulative hyper links.


In this case, Mr. Ansari's second suggestion would be your best bet.
You can map a servlet filter to intercept, and log, any request for ".jsp" and/or ".html".
This can be done without having to change any of your hyperlinks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!