?
Solved

is there any replacement for java.io.File( "." ).getCanonicalPath()

Posted on 2013-11-20
3
Medium Priority
?
460 Views
Last Modified: 2013-11-21
Hi,
I am using eclipse and Tomcat to develope a simple Web tool.

I have a question on the new File( "." ).getCanonicalPath() in my jsp.
When I run the web project in my eclipse, I found the new java.io.File( "." ).getCanonicalPath() is D:\eclipse,

But after I export the web project and put it into my CATALINA_HOME\webapp,
 the java.io.File( "." ).getCanonicalPath() is changed to CATALINA_HOME\bin

is there any replacement for java.io.File( "." ).getCanonicalPath() ?

or any other way to change folder to CATALINA_HOME\webapp
0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 20

Author Comment

by:Sathish David Kumar N
ID: 39662515
y its showing bin folder ??
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 2000 total points
ID: 39662772
http://docs.oracle.com/javaee/6/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String) with "/"

is probably what you should be using, although i'm guessing at your intention
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39665606
:-)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month12 days, 22 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question