*
The moose likes JSP and the fly likes Getting tha name of the JSP page? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Getting tha name of the JSP page?" Watch "Getting tha name of the JSP page?" New topic
Author

Getting tha name of the JSP page?

faisal usmani
Ranch Hand

Joined: Jan 14, 2006
Posts: 139
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 ]
Rashid Mayes
Ranch Hand

Joined: Jan 11, 2006
Posts: 160
getServletConfig().getServletName()


Rashid Mayes
http://www.hostj2me.com/ - http://www.worlddeveloper.org/
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Or you could just use log4j.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
faisal usmani
Ranch Hand

Joined: Jan 14, 2006
Posts: 139
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

Joined: Apr 14, 2004
Posts: 10336


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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting tha name of the JSP page?
 
Similar Threads
JSP, Beans and Session
How can i use message window in servlet
How to do this ?? anyone has a sample code?
Struts + Applet
any othe way to getParameters?