Feature #496
closedAccess to absolute base URL
0%
Description
Hello,
In found myself in a position where I needed the absolute base URL. Unfortunatly it was not available outside of the JWT library package,
(because there is no way to access it).
The Session class maintains a string value of this URL so by adding one public method to WApplication it should be possible. Another solution would be to make the Session object available to library users, but I guess that it would be more risky.
Best regards,
Thim.
Files
Updated by Koen Deforche over 13 years ago
Hey Thim,
Which method of Session are you referring to?
Regards,
koen
Updated by Thim Anneessens over 13 years ago
- File WApplication.java WApplication.java added
Koen Deforche wrote:
Hey Thim,
Which method of Session are you referring to?
Regards,
koen
getAbsoluteBaseUrl()
I did the modification for JWT 3.1.5 to WApplication. I added getAbsoluteBaseUrl().
Thim.
Updated by Koen Deforche over 13 years ago
Hey Thim,
I can undersatnd why this Url (getAbsoluteBaseUrl()) can indeed be useful, we'll use your patch.
Thanks,
koen
Updated by Koen Deforche over 13 years ago
- Status changed from New to Resolved
- Assignee set to Koen Deforche
Hey Thim,
I've implemented this using a method WApplication.makeAbsoluteUrl() which makes an absolute URL out of a given URL. If you pass a empty URL then getAbsoluteBaseUrl() is returned.
koen
Updated by Koen Deforche about 13 years ago
- Status changed from Resolved to Closed