You can pass the parameters with <apex:param
tag. You need to combine <apex:param
with <apex:commandLink
as below. Hope this helps.
<apex:page standardController="Contact" extensions="CommandLinkParamController">
<apex:form >
<apex:commandLink value="Process Nickname" action="{!processLinkClick}">
<apex:param name="nickName"
value="{!contact.firstname}"
assignTo="{!nickName}"/>
</apex:commandLink>
</apex:form>
</apex:page>