收录日期:2019/08/19 20:45:30 时间:2010-05-13 16:08:03 标签:java,jsf,facelets

I have a simple problem on .xhtml page. This expression is not working :-

<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.

& is causing some kind of error. Thanks in advance :)

Try to encode the ampersand - & with &

The error is caused by the # signs.

Try this. It fixes the problem with the JSP EL and having ampersands encoded in XHTML pages:

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