Slyvr 0 Junior Poster in Training

I'm not sure how it's done, but I need a link to change an attribute so that the main content page can get the attribute and then display the appropriate content. My following code does not work...and it always seems to include home.jsp no matter what (home is set from a link identical to Register)

<a href="index.jsp" onclick="<% session.setAttribute("content","register");%>">Register?</a>
<%
	String content = (String)session.getAttribute("content");
	session.removeAttribute("content");
	java.util.Enumeration<String> attNames=session.getAttributeNames();
	while (attNames.hasMoreElements()){
		out.println(attNames.nextElement());
	}
	
	if (content==null||content.trim().equals("")){
		out.println("Unknown Content");
	}
	else if (content.equals("home")){
%>
		<%@include file="content/home.jsp"%>
<%
	}
	else if (content.equals("register")){
%>
		<%@include file="content/register.jsp"%>
<%
	}
%>