Solved

Very Urgent. How to get a relative path from the absolute path

Posted on 2009-05-20
7
261 Views
Last Modified: 2013-12-22
This gives the absolute path

c:\net\user\anonymous\testfile.jpg

How do i get relative path from it ..like http://website:7001/user/anonymous/testfile
             
0
Comment
Question by:cutie_smily
[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
  • 3
  • 3
7 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 24433455
In what context are you working - a webapp?
0
 

Author Comment

by:cutie_smily
ID: 24434011
yes , webapp
0
 

Author Comment

by:cutie_smily
ID: 24434020
yes, webapp
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Author Comment

by:cutie_smily
ID: 24434022
yes, we app
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 24434561
Please post what the following returns:
out.println(request.getContextPath());

Open in new window

0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24436776
:-)
0
 
LVL 92

Expert Comment

by:objects
ID: 24437222
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

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…
In this post we will learn different types of Android Layout and some basics of an Android App.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

691 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