Advertisement
Guest User

Untitled

a guest
Jul 31st, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. <sql:setDataSource
  2. driver="com.mysql.jdbc.Driver"
  3. url="jdbc:mysql:///info330?user=jdbc&password=javasucks"
  4. scope="session"
  5. />
  6. <%-- Then, verify it's a good netid in the DB --%>
  7. <sql:query var="count">
  8. SELECT COUNT(netid) FROM player WHERE netid='${player.netid}'
  9. </sql:query>
  10.  
  11. <%-- If there is no player with that netid, go back to login --%>
  12. <c:if test="${count.rowsByIndex[0][0] == 0}">
  13. <c:redirect url="login.jsp" />
  14. </c:if>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement