We present SCUBA-2 450{mu}m and 850{mu}m observations of the W40 complex in the Serpens-Aquila region as part of the James Clerk Maxwell Telescope (JCMT) Gould Belt Survey (GBS) of nearby star-forming regions. We investigate radiative heating by constructing temperature maps from the ratio of SCUBA-2 fluxes using a fixed dust opacity spectral index, {beta} = 1.8, and a beam convolution kernel to achieve a common 14.8 resolution. We identify 82 clumps ranging between 10 and 36K with a mean temperature of 20{pm}3K. Clump temperature is strongly correlated with proximity to the external OB association and there is no evidence that the embedded protostars significantly heat the dust. We identify 31 clumps that have cores with densities greater than 105cm{^{-3}}. Thirteen of these cores contain embedded Class 0/I protostars. Many cores are associated with bright-rimmed clouds seen in Herschel 70 {mu}m images. From JCMT HARP observations of the 12CO 3-2 line, we find contamination of the 850{mu}m band of up to 20 per cent. We investigate the free-free contribution to SCUBA-2 bands from large-scale and ultracompact H ii regions using archival VLA data and find the contribution is limited to individual stars, accounting for 9 per cent of flux per beam at 450 {mu}m or 12 per cent at 850 {mu}m in these cases. We conclude that radiative heating has potentially influenced the formation of stars in the Dust Arc sub-region, favouring Jeans stable clouds in the warm east and fragmentation in the cool west.