Why does this expression not work? Jsf

I have a simple problem on the .xhtml page. This expression does not work: -

<a href="Photos.jsf?albumId=#{item.albumId}&blogId=#{PhotoAlbumsCommonBean.blogId}">
 photos
</a>

I get this error: -

Error Parsing /Common/PhotoAlbums.xhtml: Error Traced[line: 20] The reference to entity "blogId" must end with the ';' delimiter.

& causes some error. Thanks in advance:)

+5
source share
2 answers

Try coding ampersand - &with&amp;

+16
source

Error caused by # signs.

Try it. It fixes a problem with JSP EL and has ampersands encoded in XHTML pages:

<a href="Photos.jsf?albumId=${item.albumId}&amp;blogId=${PhotoAlbumsCommonBean.blogId}">
 photos
</a>
+1
source

All Articles