Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8253337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:50:43+00:00 2026-06-08T00:50:43+00:00

Users open documents by links in old format http://server/db.nsf/VIEW_UNID/DOC_UNID . The form has property

  • 0

Users open documents by links in old format http://server/db.nsf/VIEW_UNID/DOC_UNID. The form has property set to open XPage instead.

Origin of these links is email notification generated by “universal agent”. It simply sends link to document. It does not know, what form is associated with what XPage, therefore it generates universal links instead of “/page.xsp&documentId=…”.

The problem: relative links computed at client do not work – < a href = "/page.xsp?params"> should be more effective – no roundtrip and easy to compute at page load. They evaluate to http://server/db.nsf/0/page.xsp?params, what ends with Error 404, naturaly.

XPage contains “help” section, what is another document with RT field containing text, images and links. And relative links in that RT field work when XPage is opened from another XPage – view (/page.xsp), but fail when redirected from notification link (/0/UNID).

Question: How to effectively reset browser’s address bar to extended XPages format http://server/db.nsf/page.xsp?documentId=DOC_UNID after opening redirected documents/views by old fashioned URLs?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T00:50:44+00:00Added an answer on June 8, 2026 at 12:50 am

    Main problem is in discrepancy of relative links on server side (evaluated in SSJS) and client side (evaluated by browser). I have solved my problem by simple redirect in case document is open by old fashioned link.

    <?xml version="1.0" encoding="UTF-8"?>
        <xp:view xmlns:xp="http://www.ibm.com/xsp/core">
            <xp:eventHandler event="onClientLoad" submit="false">
                <xp:this.script><![CDATA[var url = "#{javascript:context.getUrl()}";
        var l = window.location;
        if (url != l) {
            window.location.replace(url);
        }
        ]]></xp:this.script>
        </xp:eventHandler>
    </xp:view>
    

    Simply said, if open URL differs from internal URL (as resolved by XSP engine), browser redirects to correct URL. This solved many problems we had with inline images (image resource) and attachments.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We need to implement client / server to open / edit Office documents from
One of the pages in my application has a set of links that when
I have a webpage which has links to documents (MS Word .doc files). If
I have a requirement to allow users to open word document from web page
I have a website and right now users can just open a directory and
I need to let users of an application open a folder by clicking a
One of my users is having an issue when trying to open an Excel
When no users have the any pages in an application open, it will unload
In my open source app, I want to let users insert a picture/video/sound/etc .
I need to modify the open-source FCKeditor (not CKeditor) to allow users to select

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.