TestStand API: Set relative path
Dear NI community!
Could someone help, please, with the following - is there is some option to set file path to code modules, inside test sequence, to have relative, but not absolute path? I add programmatically code modules to sequence steps, but currently they have absolute path. Is it possible to change it to relative with TestStand API?
Thanks in advance.
Solved!
Go to Solution.
I was wrong. It's possible to manually cut path to file (according to Search Directories of TestStand). Then code modules will be added with relative pathes. But one should be careful - path should be cut correctly.
For example, I have full path
E:\Development\source code\supplementary\TestVIs\Code Modules\Service\Print.vi
My Search Directory is
E:\Development\source code\supplementary\TestVIs\
So, I need to cut like this:
Code Modules\Service\Print.vi
and without slash at the beginning!
Then it will be OK.
Similar Messages
-
Screen Painter Image Button cannot set relative path
Hi,
I am using screen painter to create a UI form and i put image into each button. The form can run properly in my PC due to the image path is under my local path. However, the button is gone when i install the UI form in other PC. When using button object in screen painter and it not allow me to set the relative path. Anyone can help??
Cheers,
AnnaHi Gianluigi,
Thanks for your reply. However, i did try to rename the .srf file to .xml file and change the path to the following
<b><specific image=".\test3.jpg" /></b>
But the program didn't work. But if i change it to <b><specific image="c:\test3.jpg" /></b>, give it the exact path then the program work again.
Do you have any idea on it?
Anna -
Setting up a relative path in the "open file" dialog window
Hello there,
I want to open a PDF file through a clickbox out of
Captivate. The path I have to put in there has to be absolute, I
guess.
Is there any possibility to put a relative path in there?
To get you a clue, what I want to do with that, here is my
intention:
I want to build up a splash screen for a Auto-Run-CD, where I
want to link some reference documents.
Thanks in advance for your suggestions,
MarkusHi Markus
Normally all you have to do is just type the file name of the
file. Then ensure the Captivate output and the file you are linking
to are in the same folder. If you don't like that approach, I
believe Captivate will accept another relative path that is set up
perhaps like this:
Root level of CD
Documents folder
So the link would look as follows: Documents/SomeFile.PDF
Cheers... Rick -
Relative path for images in RTF templates
Hi everybody!
When I insert an image in a RTF template, I put its path into the web dialog, in order to see correctly the picture when I open the report from the xmlp server, in this way: url:{"http://servername/analytics/res/Images/image.bmp"}
How can I make this path relative, in order to see the images even if the server name changes?
Thanks so!
FrancescoHi Tim,
I am using BIP 10.1.3.3.2. I am able to access system variable CURRENT_SERVER URL.
Steps:
<?param@begin:CURRENT_SERVER_URL?>
<xsl:value-of select="$ CURRENT_SERVER_URL"/>
CURRENT_SERVER_URL is getting printed in BI Publisher. Value displayed is http://xx4697.xxx.co.in:9704/xmlpserver.
Now we are importing xsl into RTF template. File aaa.xsl is stored at [BIP_Installation_Directory\oc4j_bi\j2ee\home\default-web-app]
We have hardcoded the path for XSL in RTF. The path is <?import: http://xx4697.xxx.co.in:9704/aaa.xsl?>
As we want to set dynamic path we changed hardcoded xsl path to <?import: {$CURRENT_SERVER_URL}/../aaa.xsl?> but it is not working. Sometimes BIP is taking local path of MyDocuments folder and sometimes Desktop path. If I put that XSL file in MyDocuments folder or Desktop, it is working fine. But ideally it should refer [BIP_Installation_Directory\oc4j_bi\j2ee\home\default-web-app] path...
Thanks,
Amit D -
Using relative path for in file/ftp adapter
Hi All,
How to have a relative path for file/ ftp adapter's inbound/outbound operation?
Example: Consider $ORA_HOME = /home/oracle --> This environment variable can be different on different machines
i want to drop a file in to $ORA_HOME/folder1/folder2 (Or poll for a file).
<partnerLinkBinding name="FTP">
<property name="wsdlLocation">FTP.wsdl</property>
<property name="out_dir" type="LogicalDirectory">What do i write here???</property>
<property name="retryInterval">60</property>
</partnerLinkBinding>
if i cant configure this in partner link section or in activation agent sction, how else do i achieve this?
i am using 10.1.3.* version.
Thanks in advance.
Roshan.You can achive it using the deployment scripts if the directory is changing on the basis of the environment
If you want to change at run time than you can use the jca properties to set using the variables at runtime.
Regards,
Ajay -
Relative paths for images upset by forwarding requests
Hello World.
I am using a web app deployed in Weblogic 5.1 with service pack 8.
I have hit a problem which puzzles me. When I forward a request from
one JSP to another (say from A to B) the web server seems to take the
URLs of the images on the served file (B) relative to the path on the
calling file (A). Here's a detailed explanation...
Suppose I have a the web app structured as follow
/oddApp/launch/A.jsp
/oddApp/B.jsp
/oddApp/images/tick.gif
Page A simply stores its request URI and forwards its request to page B
<jsp:forward page="/B.jsp" />
Page B displays its requestURI, contextPath and servletPath. It also
attempts
to show three images
<img src="images/tick.gif">
<img src="../images/tick.gif">
<img src="/images/tick.gif">
When I invoke page B directly, the first image is shown, the others are not.
When I invoke page A, it forwards to B and the second image is shown, the
others are not.
In each case the URI, contextPath and servletPath are correctly displayed
with regard to page B.
URI = [oddApp/B.jsp]
contextPath = [oddApp]
servletPath = [B.jsp]
The URI in A.jsp is also correct (i.e. /oddApp/launch/A.jsp).
The search for the images seems to be relative to the original URI (i.e. not
the URI used to forward), which strikes me as daft. It means that page B
must be aware of where it is being called from. It is perfectly plausible
that
relative paths which suit when called from one location are incorrect when
called from another.
I had thought that including the leadling slash (as shown as the third
image)
would cause the search relative to the document root (/oddApp/), but this
appears not to be the case. The search is done relative to the root of the
server not the web app.
Adding jsp mappings in the deployment descriptor of the web app does not
help (I had thought it a long shot anyway).
Does anyone have any thoughts on this?
PHiL
i face the same problem (WinNT, WLS6.0): my wep app has a contextRoot " root " which makes it react to the URL: http://host:port/root /: it is this folder which will be used as a basis by the Web server But in the jps I use a relative URL for images: / images/toto.gif : it works very well when I deploy my jsp out of a Web-app by setting a document.root to the weblogic web server.On the other hand, once deployed in a Web-app, images are not found because the default path of the browser is http://host:port, without the context root of the Web-app! In other words, my war has images/*.gif in its root but when /images/toto.gif is resolved in a jsp, as the relative URL is not prefixed by my context-root, the image is not search in the war! actually, if I type http://host:port/root/toto.gif, my image appearsany clues? an alias on the web server? a setting in web.xml/application.xml and their weblogic equivalent files?
-
Relative path to Images ?
I recently migrated from Win XP to a new PC Win 8. Moved all the files & D.W. related apps... all went relatively seamless. But I noticed the Relative path to any Image that created in Photoshop still has the old path
i.e.
Original (old) file:///C|/Documents and Settings/My Documents/PMF Web Design stuff/Menu_Button_Home_2013.psd
New file:///C|/Documents/PMF Web Design stuff/Menu_Button_Home_2013.psd
Is there a file in my D.W. site that has these paths ???If so I could do a global update ... I have dozens of these type entries... would hate to do all 1 by one.
THANKS in advanceGuess I did Not explain my dilemma correctly. My site worked fine after I migrated to the new PC... all the SOURCE Images were in my root folder... What I could not find (up until now) was where the ORIGINAL .PSD files were referenced. D.W. keep sync information with Photoshop, if/when the Original gets updated... D.W. notifys you. Please see scrnshot GREEN arrow below.
After several hours of P.D. I figured it out for future reference.... the ORIGINAL file is referenced in a sub-folder of your Image Folder... called _NOTES each & every image has an associated .JPG.MNO file.
Simple example Home_Button.JPG resides in Image folder... Home_Button.JPG.MNO resides in _notes.
Down near the bottom of Home_Button.JPG.MNO is a record that points to the ORIGINAL Parent file.
Looks something like: <infoitem key="FilePathSrc" value="file:///C|/Users/Documents/PMF_Design_PSD/Home_Button.psd" />
I had hundreds of these that need updating... I used the D.W. Find & Replace feature... took a few tries to get all the options set correctly. But it saved me several hours.
Hope this helps someone in the future migrate to/from PC's, -
Hi There,
I'm having difficulty with an FLV video I want to show in my
presentation.
The path has to be relative which I assume means relative to
the .swf file that launches it. So I add the .flv to a slide in my
presentation and set the path as simply the name of the file. The
file is stored along with the project and when I test it in preview
mode it works fine.
When I publish to .swf and watch the presentation running on
my local machine the video displays fine. But when I upload to the
webserver and watch it over the internet....... no video.
I tried typing the file as:
MyFile.flv
/MyFile.flv
\MyFile/flv
and none of them work.
What am I doing wrong?
Thanks in advance.Hi all
Just an update on this situation. Jerry was kind enough to
send me a link to test. The net result is that the video is
refusing to play even if it is linked to directly.
This would seem to indicate one of the following is true:
* The file name is different (perhaps SafetyNet.flv or
SAFETYNET.FLV or safetynet.FLV)
* The server doesn't know how to or that it should transmit
FLV file types
* The file simply doesn't exist in the location as you
believe it does.
At this point it's appearing that perhaps the server doesn't
recognize FLV files. There is more on that at
this
link.
Cheers... Rick -
I use Liferay Portal. It has a defined directory structure for all portlets and expects files to be in their proper locations. One of these is that it expects all .jsp files to be in the /webroot/html directory.
The problem is that all references in the struts-config.xml to .jsp files are assumed to be relative to the /html directory. So if, for instance, I set the path as /test/test.jsp then Liferay looks for the file in /html/test/test.jsp. But NitroX requires the full path, including the /html.
I've gotten this to work on another competing product - in that product I set the Web Root to be the /html directory and it works great. That product allows you to set the path of the struts-config.xml separately. Is there any way to do something similar with NitroX? I tried changing the webroot in the .m7project file manually but it doesn't like it. It seems to insist that the struts-config.xml file is in the webroot.
Thanks.NitroX currently supports only a war directory structure. When a project is created, the Web Application Root directory is computed as the directory containing the WEB-INF folder (which should contain the web.xml file).
All web app resources (JSP files, image, css files, etc) are expected to be under the Web Application Root directory (at any nested directory level).
We will enhance this behavior in the future to support arbitrary directory structures. -
hi all,
I am making a small program that needs to store some of the users preferences in a text file. I want the text file to be in the jar when i am finished and in the same folder as the main class. I am having a problem though with writing to a reading the file in a relative path. when i use "args.txt" it reads to the c:\args.txt and not the folder in which the program runs. Same thing with "\\args.txt" and "/args.txt". Any help? Thanks! :)If your file is in the same directory as the program the relative path is simply the file name : "args.txt". Also possible is "./args.txt".
Keep in mind though that you can't write to a file in a jar, and even reading it is more complicated than with the ordinary I/O classes.
Look up the getResourceAsStream method in the API (I think it's a method of the ClassLoader class). -
Relative path for servlet property file.
I have the following java file. When I use the absolute path for the configFile, it works. I would like to know how I could use it as relative path as in installation, the name of the directory could change.
How do I fix the problem? Thank you.
---------------------- LoadProperties.java ----------------
import java.util.*;
import java.io.*;
public class LoadProperties {
private String driver="";
private String dbURL="";
private String login="";
private String password="";
static public void main(String[] args) {
LoadProperties lp = new LoadProperties();
} // main
public LoadProperties() {
//String configFile = "C:/1LMS/web-app/WEB-INF/config/db.properties";
String configFile = getClass().getResource("config/db.properties").toString(); <--- This line could not find the db.properties file.
Properties Prop = new Properties();
try {
FileInputStream configStream = new FileInputStream(configFile);
Prop.load(configStream);
configStream.close();
} catch(IOException e) {
System.out.println("Error: Cannot laod configuration file ");
driver =Prop.getProperty("driver");
dbURL = Prop.getProperty("dbURL");
login = Prop.getProperty("login");
password = Prop.getProperty("password");
printResult();
} //Load Property
private void printResult() {
System.out.println("Driver = " + driver);
System.out.println("dbURL = " + dbURL);
System.out.println("Login = " + login);
System.out.println("PSWD = " + password);
} // classhi there,
had the same problem... you need to use following API:
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)
In your case something like that:
// get the servlet context
ServletContext context = getServletContext();
// directory name where the file is located
String realPath = context.getRealPath("/config");
// get real path to your file
String propertyPath = real+"filename.txt";
hope that helps!!
minu -
I have a use case where I need to use different download directories with different firefox profiles.I need to use this profiles in multiple linux machines.
I need to have a relative path to my download directory with respect to the profile folder.
Ex: I have a selenium test which opens a website and downloads it to my machine.I want this downloaded file to go into some specific folder relative to this profile folder.How do I do this??That is not a practically empty xinitrc - that file only needs one line: exec WM. Other things are entirely optional, and some of them very useful, but I'd encourage you to stick with the simplest xinitrc that will do what you require.
Is slim involved? Probably. That is the source of many problems. But to start narrowing this down, I have 3 suggestions:
1) temporarily (at least) change your inittab to default to runlevel 3 ... actually, is it currently set to 5 or 3? if it is currently 3 that would explain why slim doesn't start.
2) at a tty in runlevel 3 use "xinit" instead of "startx". Startx is fine most of the time, but it is essentially just a complex wrapper for xinit. That complexity can often iadd useful functionality, but it *always* makes troubleshooting more difficult. So for now just use a vanilla 'xinit'.
3) remove dbus-launch from your exec line in xinitrc. This is done by console-kit so it is redundant and potentially problematic. Further BOTH of these are taken care of by slim, so I'd even suggest getting both a jump start on being ready for slim and simplifying troubleshooting by removing both of them. Just make that line "exec openbox-session"
Edit: adding one more:
4) temporarily switch out openbox-session for openbox. I suspect the reason feh's setting of the background is getting overridden is due to a script or setting in openbox's autostart settings - many of these are only invoked when "openbox-session" is called, while "openbox" starts *just* the window manager itself.
Last edited by Trilby (2012-10-03 17:30:36) -
Problem defining relative path ofr images in struct tiles
hi
I have a jsp pages in which i am setting the layout using tiles . To display an image
i am using < img src= "./../images/abc.gif" />
this doesnt seem to work.
but if i give absolute path like src="C:\myDoc|....\abc.gif" it works.
As i have to deploy it so i cant give absolute path.
One solution i found is to use request.getContextPath()
<img src="<%=request.getContextPath()%>/tutorial/images/abc.gif" works.
is there any way we can give relative path like ?
< img src= "./../images/abc.gif" />Hi , I have found the solution.
<c:url value='/javascript/menuscript.js'/>"{code} can be used to avoide the absoulte path . The c:url tag takes default value as Webcontent . so you need to give only path after the webContent -
Hello,
I want to use common xsl file in RTF template. I will hardcode the path of the xsl file. Path should be relative path. Can anyone tell me how can I import xsl file into RTF template using relative path. e.g relative path may be BIP web cerver path. Currently I am using <?import: http://xp1111.xxx.co.in:9704/abc.xsl?> but it is not relative path.
Thanks,
Amit D.Hi Tim,
I am using BIP 10.1.3.3.2. I am able to access system variable CURRENT_SERVER URL.
Steps:
<?param@begin:CURRENT_SERVER_URL?>
<xsl:value-of select="$ CURRENT_SERVER_URL"/>
CURRENT_SERVER_URL is getting printed in BI Publisher. Value displayed is http://xx4697.xxx.co.in:9704/xmlpserver.
Now we are importing xsl into RTF template. File aaa.xsl is stored at [BIP_Installation_Directory\oc4j_bi\j2ee\home\default-web-app]
We have hardcoded the path for XSL in RTF. The path is <?import: http://xx4697.xxx.co.in:9704/aaa.xsl?>
As we want to set dynamic path we changed hardcoded xsl path to <?import: {$CURRENT_SERVER_URL}/../aaa.xsl?> but it is not working. Sometimes BIP is taking local path of MyDocuments folder and sometimes Desktop path. If I put that XSL file in MyDocuments folder or Desktop, it is working fine. But ideally it should refer [BIP_Installation_Directory\oc4j_bi\j2ee\home\default-web-app] path.
Thanks,
Amit D -
Hi,
Merry Easter to All of You!..
i am facing a problem in setting the dynamic image path in crystal report
the path is stored in Database field,and physical images are stored in a folder
the path specified is relative path and works fine when the report is run directly , but it seems that the report runs in temp folder when called from vb.net windows application.
hence the relative path specified w.r.t to database field fails when called from application.Download SP 0 for CR 2008 from here:
https://smpdl.sap-ag.de/~sapidp/012002523100007528552008E/cr2008_sp0.zip
Next, see [this|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do] note on how to work with image in Crystal Reports.
Ludek
Maybe you are looking for
-
What does this console msg mean and how can I stop it?
This is about a CDMA iPhone 4 running iOS 4.2.10 (8E600). The console displays the following message every 10 seconds forever: Wed Aug 31 12:36:47 unknown com.apple.launchd[1]<Error>: (com.apple.mobile.installd.mount_helper) posix_spawn("/usr/libexe/
-
BAPI_PO_CREATE1 : missing del indicator on a service line
Hello gurus, I'm facing a problem in the first distribution of a Purchase order (created from a Purchase Requisition) from SRM. The problem occours only if the PO has been created from a PR taken from the sourcing cockpit in SRM and happens only on a
-
hi all, in the material master , plant spec view i need to upload the shelf life fields fields are : min. rem shelf life , tot shelf life , period of sled how to upload this fields along in the materials mater for the existing materials
-
The "dropdown for "Save passwords is NOT grayed out. Clicking the "save password box does NOTHING. I am running Windows XP SP3. The previous version (21) worked fine. Version 223 does not allow for passwords to be saved. I am NOT in the Private viewi
-
I've written an applet that has three checkboxes and three textboxes. I've imbedded that applet inside a jsp. When the user checks one of the checkboxes, how do I check for that inside the jsp? Having determined which checkbox was chosen, I need to s