We as a group develop Javascript/JSP web application, and the problem is we are developing the webapps based on customer requests, while another team (core team) develops the "core" webapp product.
In other word, we "customize" the Javascript/JSP webapp differently for different customers, most of the customization is in the Javascript code.
The problem is, everytime the core team releases a new version, we have to merge our customization into the newly released product, and this is quite painful.
In essence, we have to diff our customized webapps against the old version and then diff the old version against the new version, and then sync them up.
What are the best practices to deal with this situation?
It sounds like what you have is a Software Product Line. There's been a lot of research in this topic, including some useful podcasts on Software Engineering Radio.
SE-Radio episodes
Episode 53: Product Line Engineering Pt. 1
Episode 58: Product Line Engineering Pt. 2
Episode 90: Product Line Engineering Pt. 3
Episode 153: Jan Bosch on Product Lines and Software Ecosystems