Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Getting tha name of the JSP page?  RSS feed

 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello ranchers,

I want to know is there any way to get the name of the JSP page using java . I mean is there any such concept to get the name of the Jsp page as we can get the name of the java class files using java.lang.reflect.*;
getClass() method .

I have to make a log file , where any message coming from a JSP page to Tomcat console should be logged , beside the name of the JSP.


Thanx in advance .
[ May 19, 2006: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
getServletConfig().getServletName()
 
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or you could just use log4j.
 
faisal usmani
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Paul Sturrock:
Or you could just use log4j.



Actually i am working on log4j , but dont have much knowledge about it,can you give me some resources on log4j , besides i need to delete the content of the log file(completely) after every 50 days. The application is running on Tomcat , is there any provision given in log4j for deleting contents of the file, or if there any provision to delete the old file and create a new file with the same name.


Thanx in advance.

-faisal
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


is there any provision given in log4j for deleting contents of the file, or if there any provision to delete the old file and create a new file with the same name.


Yes. You can archive log files based on date or file size. Have a look at the FAQ which should get you started.
 
The world's cheapest jedi mind trick: "Aw c'mon, why not read this tiny ad?"
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!