Find and view a network file in the page of the ADF
Hello
I have a simple requirement where at the click of a button link in my page ADF, I need to display an html page stored in the network location (e.g. / / < host name > / folder1/folder2/demofile.htm)
I have only the path and only a substring of the filename, so I have to search for the file in the network directory using this substring. Once I have the file name, I use af:goLink to navigate to the network path and view the file in the browser.
Here is the piece of code from Managed bean and the jspx
FindFilebean.java
.
.
path = "" \< host name > \\folder1\\folder2".
File f = new File (path);
[] List of the files in the folder = f.listFiles ();
File latestFile.
for (file: filelist) {}
{if (file. ToString(). Contains (fileNameSubstring)}
If (latestFile== null |) ((latestFile! = null & & latestFile. lastModified() < file.lastModified ())) {
latestFile= file ;}
}
}
path = latestFile;
.
.
FindFile.jspx
< af:goLink text = "Print Traveler" id = "gl1".
destination = "#{viewScope. . "{FindFilebean.path}" targetFrame = "_blank" / >
< af:popup = "deferred" autoCancel childCreation = "disabled" id = "p1".
It works perfectly fine when I run a local integrated server, but I get a null value pointeron access to the f.listFiles (); when it is deployed on the weblogic managed server
I also tried the following:
1. creates a servlet and tried to read the file using the buffered output stream and display in an inlineFrame
2 FiledownloadActionListener to read the file and view/download it
These two approaches work very well locally but display/download a blank page on the server.
Please suggest what Miss me here and if there is another way to achieve this.
JDev version: 11.1.2.4.0
WebLogic Server version: 10.3.6.0
Thanks in advance.
In fact f.listFiles () should not throw NPE as the directory exist a lot and the code snippet works fine on the local server.
But you should add check and display the appropriate message to the users in the case
As you mentioned the managed server is not able to access the network share.
Guidance on how I could do this job?
That is the question to your system administrator.
They need to map this network share to the managed server machine.
Or if this is impossible, then you can perhaps use another approach (ftp, scp,...)
Dario
Tags: Java
Similar Questions
-
Can I open and view two different6 files at the same time?
I would like to be able to view two different-by-side files to cut and paste purposes. Is this possible?
You can also use the top menu:
Window > arrange
Then, choose different display options.
-
I have copy of old tbird and seamonkey e-mail files with the files and emails for each. I need to add to new tbird install. can not find a way to do it. HELP PLEASE. previous e-mail files are under mail then mail.earthlink* .net and each of the five mail .net is an email address I have. I can't find a way to identify each file by email to the specific email address (IE mail.my E-mail name.net) so I can copy the files and emails from the past to the email addresses now under tbird. previous installed e-mail identities may not be the current configuration of e-mail files in tbird. I think that I must be sure that mail.name.net matches the previous mail.name.net to be able to copy and paste the old to the new. is there a way to find the file name correct the old email and correspond to the new? all my emails very important information are mostly in the old mail electronic id and must be available in the identification of email again (but same) how can I do this?
http://KB.mozillazine.org/Importing_folders
Use this module.
https://addons.Mozilla.org/en-us/Thunderbird/addon/ImportExportTools/
-
What is this file and I need this file? The message says it can't find the module.
Hello
You have recently uninstalled software Logitech?
Follow the steps in the solution here:
-
How to find a specific voice memo file in the backup from my iPhone to my Mac? I know where to find the backup, but not how to recover specific files. Thank you.
You can't look "inside" a backup. Just use iTunes to sync with your iPhone, then you'll see a separate category for voice memos in the sidebar.
-
How can I find and close programs that run in the background of my computer?
How can I find and close programs that run in the background of my computer...
From Internet Explorer
Original title: battery
How can I find and close programs that run in the background of my computer...
From Internet Explorer
Original title: battery
The less you have to run all the time, most things you want to run will perform:
Use Autoruns to understand this all starts when your computer's / when you log in. Look for whatever it is you do not know using Google (or ask here.) You can hopefully figure out if there are things from when your computer does (or connect) you don't not need and then configure them (through their own built-in mechanisms is the preferred method) so they do not - start using your resources without reason.
You can download and use Process Explorer to see exactly what is taking your time processor/CPU and memory. This can help you to identify applications that you might want to consider alternatives for and get rid of all together.
-
How to use the same point of view as read only in the ADF and editable
Hello
How to use the same point of view as read only in the ADF and editable? How can we succeed in TF?
-James
Hello
Steven Davelaar wrote a presentation on this 'building highly reusable Taskflows.
From slide 14, that's where your use case comes into play
Frank
-
Hi all
We use JDeveloper Studio Edition Version 12.1.3.0.0 and deployed on GlassFish Server Open Source Edition 3.1.2.2 (build 5) and connect to the SQLServer database.
Is it possible to create a shuttle component in Oracle ADF, where the available and selected lists are tables of the adf?
I did a POC sample on it. I can share with you. I can't put in my dropbox because dropbox is blocked in my network. Share your email. I'll send the POC through
-
Original title: Annoying message of loss of property
Win7pro x 64 here.
Is there a way to disable this annoying message "Are you sure you want to copy this file/folder without its properties" during the transfer of files and folders in all of network file servers?
Pokermon salvation,
It would be better if post you this question in the forum category below where this problem is related to Windows server 2003.
Windows Server forums
http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer
If all goes well, they will be able to solve this problem.
Kind regards
Shinmila H - Microsoft Support
Visit our Microsoft answers feedback Forum and let us know what you think.
-
How to find and view the results in flash
Hello friends,
I work in Flash 8 and using AS 2.0 coding.
I work with failover-page application. Here I have an option 'search '. I'll tell you the scenario.
Here I am loading images/pages dynamically through xml. He loading and works as a page flipping. so far, it has been done. Now if you enter some text inside the search option and press, he must search all loaded images/pages and view pages resulted.
How this feature is indeed. How to find the jpg with a given string?
Your help will be really appreciated.
Kind regards
Rajesh
You must have a database of information related to the pages. If the pages are only jpeg images, then they will not be able to provide you with anything in the way of useful data searchable beyond possibly titles image. So, you will need to create a database that contains all of the information in these pages that you can have your (matching chain) diagram of function search works with to find matching information.
-
Impossible to download and view a FDF file with CD on a Mac using chrome with El Capitan
I can't open a file FDF of my employer, neither chrome nor Safari with the controller of domain Adobe Acrobat Reader installed. The file opens with all of the script around it and I can't read it. There are no extensions in Chrome which will convert the file from a TOT in a PDF file either. I tried also to open the drive, and then browse to find the FDF file and open it that way, but still seem to get the same result. Help!
Hi joanneb98535401,
You cannot open and view FDF or XFDF files on their own. Refer to this KB document, import and export comments, Adobe Acrobat
Kind regards
Nicos -
Find and replace function in file names?
Is it possible to do a find and replace in the names of files, rather than the office or similar? I have a large list of names of files that all have a problem with them I want to replace, but I don't want to pass by and do each manually! A better way to do it?
Rob
Hello exoticdisease,
Thanks for posting on the Microsoft answers Forum.
Select the files in Windows Explorer, press and hold Shift and right click on them. Choose copy from the menu in the path. Paste the list in any editor you prefer. You get the full path for each file, but a simple find/replace will clean up if necessary.
I don't know if it of what you're looking for or not.
If please reply and let us know if this solves your problem or if you need further assistance.
Marilyn
Microsoft Answers Support Engineer
Visit our Microsoft answers feedback Forum and let us know what you think. -
Need to find and replace any missing files from XP MS Fax
Hello. My computer is a HP Pavilion a1430n, double quick March, media library. Quite awhile back, I got some virus problems, and when I got rid of the virus I have deleted some files XP fax as well. I can still send a fax, but cannot get the fax monitor to open or view what I send you after the cover page. Will someone please tell me how to fix my fax? In addition, I don't know how I ended up in Vista, because it is XP. Thank you for your time. Sincerely, Cindy
You should be able to do that in ' Control Panel | Add/Remove programs. Add/Remove Windows components. Uncheck remove to allow complete and Fax services (which allows to uninstall Fax), then repeat the process and replace the check mark for re - install the Fax components.
HAL
--
HAL Hostetler, TCE
Engineer senior/UPDATED--MS MVP-Print/Imaging - WA7BGX
www.kvoa.com - KVOA television, Tucson, AZ.
Live Hot Licks - www.badnewsbluesband.com -
I was looking for windows, came across a file I does not recognize. I opened it with media player. Well he opened all of my icons/files desk and my Start menu with an exstention .lnk files. I am desperate to solve this problem before my husband gets home! I tried to do a system restore on the 15th, but he says the restore fails because he couldn't find not to a lack of time. file
Hello
Thanks for posting the request in the Microsoft community forums!
I understand that the desktop icon change extension .lnk. Do not worry about the advice given will help you solve the problem.Method 1:
Try to change the association of files from the control panel.
Go to the following location to change the associated file.
Start \Control Panel\All Control Panel Items\Default Programs\Set Associations
You can access the link below and follow the instructions on how to change which programs Windows uses by default: http://windows.microsoft.com/en-us/windows7/Change-which-programs-Windows-uses-by-default
Method 2:
If the steps above fail then you can try the suggestions section of the knowledge base and check.
When you run an .exe on a Windows XP, Windows Vista or Windows 7 computer file, the file can start another program
http://support.Microsoft.com/kb/950505Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article:
http://support.Microsoft.com/kb/322756If you have any other questions about windows, write to us, at any time.
-
Create a railway to run a program and a list of files to the backup server
To save time and make the infallible process, how can I create a program in windows to save a list of files to the server.
HI KKLeung,
There are many software to synchronize file that you can use.- http://en.Wikipedia.org/wiki/Comparison_of_file_synchronization_software
- http://Mashable.com/2008/07/24/synching-files-and-folders/
But why don't you directly record your file on the server directly?- create a shortcut on your desktop
- Paste the link server as the folder path folder. (for example \\ServerName\ShareName$\dir1\dir2)
Or create a network drive in my computer.
Maybe you are looking for
-
36 Firefox: How can I KEEP my choice of default search engine and Yahoo Search?
Firefox 36 insists now that I use Yahoo search constantly changing my default search engine choice. No matter now many times I put it for Google, I'll get something Yahoo and it's once again. I have Yahoo not checked in the search preferences, hoping
-
The Nightly build is so much faster than Firefox, and the download feature is much better than the download feature in Firefox.
-
HP 15-r034nx: Upgrade of RAM HP 15-r034nx
is that my HP 15-r034nx RAM can be upgraded to 8G? Said information 1 x 4G memory, is - this RAM slot means only 1?
-
Personalized phone theme Xperia arc S?
Is it possible to change the theme of the Xperia Arc running on ICS without using a custom Launcher?
-
Photo as photo screensaver and e-mailing
Photo Gallery uses Outlook to send pictures I think but I use Yahoo for email. Should I copy photo somewhere? How can I take a photo in the library and use it to a screensaver?