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

Retrieving contents of documents



I have a jar file with me which contains a HTML Page. I need to call this html page in my VF page.

I know i can access this HTML Page, if i upload this jar file as Static resource. But, my jar file is more than 5MB hence i cant upload into static resource.

So i am planning to load the jar as Document or attachment and call the HTML page from there.

I want to know if this is possible

I tried to do something like below

Controller class:


public withsharingclasscompareOrgController {


publicblob docblob{get;set;}


public string docblob1{get;set;}


public string docblob2{get;set;}




Document doc = [select id,body from document where id='015Z0000000DUze'];


Document doc1 = [select Url from document where id='015Z0000000DUze'];







docblob2= doc1.Url;





VF Page:

<apex:page controller="compareOrgController">
     <apex:outputLabel >{!docblob}</apex:outputLabel>
    <apex:outputLink > {!docblob2}</apex:outputLink>


Kindly help me on how this can be achieved.

If not Document is there any other way that i can upload my jar and access the HTML page?




why can't you place the html file in the visualforce page itself like




paste ur html code with out any issues








The HTML is using the java code for executing the logic.


The java code cannot be implemented in Apex as Metadata API is used. And metadata API cannot be accessed from APEX is my understanding.



if that is the case you can't acheive the same using documents or any other in salesforce.. then it should be call out .. like u should write a service and deply on server and get WSDL and parse that apex and make a call to the service from the vf page or how ever you want.....