Storing last user page in DB

Discussions

EJB design: Storing last user page in DB

  1. Storing last user page in DB (3 messages)

    In my project we have to store user's currently displayed page content(html code) in DB. This is useful for CSR to see user's current page. I'm planning to use servletFilter's concept but not sure how to get the html code as a stream/string inorder to store in DB. I appreciate any suggestions/comments?
  2. Hi,
    I think you should use a HttpServletResponseWrapper that uses you output stream. Make your output stream write in the real output stream (for ythe browser) and in a buffer (later to be saved in DB) or directly in DB.
    Best regards,Mircea
  3. Storing last user page in DB[ Go to top ]

    Hi,I think you should use a HttpServletResponseWrapper that uses you output stream. Make your output stream write in the real output stream (for ythe browser) and in a buffer (later to be saved in DB) or directly in DB.Best regards,Mircea
  4. Thanks for your help. It works fine with servlets and jsp's, not for other ones.
    For an example..if I use sendRedirect("1.html") in the Servlet I am getting empty output in DB(eventhough 1.html content is displayed in the browser... But if I use sendredirect("1.jsp") everything is cool. I appreciate your help.