mailto: URL's

Splash Forums Rewrite Users mailto: URL's

This topic contains 10 replies, has 3 voices, and was last updated by  fabmars 8 years, 5 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
  • #24405


    I noticed Rewrite 2.0.5 doesn’t support [h:outputLink value=”mailto:…”]. To be exact, and under the condition what’s after the mailto: is correctly URLencoded, the page will display with a link “mailto:null” !
    In the days of Rewrite 1.x, the string after the mailto: was kept.

    Of course, as usual I can work around it by using straight html in the facelet page [a href=”mailto:…]

    Though I had a look at the code, AddressBuilder creates a URI from what’s in the outputLink value.
    A mailto: is a valid URL, but it can’t be described as a URI (host, path, query, fragment are all null).

    So I’m wondering whether AddressBuilder shouldn’t just use URL’s and compile the AddressBuilder out of URLs {protocol, host, port, path, query, ref} instead of URIs {scheme, host, port, rawpath, rawquery, rawfragment}.


    PS: note it’s remotely related to but it’s surprising the user didn’t stumble upon the same issue!


    Hey Fabmars!

    I’d like to fix this, but I am about to get on a plane. I think that we should support this. Want to work on a patch to allow AddressBuilder to support these URLs?

    Please let me know. More soon!



    Sure BUT I have very litle time myself. The patch is obvious but I’m quite afraid of “unforeseen impacts”.
    I’ll try in the next days, but if there is no git pull req by August 23rd (start of my next hospitalization), you can consider I’ve failed to find time or a solution.


    Hospitalization? I’m sorry, what’s going on? (if you feel like saying) – Feel free to submit the patch (pull request) at whatever state you’ve completed it, and we can try to continue.



    A leukemia. But I’m no usual patient, my two previous patches were submitted from the hospital already. Though this time is the last one and they’re gonna use the big guns on me, so I have to complete this patch before 🙂


    Oh my goodness. I hope it goes well! I’ll be keeping you in my thoughts and sending you as much good energy as I can. You’ve been such a happy influence around here and I’m really appreciative of all your support and questions. I hope the big-guns means you’ll be OK afterwards!!



    I should be OK afterwards…
    OK patch done, that was easy. See pull request 124.


    Hey Fabmars!

    That’s awesome! Thank you so much for your work on this. We will have a look at the pull request ASAP.

    Just some other side note: I really think that it would be a good idea to avoid using JSF components like h:outputLink where possible in such cases. Using them will increase you component tree size which impacts the overall performance of your application. You can typically use simple a links instead. However there are exceptions for that rule. Especially if you want to use the rendered attribute or something like this.

    However, thank you very much for you pull request. 🙂


    Well, you could still use the <h:outputPanel> in the case of doing dynamic rendering. Thank you Fabien, and best of luck with your treatment! I’ll take care of this pull request ASAP.


    BTW. Please let us know how it went 🙂



    @Christian: Yes sure, I am now avoiding useless JSF components where possible, but as I wrote previously, the codebase is a migration from JSF1.2 and I’m too lazy to review all the xhtmls 🙂 There’s no real customer behind this code. It’s for the website of the record label I founded, I’m the only programmer, I make it evolve on my free time and and even though I (used to) work for a major IT corp, I’m in the middle management and don’t “officially” code anymore…

    @lincoln: I should be “physically offline” most of September (I’m having a marrow transplant) and if I make it, I should be back with more Rewrite corner-cases by mid-October 🙂

Viewing 11 posts - 1 through 11 (of 11 total)

The forum ‘Rewrite Users’ is closed to new topics and replies.

Comments are closed.