pathname

bat file: get parent pathname

The following mostly works. 'Mostly', because the use of the SOMETHING..\tasks\ pathname confuses Spring when a context XML file tries to include another by relative pathname. So, what I seem to need is a way, in a BAT file, of setting a variable to the parent directory of a pathname. set ROOT=%~dp0 java -Xmx1g -jar %ROOT%\..\lib\ajar.j...

Highlighting current page in the nav

Hi I need to highlight the current page in my left nav. The nav has to be loaded externally via an .shtml include: <!--#include file="leftnav-menu.inc"--> My urls take the form of: www.xxx.com/mission-critical.shtml but sometimes just: www.xxx.com/energy.shtml (eg one word no hyphen) My nav lists it as 'Mission critical' How ca...

Displaying Images from Client-Machine in HTML

I was unable to display local images in both IE6 and IE7. Below is a page where you can see a demo: http://www.thaiperfect.com/anytest/ Any advice? ...

How to get the full pathname of the current shell script?

Is there a less brute-force way to do this? #!/bin/ksh THIS_SCRIPT=$(/usr/bin/readlink -f $(echo $0 | /bin/sed "s,^[^/],$PWD/&,")) echo $THIS_SCRIPT I'm stuck using ksh but would prefer a solution that works in bash too (which I think this does). ...

How to get a path to a resource/file out of a Java JAR file

Hi there, I'm trying to get the path to a file that it is located out of the java jar and I don't want to use an absolute path. An exampel: lets say that the jar is located in ~/lib/myjar.jar and the file is located in the same folder. What I've trying is something like this, but it fails: File myfile = new File(this.getClass().getRes...

Getting the pathname of an inherited class in PHP

I'm trying to get the absolute pathname of a PHP class that inherits from a superclass. It seems like it should be simple. I think the code below explains it as succinctly as possible: // myapp/classes/foo/bar/AbstractFoo.php class AbstractFoo { public function getAbsolutePathname() { // this always returns the pathname of ...