It's not really clear what problem you're having here. Could you post the relevant files, including the new .xhtml file and the new template file, and the paths where those files are located?
I found the solution to my problem. Everything is working fine now. Anyways thanks for replying.