No, JFK consulted extensively with the engineers beforehand. The end of the decade timeframe first came from a NASA study published February 7, 1961. Kennedy's budget had actually rejected the initial proposal from Webb to fund the moon program for an end of the decade moon mission just a few weeks prior to Gagarin's flight. A new proposal was put together and presented May 8, 1961 for Johnson by James Webb, Abe Hyatt, and Robert Seaman which pushed for a moon landing by end of decade. Von Braun was even more aggressive, telling Kennedy that it could be done by 1968.