Jakob Nielsen
Jakob Nielsen

Reputation: 5198

JSF - link not working properly

Hello I have a littele problem with a image which should link to a certain wikipedia page.

Code:

<a href="#{lc.generateWiki()}">
    <h:outputText value="#{lc.generateWiki()}" />
    <h:graphicImage id="avatar" url="#{lc.generateAvatar()}"
                    width="100px" height="150px" />
</a>

the method (generateWiki()) gives back the right link, but when I click the page it always redirects to the following link :

http://localhost:8081/lab3/de.wikipedia.org/wiki/xxxxxxx

So each time localhost:8081/lab3 is prefixed to the link.

How can I fix this?

Upvotes: 1

Views: 46

Answers (1)

Csaba
Csaba

Reputation: 949

Does generateWiki() return an absolute URL? It should return something like http://de.wikipedia.org/wiki/xxxxxxx

Upvotes: 2

Related Questions