wood burning stoves 2.0*
The moose likes JSP and the fly likes how detect a location  of any *.jsp? 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 "how detect a location  of any *.jsp?" Watch "how detect a location  of any *.jsp?" New topic

how detect a location of any *.jsp?

Ranch Hand

Joined: Nov 08, 2001
Posts: 45
Hi, all.
I have any *.jsp file in address TOMCAT_HOME/webapps/jsplocation/test.jsp.
I need to get a full path of this *.jsp at run-time.
I tried these ways (methods), but without success.

I need to get "TOMCAT_HOME/webapps/jsplocation/test.jsp" or "TOMCAT_HOME/webapps/jsplocation/".
How can I do it?
Please, any idea...
Thank You for your answer.
[ October 11, 2002: Message edited by: dajac chison ]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60783

Check out ServletContext.getRealPath

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link: http://aspose.com/file-tools
subject: how detect a location of any *.jsp?
Similar Threads
Problem in with Tomcat 5.0 to run jsp
Connection Pooling : Does anybody have connection pooling code in jsp?
JSP Basics query
Couldn't run JDK1.5 generics in JBOSS4.2.1
Creating a directory within a webapp