以下jsp片段:
<% while(set.next()) { %>
<li>
<%-- statement 3--%> <a class="thumb" href="/home/non-admin/project uploads/project users/" <% + %> <%= set.getString("UserEmail") %> <% + %> "/" <% + %> <%= set.getString("NameOfThePhoto") %> > <img src="images/portfolio_two/1_thumb.jpg" alt="one"> </a>
<div class="caption">
<div class="image-title portfolio_two">"Pier by the sea, Fowey, Cornwall, UK"</div>
</div>
</li>
<% } %>
在语句3中给出错误。 IDE说not a statement
和"""""" is not serializable in xml 1.0
。这是什么错误,为什么会发生?
在语句3中,我将从数据库中提取的值添加到href。
答案 0 :(得分:2)
href="/home/non-admin/project uploads/project users/<%=set.getString("UserEmail")%>/<%=set.getString("NameOfThePhoto")%>"