• Bruno Stuelp
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
We're in the process of moving our corporate site over to a Force.com Site, but the Salesforce Content Syndication logic is written in JSP.  

Has anyone written this in VisualForce/Apex yet?
 
Thanks,
Jon 
 
Here is the JSP code for the Content Syndication: 
 

<% // Do not edit below this line // --------------------------------------- try { String strSVHost = ""; String strSVContentLine = ""; String strSVPullURL = "http://salesforce.sharedvue.net/sharedvue/pull/"; if (request.getServerName() != null) { strSVHost += request.getServerName(); } if (request.getRequestURI() != null) { strSVHost += request.getRequestURI(); } if (request.getQueryString() != null) { strSVHost += "?" + request.getQueryString(); } strSVPullURL += "?svhost=" + java.net.URLEncoder.encode(strSVHost); java.net.URL urlSVContent = new java.net.URL(strSVPullURL); java.io.BufferedReader brSVContent = new java.io.BufferedReader ( new java.io.InputStreamReader(urlSVContent.openStream() ) ); while ( (strSVContentLine=brSVContent.readLine()) != null ) { out.println(strSVContentLine); } brSVContent.close(); } catch(Exception eSVPull) { out.println("<!-- SharedVue Output: " + eSVPull + " -->"); }%>