1
下面的JSP代码段:错误而将数据添加到HREF
<% 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。
这是怎么回事所有'<% + %>'?这是一个有效的陈述? – BalusC