@Shoei
It's not exactly that foreigners just ran into China one day and said: "This is all mine." Not they wouldn't have liked it, but there is (as always) more behind the story.
Also please be aware that I am not defending the actions of the foreign powers back in the day.
But in short it's just history repeating today. (talking about the western foreign forces)
At the time foreigner were allowed to live in China (in what was described as ghettoes) they were not allowed to work, or do businesses (or only by huge taxes up to I heard up to 200% depending on the goods), they were attacked and excluded from all walks of life in China. There were a few envoys working with the empire and officials but more for a mianzi thing than real cooperation it seems since they often humiliated.
In short it's the same as today, a bit more moderate but if you read a bit into the past of histories foreign relations you will see that in theory there is very little change.
They tried to screw over foreigner as much today as they did in the old days. Not being able to find a fair or stimulating business deal and then cheat themselves dizzy.
Also check out the story behind the looting of the old summer palace. A lot of interesting facts there that China doesn't like to aknowledge.
Just for fun read some articles about the past in China you will find
History:
-no integration of foreigners.
-Public humiliated and promoted hate/stereotypes
-Limited businesses or employment
-over taxing and random change of laws and regulation
-No right for foreigners in court of law (if there was something like it) if
you didn't have a sponsor (guanxi)
-cheating and break of agreements as standard procedure.
-False accusations to outcast certain groups.
-Forced businesses
-Bad tea prices, revenge through opium.
-greed
-trying to build a monopoly of chinese goods as their export strategy.
-Random attacks and violence even murder of foreigners
-Terrible foreign diplomacy.
-Nationalistic attitudes (gods send Children= Chinese)
-If you don't like it you can leave...
-Military on the ground but still acting like the worlds strongest power.
-Sinocentrism; China is best everything else are barbarian.
Plus be aware that opium wasn't banned from the beginning and guess who made a lot of money from it until it was banned.
Again all that doesn't justified the actions of the foreign forces but having empires to lose, the tactical reaction was obvious especially when your countries smartest general had the name Sunzi and wrote an even smarter book about strategy and warfare.
Present:
See if anything listed above, sounds familiar with today's China.
I'm not saying that foreign states became wiser all together but it took much less to evolve from once mistakes. The U.S. might be an exception of it foreign policy wise but in general I think it's pretty accurate (IMHO).
Also I want to make clear that I condemn what the Japanes did in China, it was unjustified and sick. I hope that those two countires get their shit together and get a real progress in their disputes.