- Code: Select all
var webPage = 'http://www.servoy.com/docs/servoy_data_sync.pdf';
var encoded_webPage = encodeURI(webPage);
application.showURL(encoded_webPage); //Shows an URL in a browser
However I have this one application from a vendor on a server that requires authentication before you can access the its PDF files so my code is:
- Code: Select all
//Create a named http client (like a web browser with session binding) usable todo multiple request/posts in same server session
plugins.http.createHttpClient('mybrowser');
var pageData = plugins.http.getPageData('http://www.servoy.com/docs/servoy_data_sync.pdf','mybrowser','username','mypassword');
The problem is that I do not want to show the page inside my application but want to open a separate browser to show the PDF files.
It is better to not have the data pass through my application (speed and memory considerations).
The webclient runs on the server so that means I would have to write the page data to a file on the server and open a browser that is pointing
to the file on the server.
That could get messy in the long run as I really do not want web clients writing temporary data to the server's file system.
It eventually has to be cleaned up.
Does anyone know of a set of JAVA or JAVAscript functions that would duplicate the application.showURL method but with authentication
as in the getPageData method?
Thank you in advance for your response.