Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Suggest an approach to handle this need in Struts.

 
Giriraj Bhojak
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Our web application extends Struts 1.3 in a big way.
I have a task wherein::
1) I need to find all the action mappings in all the struts config files(we have more than 10 of them) and write all the path attributes in an xml file.
2) And then as the application is deployed and used, I need to find all the unique paths traversed and write them to probably the same xml file.
I have identified the hooks where I need to place the code.
But i am concerned about the approach as writing to an xml file on every http request would be a big performance hit.
Could anyone suggest me a better way to handle this?
Also which XML api should I use to write to the file. It has to be efficient too as i need to write unique paths traversed to the xml file and this means i would need to find if the incoming path already exists in the xml file.

Regards,
Giriraj.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Parsing the Struts configs and finding action mappings is trivial.

It sounds like you just want to log access--why not just use the existing container HTTP logging mechanism?! Otherwise you're just logging everything twice. And logging those to the same file seems kind of weird, since they're completely different types of information.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic