Project

General

Profile

Feature #496

Access to absolute base URL

Added by Thim Anneessens about 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
09/07/2010
Due date:
% Done:

0%

Estimated time:

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

WApplication.java (72.6 KB) WApplication.java Thim Anneessens, 09/16/2010 10:10 PM
#1

Updated by Koen Deforche about 11 years ago

Hey Thim,

Which method of Session are you referring to?

Regards,

koen

#2

Updated by Thim Anneessens about 11 years ago

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.

#3

Updated by Koen Deforche about 11 years ago

Hey Thim,

I can undersatnd why this Url (getAbsoluteBaseUrl()) can indeed be useful, we'll use your patch.

Thanks,

koen

#4

Updated by Koen Deforche about 11 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

#5

Updated by Koen Deforche over 10 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF