File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Cattle Drive and the fly likes The path less travelled..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "The path less travelled....." Watch "The path less travelled....." New topic
Author

The path less travelled.....

Carol Murphy
village idiot
Bartender

Joined: Mar 15, 2001
Posts: 1197
In the case of the following path assignments, why is the second example, (aka the relative path) preferential to the first example, (aka the absolute path?) Oh, wait, because if this were being deployed on another system whose deploy.dir variable was set to a directory other than /orion/applications, the absolute path wouldn't work? I think I just figured something out....


<fileset dir="/orion/application-
deployments/default/defaultWebApp/persistence"
includes="*.java,*.jspCache"/>

<fileset dir="${deploy.dir}/../application-
deployments/default/defaultWebApp/persistence"
includes="*.java,*.jspCache"/>
[ March 21, 2006: Message edited by: Carol Murphy ]
Pauline McNamara
Sheriff

Joined: Jan 19, 2001
Posts: 4012
    
    6
<pre>
< fileset dir="/orion/application-<br /> deployments/default/defaultWebApp/persistence"<br /> includes="*.java,*.jspCache" />

< fileset dir="${deploy.dir}/../application- <br /> deployments/default/defaultWebApp/persistence"<br /> includes="*.java,*.jspCache" />
</pre>



Those paths were a little shy so I tried to drag 'em out into the open...
...there they are! (a couple pre tags and some spaces did the trick)
[ March 21, 2006: Message edited by: Pauline McNamara ]
Carol Murphy
village idiot
Bartender

Joined: Mar 15, 2001
Posts: 1197
Doh! Forgetting to change those pesky less-than symbols to their html equivalents is my favorite recurring mistake these days!
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9047
    
  10
Remember to put the semicolon after the &lt
If you type &lt; you should see <


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9047
    
  10
Originally posted by Carol Murphy:
Oh, wait, because if this were being deployed on another system whose deploy.dir variable was set to a directory other than /orion/applications, the absolute path wouldn't work? I think I just figured something out....


Yes, it just makes it slightly more flexible. Perhaps someone installed orion under orion2 instead of orion. Yet the same relative path would work for both.
 
Don't get me started about those stupid light bulbs.
 
subject: The path less travelled.....