Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Rendering CustomView files in LAPI
Geoff_Price
I have a JSP app that I use to provide customers a view into Livelink. I want to provide functionality to handle customview.html files. In the code, I can locate their customview file in the document storage directory and write it to the screen. The only problem I am having is getting the images to display. If I monitor my Apache error logs, I see what I would expect... it's looking for the graphic in the same directory as the JSP code. BUT, if I use a fully qualified URL for the graphic, it works. Here is the issue. We have a LOT of customview.html files, and most of them do NOT use relative paths for the graphics. The create a folder in their area to hold their graphics, then just use that path. Livelink handles it just fine, but via LAPI and my app, I cannot find the graphic unless a fully qualified URL is used. Does anyone have any ideas how to make this work? I'd like to not have to tell the users they will have to edit all of their custom html files.Cheers,Geoff
Find more posts tagged with
Comments
Francisco_Alcala-Soler_(iaea_001user3_-_(deleted))
Message from via eLinkHi Geoff,My guess is that you would have to preparse the after retrieving it but before sending it to the client, replacing all relative links to image files with fully qualified URLs. For this, you might have to do some research as to where the file is actually stored.For instance, the following URL retrieves one such page:
http://hostName/livelinkInstance/livelink.exe/fetch/2000/3829/4362/customview.htmlThis
file is in a folder with ID 4362, which resides in another folder with ID 3829, which is in the Enterprise Workspace (ID 2000). If this page contained a link to an image called inside that same folder, the link mangling would have to replace
with
Does this make sense? I haven't tested it, but my guess is that you have to "discover" the location of the file by figuring out the IDs of all its ancestors and then compose a URL like the one above.Hope this helps, Curro> -----Original Message-----> From: eLink Discussion: LAPI Discussion> [mailto:lapi@elinkkc.opentext.com]> Sent: Wednesday, 23 March, 2005 17:27> To: eLink Recipient> Subject: Rendering CustomView files in LAPI> > > Rendering CustomView files in LAPI> Posted by Price, Geoff on 03/23/2005 11:22 AM> > I have a JSP app that I use to provide customers a view into > Livelink. I want to provide functionality to handle > customview.html files. In the code, I can locate their > customview file in the document storage directory and write > it to the screen. The only problem I am having is getting > the images to display. If I monitor my Apache error logs, I > see what I would expect... it's looking for the graphic in > the same directory as the JSP code. BUT, if I use a fully > qualified URL for the graphic, it works. Here is the issue. > We have a LOT of customview.html files, and most of them do > NOT use relative paths for the graphics. The create a folder > in their area to hold their graphics, then just use that > path. Livelink handles it just fine, but via LAPI and my > app, I cannot find the graphic unless a fully qualified URL > is used. Does anyone have any ideas how to make this work? > I'd like to not have to tell the users they will have to edit > all of their custom html files.> Cheers,> Geoff> > [To reply to this thread, use your normal E-mail reply function.]> > ============================================================> > Discussion: LAPI Discussion>
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=765428&objAction=viewLivelink
Server:
https://knowledge.opentext.com/knowledge/livelink.exeThis
email message is intended only for the use of the named recipient.Information contained in this email message and its attachments may beprivileged, confidential and protected from disclosure. If you are not theintended recipient, please do not read, copy, use or disclose thiscommunication to others. Also please notify the sender by replying to thismessage and then delete it from your system.
Geoff_Price
Curro,Thanks for the quick reply on this. We had a guy here over a year ago that wrote some Java code to present a "view only" look into Livelink and his code supported the rendering of customview.html files. His code would find graphics even without having to do what you mention. It worked pretty much the same way that Livelink handles it. Unfortunately, I don't have access to his code or him! I may try your suggestion. I just wish I there was an API that could handle customviews, and I wish I could see how Livelink handles this.Cheers,Geoff
Francisco_Alcala-Soler_(iaea_001user3_-_(deleted))
Message from via eLinkHi Geoff,> His code would find graphics even > without having to do what you mention.I am not sure how this would be possible. I am out of ideas, then.Notice that a is a snippet of HTML within a page. As soon as Livelink notices one such document in a folder, it sends a redirection to the browser to fetch it with the URL I was describing to you. I am sure you've seen this URL change when you are browsing Livelink normally. Through that URL, relatively linked images can be fetched as well. You can see the composition of the URL by following the Oscript code in the Builder: WEBNODE::WebNode Root::WebNode._BrowseCatalogs()> It worked pretty much > the same way that Livelink handles it. Unfortunately, I > don't have access to his code or him! I may try your > suggestion. I just wish I there was an API that could > handle customviews, and I wish I could see how Livelink handles this.The function above is exactly how Livelink handles it. :-)How could we do it otherwise? Images can be either statically served by the web server or fetched from Livelink. Images in a folder can only be fetched from Livelink, for which you need either the image's Livelink ID or the image's name plus the ID path to its location.If you discover the way in which your consultant was doing it, please let me know.Thanks, CurroThis email message is intended only for the use of the named recipient.Information contained in this email message and its attachments may beprivileged, confidential and protected from disclosure. If you are not theintended recipient, please do not read, copy, use or disclose thiscommunication to others. Also please notify the sender by replying to thismessage and then delete it from your system.