0
我想打印表中用户名等于当前用户的值,即时通讯从session.getattribute(“username”)获取当前用户,但是sql语句给出了一个错误说“等于符号预期”,你能告诉我什么是错用下面的代码,以及如何做正确,谢谢从表中打印的jsp sql查询,相等的符号预期的错误
<sql:query var="studentcourse"
dataSource="${vle}"
SELECT course_name FROM studentcourse WHERE username = '<%=session.getAttribute("username")%>'
</sql:query>
<p>user = <%=session.getAttribute("username")%>
<% System.out.println("username");%></p>
谢谢:) @vinoth – Yomk
不客气。如果您发现上述答案解决了您的问题,请将其标记为[accepted](http://stackoverflow.com/help/accepted-answer)和[vote up](http://stackoverflow.com/help/why-vote )可能对其他人有用。 –