Defeat in the Russo-Japanese War of 1904 - 5 contributed to the Revolution of 1905 , which resulted in the formation of a parliament and other reforms .