• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Collecting out-bound data in extended Action Servlet

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having a struts based application where i need to log incoming and outgoing data to the system. To achieve this, i extended the action servlet and trying to log all in-bound and out-bound data. For the in-bound data, I'm collecting the values from request.getParameters() iterate through them and log it as key value pair.

Question:

How will i get the out-bound data?

I tried using request.getParameters(), in a similar way as i did for the in-bound data. But this just contains the information, which was keyed in by the user. Is there any other way to get the out-bound data? I couldn't find a method in the response object to get the data.

Appreciate your help.

- Aravindan -
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You actually might want to look into Filters before you continue to far down this road. Filters are built exactly to do what you are trying to do.

Best of Luck,

Nate
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nate is right. Also, I would hope that this application does not have very many users. Otherwise, you could end up with ridiculously gigantic log files!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic