Ich habe eine Seite und es gibt 3 Bilder in das so jetzt, wenn Sie auf ein Bild Sitzung Attribut wie dieseEntfernen Sitzung des vorherigen Sollwert
<a href="voting.jsp"><img onclick="myfunction('image_one')" src="image_one.jpg"></a>
<a href="voting.jsp"><img onclick="myfunction('image_two')" src="image_two.jpg"></a>
<a href="voting.jsp"><img onclick="myfunction('image_three')" src="image_three.jpg"></a>
<script>
function myfunction(name)
if(name='image_one')
<% session.setAttribute("user","image_one") %>
else if(name='image_two')
<% session.setAttribute("user","image_two")%>
elseif(name='image_three')
<% session.setAttribute("user","image_three")%>
</script>
jetzt die Antwort festlegen möchten ist immer und überall image_three wenn ich Sitzung verwenden .getAttribute in der voting.jsp-Seite warum