Project

General

Profile

Actions

Feature #496

closed

Access to absolute base URL

Added by Thim Anneessens over 13 years ago. Updated almost 13 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
Actions #1

Updated by Koen Deforche over 13 years ago

Hey Thim,

Which method of Session are you referring to?

Regards,

koen

Actions #2

Updated by Thim Anneessens over 13 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.

Actions #3

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

Actions #4

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

Actions #5

Updated by Koen Deforche almost 13 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF