Spring tags instead java code : I'm looking for good example, how can I replace this java code with spring tags.

    <%
    			
    			Object user = (String) request.getSession().getAttribute("User");
    			Object role = (String) request.getSession().getAttribute("role");
    			
    			if(user == null){
    				out.println("<a href=\"register.jsp\">Register</a> <a href=\"login.jsp\">Login</a>");
    			} else {
    				out.println(" Hello  " + user +"  "+"<a href=\"LogoutServlet\" >Logout</a>");
    			}	
    			 %>
    			</div>
    			<div class="menu">
    			<% 
    			if (role != null){
    				if(role.equals("admin")) out.println("<a href=\"adminPanel.jsp\">Admin Panel</a></br>");
    				out.println("<a href=\"userOrders\">Orders</a></br>");
    			} else {
    				if(user != null) out.println("<a href=\"userOrders\">Orders</a></br></br>");
    				}%>
       