• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Path stuff..........

 
village idiot
Posts: 1208
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's path stuff, again. I'm looking over the instructions for Servlets 4b, and it mentions that certain files are to be put in com.javaranch.drive.videos, so I try to extract one of them using WinZip to the appropriate file, and I end up with a duplication in the file structure. I guess when the files were zipped, their location was specified so that when they got unzipped the directory structure would be created automatically. So I think I have them in the right spot.
Now, there is another class called PathFinder, that deals with finding the absolute path rather than the relative path. After reading through it a few times, I just don't follow. Is there some tutorial that anyone knows of that can help me get past this block I have when it comes to understanding paths and the notation used to specify them? What frustrates me is that I just know this stuff is simple, but I can't seem to grasp it.

I'm quoting from the documentation in PathFinder.java:

The JSP's are at the root of the com tree.

There is a clue in there somewhere, but I can't find the com tree. I don't even know what kind of leaves a com tree has!

 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Carol Murphy:
It's path stuff, again. I'm looking over the instructions for Servlets 4b, and it mentions that certain files are to be put in com.javaranch.drive.videos, so I try to extract one of them using WinZip to the appropriate file, and I end up with a duplication in the file structure. I guess when the files were zipped, their location was specified so that when they got unzipped the directory structure would be created automatically.



When you open the zip file in WinZip, look in the right-hand column for the path it will be unzipped to. In other words, if you see com/javaranch/ next to a file named "file.txt" and you unzip it to C:\java, you'll end up with C:\java\com\javaranch\file.txt
 
Marilyn de Queiroz
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Carol Murphy:
Now, there is another class called PathFinder, that deals with finding the absolute path rather than the relative path. After reading through it a few times, I just don't follow. Is there some tutorial that anyone knows of that can help me get past this block I have when it comes to understanding paths and the notation used to specify them? What frustrates me is that I just know this stuff is simple, but I can't seem to grasp it.

I'm quoting from the documentation in PathFinder.java:

The JSP's are at the root of the com tree.

There is a clue in there somewhere, but I can't find the com tree. I don't even know what kind of leaves a com tree has!



"the root of the com tree" means the directory where com/myCompany/... lives. The files are the leaves.
[ March 19, 2006: Message edited by: Marilyn de Queiroz ]
 
Marilyn de Queiroz
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using Google I found these.
http://www.webdiner.com/webadv/begin/paths.htm
http://www.ibdhost.com/help/path/
http://zone.ni.com/devzone/conceptd.nsf/webmain/87EBC63F845C086786256890007EC8B8
http://www.linux-tutorial.info/modules.php?name=Glossary&term=relative%20path
http://www.communitymx.com/content/article.cfm?cid=AEDCC52C4AD230AD
http://www.ozoneasylum.com/5737
http://www.roseindia.net/javajdktutorials/c10/s2.shtml (about half way down)
http://www.gailer-net.de/tutorials/java/Notes/appendixA/htmlPart2_9.html

I'd be interested to know whether you found any/all of these helpful. I mostly learned through reading the API and trial and error.

One problem is that when you're talking about a web app, it's somewhat different than talking about a command line app. In the command line application, your root is probably C:\

In a web app, the root is relative to where the web application lives in the server.
 
Carol Murphy
village idiot
Posts: 1208
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the links Marilyn! I'm half way through the first one, and now I know what ../ means. ( I never had to learn any DOS, so a lot of this stuff is new to me. ) I think this is exactly what I needed.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic