[英]JSF - link not working properly
Hello I have a littele problem with a image which should link to a certain wikipedia page. 您好,我的图片有问题,应该链接到某个Wikipedia页面。
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 : 方法(
generateWiki()
)返回正确的链接,但是当我单击页面时,它总是重定向到以下链接:
http://localhost:8081/lab3/de.wikipedia.org/wiki/xxxxxxx
So each time localhost:8081/lab3
is prefixed to the link. 因此,每次将
localhost:8081/lab3
前缀为链接时。
How can I fix this? 我怎样才能解决这个问题?
Does generateWiki() return an absolute URL? generateWiki()是否返回绝对URL? It should return something like
http://de.wikipedia.org/wiki/xxxxxxx
它应该返回类似
http://de.wikipedia.org/wiki/xxxxxxx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.