Commodore George Dewey was sent to the Philippines prior to the USS Maine explosion or the Declaration of War. How would he know to immediately attack the Spanish if the only communication he had with the U.S. was through other boats which took much time to communicate.
If the information I have is incorrect or lacking in parts please correct me
Edit: Okay, thank you. This makes much more sense than the summery I read.
To add to r/DBHT14's excellent summary, Dewey's only communication with the US was not through other boats. There was a telegraph link between Washington and Hong Kong, and it was, of course, via telegraph that Dewey was informed that war had been declared, and the same medium conducted his orders to attack the Spanish fleet in the Phillipines.
The base of the Asiatic Squadron under Dewey was British held Hong Kong. It was there that he gathered his fleet at the end of March 1898. He spent a few weeks waiting for word while stocking up on coal, and preparing(painting his ships grey and getting all flammable wood off the ships). It was here also that the cruiser Baltimore joined him as well as reinforcement.
On April 22 he received news of the deceleration of war and Britain's neutrality, meaning he had to sail out of the harbor which he did so on the 25th. Having left behind a packet ship to receive war orders he waited in the offing until the morning of April 26th when he received the orders from Washington to attack Manilla and the Spanish fleet, and he set course to arrive there on the night of April 30 and enter the Bay the next morning.