Josephson effects in condensates of excitons and exciton polaritons