About handlespecialURL

  1. last week

    Brian O

    Dec 6 Pre-Release Testers, Xojo Pro Calgary, AB

    I have an application that handles 'special' urls using handleSpecialURL in my App.
    at the moment it constructs a web page by using command like this:

    Request.Print("<!DOCTYPE html>" + EndOfLine) Request.Print("<html>" + EndOfLine) Request.Print("<head>" + EndOfLine) Request.Print("<title>Example Output</title>" + EndOfLine) Request.Print("</head>" + EndOfLine) ...

    But what if i have a webpage class what do i do in the event handler to show the requestor that page instead of trying to print out the html?

  2. Phillip Z

    Dec 6 Pre-Release Testers, Xojo Pro Florence, SC

    You should try to use HandleURL as it is new and improved.

    In reference to your question you want to use a Xojo WebPage instead of always writing your HTML?

  3. Brian O

    Dec 6 Pre-Release Testers, Xojo Pro Calgary, AB

    I'm using handle special url unless it's deprecated....
    Are you saying I should be able to intercept all url calls to my application in that event?
    But I'm afraid I don't understand your answer to my question Phillip...

  4. Phillip Z

    Dec 6 Pre-Release Testers, Xojo Pro Florence, SC

    I do not believe it is deprecated. Only different is HandleSpecialURL can only capture requests that are in /api/or /special/

    Can you clarify: "But what if i have a webpage class what do i do in the event handler to show the requestor that page instead of trying to print out the html?"

  5. Michel B

    Dec 7 Pre-Release Testers, Xojo Pro

    HandleURL intercepts all calls to the app, including normal operation at the root.

  6. Greg O

    Dec 7 Xojo Inc Somewhere near Raleigh, NC

    @Michel B HandleURL intercepts all calls to the app, including normal operation at the root.

    That’s almost true. It does not intercept a handful of urls that are necessary for sessions to work.

    See http://docs.xojo.com/index.php/WebApplication.HandleURL for more info.

  7. Michel B

    Dec 7 Pre-Release Testers, Xojo Pro

    One thing I know is that returning true will very effectively prevent a normal session to connect. I thought that could be very effective for a login system.

  8. Greg O

    Dec 7 Xojo Inc Somewhere near Raleigh, NC

    @Michel B One thing I know is that returning true will very effectively prevent a normal session to connect. I thought that could be very effective for a login system.

    That’s true if Request.Path = “”.

  9. Brian O

    Dec 7 Pre-Release Testers, Xojo Pro Calgary, AB

    Guys!? :)
    How do I set the response page?

  10. Greg O

    Dec 7 Xojo Inc Somewhere near Raleigh, NC

    @Brian OBrien Guys!? :)
    How do I set the response page?

    If it’s a WebPage object, you don’t do anything and let the framework handle it for you.

    If you’re looking to redirect a user to a specific page once they’ve connected, just do something like this in Session.Open

    LoginPage.Show

or Sign Up to reply!