on 2007 Apr 16 9:07 AM
Hi,
I need to find out the directory structure of xMII either through JavaScript or through xMII.
The example of the structure : e:/inetpub/wwwroot/...
When we say location.pathname in HTML or window.location in JavaScript it gives back the URL not the directory structure.
Could anyone please guide me through this?
Thanks,
Lavanya
Request clarification before answering.
Lavanya,
Consider creating a global property in BLS which contains the default file structure unique to that system. The global property would be named the same on all systems. Now when you create a transaction, referencing the file structure is as simple as calling the global property.
Does this make sense?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Lavanya,
The closest solution to your answer would be to do call the following URL:
The URL above will display the folder hierarchy in the WebRoot. However, it will not return the actual file path for the WebRoot. Here's why...
xMII is a web application which is hosted and managed via the ServletExec Web Application Server. ServletExec takes care of resolving the OS file hierarchy and allows xMII to use only relative paths for both the File Paths and URLs. This is built-in security for the Java Servlet Model.
To best tackle your scenario, I would recommend that you create a unique Global Property call "WebRoot" on each of your xMII Servers and set its value to the file path of your system: "C:\Inetpub\wwwroot". In your transactions, you only need to reference "Global.WebRoot" to access this property.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For xMII version 12. Use:
Web content is published to the file system
\sap\F48\JC30\j2ee\cluster\server0\apps\sap.com\xappsxmiiear\servlet_jsp\XMII\root\CM\R3
Three ways to save content to the database within the workbench
1) db://project/folder or db://project/WEB/folder
This method does not automatically publish content to the file system
The following URL can be used to force a publish
http://<server>:<port>/XMII/Catalog?mode=blowout&folder=project/folder
2 ) web://project/folder
Content is automatically publish
3 ) server://XMII/CM/project/folder/file.txt
Can be used in the same fashion as localhost is used in IIS
regards,
Federico
Hi Lavanya,
Assuming you are running xMII on a Windows box, you can use an NTFS hardlink to create a virtual directory (e.g. C:\xMIILogs) which points to the "actual" directory in the file system tree (e.g. D:\Lighthammer\logs), which can be different between systems. You can create hardlinks via the command line or by using a tool called HardlinkShellExt; and since they are a function of the underlying file system, they are completely transparent to the operating system or any application (such as xMII).
If you create these hardlinks in the root of the C: drive (e.g. C:\xMIILogs), then you can reference them in the file/XML I/O actions in BLS using either Windows or UNIX-style file paths. Both "C:\xMIILogs" and "/xMIILogs" will correctly reference the hardlink, and writing to them will create files in D:\Lighthammer\logs (continuing the above example).
Hope this helps,
Sascha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Lavanya,
I understand that you are interested in exposing the xMII File Directory structure via Javascript but can you tell me what you are attempting to accomplish?
Thanks,
Michael Teti
Senior Solutions Architect
Infodat International, Inc.
mobile 713.598.8352
email michael.teti@infodatinc.com
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
What I wanted is to pass that directory structure to XMLSaver action block in the BLS. XMLSaver needs the whole directory structure to save the XML file on the server.
XMII Directory structure might not be the same in every system on which my application is to be deployed. So I need to find out the directory structure and pass it to BLS.
Thanks,
Lavanya
Hi Lavanya,
Can you elaborate the scenario with one more example.....?what directory structure do you like to know actually. is it to web pages in xmii or any other.....?
regards,
Ravi Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually I need this to save an xml file on the server using XmlSaver action block.
To do that URL is not sufficient. We need to give a path with directory
Ex. e:/inetpub/wwwroot/Application/MyDir/File.xml.
Here e:/inetpub/wwwroot/.. may not be the same for different systems on which the application is deployed.
Rest of my files web pages, queries etc.. are also in that path. So if I can retrieve that path name using either xMII or JavaScript I can use it in XmlSaver block.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.