• Post Reply Bookmark Topic Watch Topic
  • New Topic

Retrive URI from an HTTP webrequest

 
sajeev Jaladharan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

How can I retrive the URI from a HTTP web request (Say Appache tomact is listening in the port 80)by listening in the same port. I want this to know for checking possible anomalous content with the request such as
GET /scripts/..%252f../winnt/system32/cmd.exe?/c+dir HTTP/1.0 ,, which may possibly cause trouble to the server.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easiest would be to turn on Tomcat's access log valve which causes all request URLs top be written into a log file. Search server.xml for "AccessLogValve".

If you need something fancier, or handle such issues at runtime, then a servlet filter can access all necessary information.
 
sajeev Jaladharan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:The easiest would be to turn on Tomcat's access log valve which causes all request URLs top be written into a log file. Search server.xml for "AccessLogValve".

If you need something fancier, or handle such issues at runtime, then a servlet filter can access all necessary information.


Thank you very much sir. I have to try it out.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!