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
Solved

Relative / Absolute paths within servlet engine

Posted on 2003-11-03
3
255 Views
Last Modified: 2013-11-24
I have a class which is attempting to load an XML document from the file system of the machine its operating on and then process it. I'm loading it into a JDOM document which takes either a java.net.URL or a java.io.FILE object as a parameter. I can get it to work if I pass in an absolute path/URL, but I can't figure out how to do using a relative URL.

Any ideas?

Dave
0
Comment
Question by:howesd
  • 2
3 Comments
 
LVL 1

Author Comment

by:howesd
ID: 9674166
Oops - I forgot to mention that I'm running inside a Tomcat 3.x environment
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 125 total points
ID: 9674212
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9674380
:-)
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

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