aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "how detect a location  of any *.jsp?" Watch "how detect a location  of any *.jsp?" New topic
Author

how detect a location of any *.jsp?

dar
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
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

Check out ServletContext.getRealPath
hth,
bear


[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
Couldn't run JDK1.5 generics in JBOSS4.2.1
Creating a directory within a webapp
Connection Pooling : Does anybody have connection pooling code in jsp?
JSP Basics query