掲示板

Generate URL from the given String

8年前 に Logu R によって更新されました。

Generate URL from the given String

New Member 投稿: 10 参加年月日: 15/05/15 最新の投稿
The concept is "We need to generate URL from the given String ".
For example,
1)
Here the urltext contains "www.google.com"
urlText ="www.google.com"

2)
Now i tried to append the string with "https:"
urlTemp = "<a target='_blank' href='https://"+urlText+"'>";

The issue is while executing the application it is referring to our local port.
http://localhost:9080/web/guest/www.google.com

It should be https://www.google.com
thumbnail
8年前 に David H Nebinger によって更新されました。

RE: Generate URL from the given String

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
There's gotta be more to it than that. If you output that <a target... /> tag as indicated, it would not be stamped with the local host prefix.