Jesus says, "If you remain in me and my words remain in you, ask whatever you wish, and it will be given you" (John 15:7). Notice that Jesus began this promise with a little word called "if". The word "if" is a little word with consequences. The word "if" means that this promise for answered prayer is conditional upon something. What is it? Jesus says that you can ask whatever you wish, so long as "my words remain in you."
You must have God's word abiding in you if you expect an answer to your prayer. Often Christians pray for something, such as healing, yet they don't have any promise from God abiding in them which guarantees that God will answer.