charging the battery

So you have a "9v rechargeable battery"? What type of battery is it? How you charge it depends on what it's chemistry is. A link to a specification would be good.

Often the best way to charge batteries without removing them is to arrange a charging socket that disconnects the battery from the circuit. Or do you mean that it needs to carry on providing power to the project while you are recharging it?

Steve