function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RajKRajK 

Urgent SControl Help

Hello,
My requirement is to read the output of a Custom SControl to be stored in database outside salesforce. I tried to develop a Java program using URLConnection to read the output, but I always get back the html code with Javascripts to redirect the url to login page. I have also included code to autologin into the program, before I try to read the SControl url. Any input on this issue will be great.

Thanks,
Raj
adamgadamg
Note that you can't simply "scrape" an S-control that uses Javascript or AJAX, as what you will get back is the raw Javascript, as opposed the output of that Javascript when it is viewed in a browser..

..your best bet may be to replicate the functionality of that S-control in Java and then store the results in your database,etc..
DanLyDanLy
It seemed like you have to use the same URLConnection that successfuly logged into sfa to call the s-control url.  Then use tidy.jar to parse the html into dom object