How to convert relative url to absolute in URLPortlet?

Images and links don't work becase they are not getting filtered to absolute urls. <baseHRef> doesn't seem to do it. Isn't URLServices supposed to automatically convert all urls to absolute?

URL Services internal identifies relative URL and converts them into absolute URL's.
It uses <BASE HREF="URL"> if available, otherwise the uses <pageUrl> as base URL and constructs the absolute URL's.
Please post URL to which you facing problem, so that we can find fix this error.

Similar Messages

  • Converting relative address to absolute address

    Is there a way to change relative addresses to absolute
    addresses when files are uploaded to a server in dreamweaver?
    For example,
    given domain:
    http://www.home.com/
    convert ../images/picture.jpg to
    http://www.home.com/images/picture.jpg
    upon uploading
    I want only files uploaded to the server to have the absolute
    address.

    >I am just wondering too. I have seen some websites'
    source code and they
    >seemed
    > to have absolute addresses for their links.
    There is no benefit to this, however. A simple document or
    root relative
    link works just fine.
    > If you have absolute address
    > in a page then you can test changes made on your local
    machine without
    > uploading it to the server.
    You can do that with document/root relative links, too.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "websiteweaver" <[email protected]> wrote in
    message
    news:ejfp6h$bju$[email protected]..
    > I think it could be helpful for editing purpose. If you
    have absolute
    > address
    > in a page then you can test changes made on your local
    machine without
    > uploading it to the server.
    >

  • How to use relative url

    I use xml file to save configuration and saved /WEB-INF/config.xml
    In my java class i can't use that file with relative url.
    document=builder.parse(new File("/WEB-INF/config.xml"));

    Try something like this:
    String thisPath = this.getClass().getResource("").getPath();
    document=builder.parse(new File(thisPath + "/WEB-INF/config.xml"));

  • How to convert existing url to  a new url for crystal reports on server

    Post Author: Ashton Kutcher
    CA Forum: General
    Hi folks,
              I have crystal reports  on the webserver and it has a url  http://myserver/legal/viewreport.csp?website=legal_website&report=Budget%20Group%20Costs&toolbar=110101&@Year=" + Year "&@BudgetGroup=" BudgetGroup, 'newwindow', config='toolbar=no, menubar=no, scrollbars=no, resizable=yes,location=no, directories=no, status=no')
    I need to convert it to a new url like this  http://myserver/businessobjects/enterprise115/InfoView/scripts/openDocument.aspx?sDocname= Budget%20Group%20Costs&sPath=legal_website&toolbar=110101&lsS@Year=" + Year "&@BudgetGroup=" BudgetGroup, 'newwindow', config='toolbar=no, menubar=no, scrollbars=no, resizable=yes,location=no, directories=no, status=no')
    please help me out how should I convert the old exisiting url to a new url??

    Hi,
    You can try using "goLiink" and then use the property targetFrame set to "_blank"; below are some for ur references:
    targetFrame          
    _blank: The link opens the document in a new window.
    _parent: The link opens the document in the window of the parent. For example, if the link appeared in a dialog window, the resulting page would render in the parent window.
    _self: The link opens the document in the same page or region.
    _top: The link opens the document in a full window, replacing the entire page.
    Thanks,
    Pandu

  • Frame 12 converting relative paths to absolute paths

    Hi all,
    We recently upgraded to Frame 12 and now have a persistent issue with relative paths to referenced images becoming absolute.  These paths do not traverse a drive and so I believe Frame should be maintaining a relative path for these. In most cases -- perhaps in all, although I have not done exhaustive testing --  the problem paths are for images on a master page.
    Any idea why this might be occurring and what we can do to fix it?  Our docs team shares files checked out from a server, and each time one of us opens a document, it has an absolute path to a location on another writer's computer.  We each maintain the exact same directory structure for all Frame/image files, and again, the path to the problem images is local and does not traverse the C drive.
    Thanks in advance,
    Shelley

    May or may not be relevant, but do the affected relative paths need to traverse the root directory of the logical drive?
    I seem to recall, in experiments some years ago on FM7.1, that the final /../ needed to be at least one level down.

  • Resolve Relative URLs in Http response.

    I am using java.net package classes to make Http calls to get HTML, which I display in a page (using JSP). Problem is that there are relative paths in anchor, images etc and so links don't work and images don't display. I would like to know if there is any way to convert relative urls to absolute urls.
    Thanks
    rcr

    I have found that ColdFusion has a tag CFHTTP that converts relative url to absolute url (by giving arttribute resolveUrl="yes"). I wonder how they do it.
    http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-p58.htm

  • Usage of relative url across site collections in sharepoint 2010

    Hi
    I have a webapplication with 2 sitecollections. In one sitecollection, created a link by going to navigation under sitesettings.
    Added relative url to map to 2nd site collection. Eg: /sites/site2/page1.aspx
    But by doing so, it is giving error. Help me out how to give relative url pointing to different site collection from another sitecolleciton.
    Thanks in advance
    Naina 

    Say, Site Collection 1 URL: http://sitecollection1.domain.com/
    Site Collection 2 URL : https://sitecollection2.domain.com/
    Now, on "Site Collection 1", In Site Actions-->Site Settings-->Navigation, when you use "relative URLs", it will always refer to the current Site Collection i.e Relative URL "/sites/site2" will always be "http://sitecollection1.domain.com/sites/site2".
    Anyways, what is the "requirement". What are you trying to solve by using "relative URL" for Site Collection 2 on Navigation of Site Collection 1. Reason for asking is, there might be different approach for your "requirement".
    Naveed.DG MCITP, MCTS -SharePoint 2010 Administrator "Vote As Helpful" If it helps!!

  • How to set up use of relative URLs for a BSP application

    Dear all,
    I need to access a BSP application through our external portal.
    This is failing because generated URLs are absolute URLs (they mention physical server name, not known of course on the internet) where they should be relative URLs (they use external portal URL as prefix).
    How to set this up?
    I'm logged on http://myportal.com/irj/portal and want to call a BSP application. To build this page, my internet client (Internet Explorer) tries to get elements from the server. Looking at HTTP trace, I can see that my IE is trying to reach the physical server, not known on internet of course, then page loading fails.
    Ex absolute URL : http://myservername.domain.com/sap/bw/[...]/image1.gif
    This is the behavior I can see at the moment.
    Relative URL : http://myportal.com/sap/bw/[...]/image1.gif
    This is what I'd like to see.
    Many thanks in advance for your help.
    François

    Any idea ?

  • How to use relative paths in Captivate 8 / Cómo usar URL's relativas en Captivate 8

    Hello, I have developed a bunch of courses which will be migrated to a new site and I am having trouble changing the absolute paths into relative URL's to resources such as PDF files inserted into the scorm packages. I cannot find information on how to use relative paths in Captivate. Please help. Thank you.

    I have the same issue with relative links using Captivate 8.  I am trying to load Captivate modules into an LMS using relative links to document files within the LMS.  The links work fine during a site page test so not an issue in the LMS, but from the Captivate module they aren't working....
    Help?

  • Correctly combining an absolute and a relative URL

    Hello everyone!
    I've been messing around with combining absolute and relative URLS in java and have found the task to be a little more confusing than I originally thought. For example:
    /wallpapers/17i/Lotus_Exige_Mk_II,_2004.jpg
    http://wallpapers.diq.ru/ru/17__Peugeot_Moonster_Concept%2C_2001.html
    Firefox and other browsers see this as: http://wallpapers.diq.ru/wallpapers/17i/Lotus_Exige_Mk_II,_2004.jpg
    I don't understand why the /ru/ is taken out; and was wondering if there was already a class written in Java that combined urls, or if someone could explain to me why the end result is not http://wallpapers.diq.ru/ru/wallpapers/17i/Lotus_Exige_Mk_II,_2004.jpg
    Thanks

    The web page could have a <head> section that contains a [<base>|http://www.w3schools.com/tags/tag_base.asp].
    This specifies the base that will be used when resolving urls. It may not be the url of the page itself. For instance it could be that the "ru" bit collects together all the Russian langauge pages parallel to a "en" duplicate that has the same pages in English. Clearly both sets would want to access the same image resources so they have a <base> setting that points one level higher up.
    If this is the case and you want to get the url for the images you will have to parse the <head> of the web page and figure out what the <base>is.

  • How can i convert a url from https to http?

    Hi,
    SSL is enabled in WLS 9.2 and its wrkng fine. And iam able to access login page in secure(https)mode. After this page i need to convert the url from https mode to http. For enabling https i added some code in web.xml. For switchinng https to http i dn't knw anythng.
    Pls gve me suggetion.
    Thanks in advance.

    Export it from iPhoto. This process will make a QuickTime movie of it. That will play on an PC that has QuickTime installed - and that's a free download for PC, and comes with iTunes for PC
    Regards
    TD

  • How to convert a STRING to URL?

    as i know, URL to string we just need toString() method... but how abt String to URL.. i cant find any toURL() method... pls help..!
    thanks

    Use the constructor:URL url = new URL(yourString);

  • How to convert URL to its domain name

    Hi,
    I need to get the client machine name to track who had logged on to the website. I know how to get the url using the request as : request.getRequestUrl(), but is there a way i use this information to get the domain name for the url?
    Thanks a lot.
    cc

    Well if you have the actual URL, then can't you just parse the string, extracting the portion after the last dot for example?
    Also, you may want to take a look at the java.net.InetAddress class --it has static methods for returning both the IP and the name of a computer.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to Convert PageID or CommunityID to a workable URL

    I know how to generate a URL via PT Tags based on PageID or Community ID. But in C# I would like to know how if I have the PageID and/or CommunityID how can I make that into a workable URL?

    Are you on the remote side (i.e. writing a portlet) or are you on the native side (i.e. writing a custom navigation)? I'm going to assume remote because the transformer tags are not available when you're writing a custom navigation.
    This will open community 200 for viewing in a new window:
    <pt:openerLink xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/' pt:objectID='200' pt:classID='512' pt:mode='2' target='myWindow' onclick=window.top.open('','myWindow','height=800,width=700,status=no,toolbar=no,menubar=no, location=no');>view community</pt:openerLink>
    This will open community page 219 for viewing in a new window:
    <pt:openerLink xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/' pt:objectID='219' pt:classID='514' pt:mode='2' target='myWindow' onclick=window.top.open('','myWindow','height=800,width=700,status=no,toolbar=no,menubar=no, location=no');>view community page</pt:openerLink>
    (I lifted these examples off of www.plumtree.com/edoc, which is a great resource for Plumtree developers.)
    If you're writing a custom navigation, opening communities is done in a completely different way. I'd be happy to share it with you if you're interested -- just let me know.
    Hope this helps,
    Chris Bucchere | bdg | [email protected] | www.bdg-online.com
    Like blogs? Check out bdg's Plumtree blog at bdg-plumtree.blogspot.com.

  • Sharepoint 2013 Wiki Page - Links in content rewritten to relative urls

    We have an issue where on all SharePoint 2013 wiki pages any URL to items within the site containing the wiki page are rewritten to be relative URLs. This causes a huge problem when we surface these pages and a snippet of their content through a search web
    part because the links fail being relative to the wiki page itself. To further illustrated with an example.
    A site collection root page http://www.sp2013.com/default.aspx contains a search results web part returning all wiki pages in the site collection. There is a custom display template that renders
    the linked title of the wiki page and the first 500 characters of formatted text (html) of the wiki page.
    A wiki page is created in a sub site (sub1) called wiki1 (http://www.sp2013.com/sub1/pages/wiki1.aspx) the text of the page contains:
    "Check out our new library: Document Library"
    Document Library is a hyperlink to (http://www.sp2013.com/sub1/Document%20Library/Forms/AllItems.aspx)
    Upon saving the wiki page the link is reformatted to be /Document%20Library/Forms/AllItems.aspx
    From the rollup web part at http://www.sp2013.com/default.aspx the relative url in the snippet text of the display template evaluates to
    http://www.sp2013.com/Document%20Library/Forms/AllItems.aspx which does not exist.
    I have attempted modifying the source of the wiki page as well as the link in the ribbon however upon save of the changes the link is always modified to be relative. Any assistance is appreciated as this is extremely frustrating. Thank you.

    Hi JonesEJ,
    According to your description, my understanding is that SharePoint converts a absolute URL to
     a relative URL when you save the wiki pages containing the URL.
    This is actually the preferred behavior in SharePoint and on the web in general. SharePoint saves all absolute URLs for the wiki content as relative. It only does this if the URL matches the URL for the web application for that current wiki
    site.
    There is no OOB way to change the relative URL back to the absolute URL. For your issue, you can try to use
    SPSite.MakeFullUrl() to convert it back.
    There is a similar post for your reference:
    http://sharepoint.stackexchange.com/questions/62887/absolute-urls-converted-to-relative-urls-when-saving-item
    Best Regards,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

Maybe you are looking for

  • Error with smart quotes replacements

    Any application that uses TextEdit engine can cause text at ends of lines with smart quotes to be corrupted. Simple test. Create a new TextEdit document, Set TextEdit's preferences to have Smart Quotes enabled. Type in some text such as "I've found a

  • How can I distinguish a JMenuItem , JPopupMenu and TopLevelMenu?

    I used the following methods to get the component who (a menu)gains the focus: JComponent com = JFrmame.getFocusOwner(); or MenuSelectionManager menuMgr = MenuSelectionManager.defaultManager(); MenuElement[] menuPath = menuMgr.getSelectedPath(); if(m

  • File to Idoc Nodes mapping

    My sender File structure is like this.. MT_Sender -Recordset 0 to Unbound --Header 1 to 1 ---field1 ---field2 ---fieldx --GL_Account 0 to Unbound ---field1 ---field2 ---fieldx ---Cust_Item 0 to Unbound field1 field2 fieldx Curr_Item 0 to Unbound fiel

  • Use buttons to update DataGrid

    I'm trying up make a datagrid with a list of buttons that, when pressed, will populate the data grid with filtered information from a XML file. Thanks for any help and suggestions?

  • How to update itunes on os x 10.5.8

    Can anyone help me, ive recently bought an ibook G4. It's had loads of work done to it to make it work great, only downside is it's running OS X 10.5.8 and i cant find a way to update itunes. Any suggestions?