I'm not too sure what the problem is?
Setting parameters in an HQL query is pretty straight forward. Just get the information from the client, and set the parameter in the query:
From the Hibernate Tutorial on Using HQL and Creating Hibernate Queries
Code:
Session session = HibernateUtil.beginTransaction();
String loginName = "mj";
String hql="from User where loginName = :name";
Query query = session.createQuery(hql);
query.setString("name", loginName);
Object o = query.uniqueResult();
User user = (User)o;
System.out.println(user.getLoginName());
HibernateUtil.commitTransaction();
What is the specific problem you are having?