This is a complex issue and there is a temptation to often accentuate causal linkages between Russia's defeat and the outbreak of the 1905 Revolution. However, 1905 was the reflection of long-standing tensions and problems that permeated tsarist society and the state. Although the press and some elements of Russian society rallied to the flag with the outbreak of the war, significant sections of Russian society were skeptical of the war and unenthusiastic. Among the empire's non-Russian nationalities, especially in the Western Regions, the popular response to the war ranged from ambivalence to hostility. The increasingly militant working classes also saw the war as an example of tsarist indifference to the actual problems of Russian society. Among labor extremists and radical intellectuals, the war provided a pretext for mass action to force Russia towards a revolution.
The series of Russian defeats prompted many groups into action. Among the reformist middle classes, the defeat underscored the need for a political reform of the autocratic state structure. The liberal presses began to criticize the state for fighting a needless war, and even worse, losing it. This press criticism, which begins at around 1904, exposed the fact that tsarist autocratic power often was more apparent than real. As the attacks on the conduct of the war intensify, so to did public and private criticism of the Romanov state as a whole. The edifice of state power suddenly began to crumble as strikes, general hooliganism, and other visible signs of dissatisfaction with the empire's direction found public expression. The Japanese defeat here made the authorities more paranoid about wider disorder. One prominent example of this was Bloody Sunday, a reformist labor march 22 January 1905 led by the Orthodox priest, Father Gapon tried to deliver a petition to the Winter Palace in St. Petersburg and army troops shot at the demonstrators. From there, popular protests became more militant and radicals like Lenin began arguing for a more thorough overthrow of the tsarist state. Through an adroit use of force and strategic political concessions, the Romanov state weathered the crisis of 1905, but only barely. The Tsar now had to work with a legislative body that could submit laws for approval by the tsar and the state council. The Russian state also guaranteed some degree of civil liberty and assembly. But the tsar retained extensive executive power and his ministers were above any oversight save the emperor.
In the end, the war exposed tensions within the state and it gave the empire's various dissatisfied groups, of which there were many, the pretext to call for a radical restructuring or overthrowing of the state. The war itself did not create these grievances, but the Russian military's defeat underscored the actual weaknesses of the state. The government's harsh response to demonstrations hardened radical opinions that the Romanov rule was fundamentally unworkable with modern development. The compromised nature of the political reforms enacted after 1905 meant they never really satisfied the moderate elements within Russia's political society. State power remained more or less intact after the 1905 crisis and the Russian army began a program of reform and expansion. More pertinent for WWI and 1917, the 1905 Revolution imparted a strong memory of state impotence and the need for precipitous action again once the Romanovs found themselves in another jam. When the domestic crisis deepened in 19165/17, many elements in Russian political circles, whether liberal or Bolshevik, were determined never to let the tsarist state regain the initiative, as it had in 1905.
Sources
Ascher, Abraham. The Revolution of 1905: Russia in Disarray 1. Stanford, Calif: Stanford Univ. Press, 1994.
_.P.A. Stolypin: The Search for Stability in Late Imperial Russia. Stanford, CA: Stanford University Press, 2001.
Schimmelpenninck van der Oye, David. Toward the Rising Sun: Russian Ideologies of Empire and the Path to War with Japan. DeKalb, Ill: Northern Illinois University Press, 2001.
Ury, Scott. Barricades and Banners: The Revolution of 1905 and the Transformation of Warsaw Jewry. Stanford: Stanford University Press, 2012.