Solved

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

Posted on 2009-05-20
7
259 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
  • 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
eclipse apache tomcat admin console 52 121
SHA2 certs for IIS AND Java? 2 113
eclipse buid path vs tomcat lib path 10 34
Running JavaFX on the Raspberry Pi 27 39
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
This video teaches viewers about errors in exception handling.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

856 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