Trocar o HREF do link com base em um Radio Button

Caros, estou tentando fazer com que o JavaScript defina qual o endereço que será atribuído ao HREF de um link com base no que foi selecionado em um RadioButton. Nem sei se é possível, mas tentei fazer assim mesmo. Segue abaixo o código da página index.jsp que eu fiz. O erro começa na linha 20.

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<style>
a:link {text-decoration:none; font: 12pt 'Verdana'; color:#336699}
a:visited {text-decoration:none; font: 12pt 'Verdana';color:#336699}
a:hover {text-decoration:none; color:#FF9900; background: #000099}
</style>
<title>Index</title>
</head>
<body>
<center><h2>GERENCIAMENTO DE CHAMADOS</h2></center>
<br><br><br>
PARÂMETROS DE BUSCA:<br><br>
&lt;input type="radio" name="radio" value="pessoa"&gt;Pessoa&lt;/input&gt;&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
&lt;input type="radio" name="radio" value="chamado"&gt;Chamado&lt;/input&gt;<br><br>
<a >&lt;% if (request.getParameter("radio").equals("pessoa")){ %&gt; 
href="inserepessoa.jsp" &lt;%}%&gt;
&lt;%if (request.getParameter("radio").equals("chamado")){ %&gt; 
href="inserechamado.jsp" &lt;%}%&gt;&gt;INSERIR</a>
<a >CONSULTAR</a>
<a >ALTERAR</a>
<a >EXCLUIR</a>
&lt;/body&gt;
&lt;/html&gt;