*
The moose likes IDEs, Version Control and other tools and the fly likes Netbeans: Issue with accessing configuration files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Netbeans: Issue with accessing configuration files" Watch "Netbeans: Issue with accessing configuration files" New topic
Author

Netbeans: Issue with accessing configuration files

Scott Updike
Ranch Hand

Joined: Feb 16, 2006
Posts: 92
I'm a newbie to Netbeans and have an issue accessing all javascript and image files in my configuration directory. If I have an image file called image1.gif in my project configuration directory, the only way that I can access it (ie, view it) is to put the fully qualified pathname starting at c:\....\Project1\conf\image1.gif. I thought that I would be able to access these objects with only a pathname starting with the context path /Project1/conf/image1.gif? This presents an issue with using some of the struts-layout tag libraries since "internally" the links that are created by sturs-layout use only pathnames beginning with the context path and not the fully qualified pathname.

What do I do? I noticed there is a project.properties file that has an entry for the configuration directory (conf.dir=conf). Should I change it here?

Thanks,
Scott
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2501
    
    8

Scott,
the only way that I can access it (ie, view it) is to put the fully qualified pathname
What do you mean with access it?
I can access my files in the files tab (next to the projects tab). The tree in the files tab starts at the base dir of the project. From there on I can drill down my project's directory structure.

Regards, Jan


OCUP UML fundamental and ITIL foundation
youtube channel
Scott Updike
Ranch Hand

Joined: Feb 16, 2006
Posts: 92
Sorry for the confusion. Basically I was stating that the only way I can see a .gif image on the screen is to put the fully qualified pathname



instead of

.

Before using the NetBeans IDE I was able to just use the context path only and not the fully qualified path names. I know this must be a setting in NEtbeans, but I've yet to figure out where I make that configuration. THis same issue is also affecting how the struts-layout libraries are working (for treeviews). They are generating HTML with the context pathname and nothing is working correctly. THe only way I can make this work is to go into the JSPs and hardcode the fully qualified pathnames in some of the codes.

I'm really confused on this...
Scott Updike
Ranch Hand

Joined: Feb 16, 2006
Posts: 92
I'm not sure why the images are not showing up in my last post, but here it is again...

I have to use

img src="c:\...\ProjectX\conf\file1.gif"

instead of

img src="/ProjectX/conf/file1.gif"

which I used to use before migrating to NetBeans....
Scott Updike
Ranch Hand

Joined: Feb 16, 2006
Posts: 92
Ok, here is another example that may clear up what my question is. I can specify the contextual path name for my struts actions as in the following tree item code:

layout:menuItem key="Company Setup" link="/ProjectX.1/ListCompany.do" target="workspace"

But I have to use the fully qualified pathname to get the app to recognize the existence of the the javascript file:

script type="text/javascript" src="c:\java code\Struts\ProjectX.1\conf\javascript.js"

I don't understand why I can just use the contextual path for the javascript just like I can with the struts actions. This same limitation is affecting my ability to use supplied gif files that come with the struts-layout libraries.

Thanks in advance.
scott
 
GeeCON Prague 2014
 
subject: Netbeans: Issue with accessing configuration files