• 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

Printing the Url's in a jsp

 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

Is there a way to print the url hitting Tomcat. Are there any configuraton changes that I can set up in Tomcat so that I can do this??
[ March 25, 2007: Message edited by: Jothi Shankar Kumar Sankararaj ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Print them to where; the user's browser, a log file on the server?
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Print them to the Tomcat console!
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are talking of the local URL that is being accessed, then that is being logged on the access log in the TOMCAT_HOME/logs file.

If you are talking of the REFERER header, then you could write a filter that is mapped to all requests which reads that from the request and logs it to System.out. That would also work for logging the local URL.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In tomcat/conf/server.xml there is an entry for a access-logging valve.
It is commented out by default.
If you uncomment it, it will log all access to tomcat in the standard logging format, recognized by Webalizer and the other popular log analyzing tools.

Depending on how you've installed and started Tomcat, stdout will either go to one of the log files under tomcat/logs or to the console.
There are free programs out there that will allow you to watch any log, in real time, just like the console.

In Unix the "tail -f" command will do this.
I've seen various free "tail" programs for windows.
Textpad also allows you to do this.
reply
    Bookmark Topic Watch Topic
  • New Topic