using variables as FRAME links

I have a main page that calls a sub page (see code below) and in the controller I just set link1, link2, and link3 to be some hard coded test pages, but when i view the frames page below all the frames are empty. If I move the hard code links into the place of link1,2,3 then it works fine, but i want to use variables as I want the frames to display different things depentent on user variables. Does this make sense? Thanks

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 FRAMESET //EN"> <html>

<frameset cols="33%,33%,33%">

   <frame src="<%= @link1 %>">    <frame src="<%= @link2 %>">    <frame src="<%= @link3 %>">

   <NOFRAMES>       <body>Frames Not Supported</body>    </NOFRAMES>

</frameset>

</html>