I think a temperature of 300 °C is dangerous. I think it's dangerous because you might be a dopey electronics tech like me and put the resistor dummy load on the end of the ATX power cable and lay it a bunch of papers or a wood desk. When you start to see the paper smoke and the wood starts to smoke and burn, you'll understand why these power resistors can be unwittingly dangerous. We're all use to using 1/4 watt resistors and they don't usually get hot plugged into a perfboard, but power resistors are a breed unto themselves.
So put them in a box with plenty of ventilation to avoid touching them. 1/4 W resistors can also get quite toasty near their rated power by the way, it's just that we tend to run them at << 1/4 W. Even though they may get 100 °C instead of 200 °C for a power resistor, 100 °C is still plenty to burn your skin.
I'm still waiting for an EE to calculate the thermal properties of a power resistor and show me how to calculate the heat generated of various wattage resistors run at the same current and voltage. What specs do I need to use and what's the math?
As IanB I will assume you mean temperature and not heat, since heat equals power in this case.
The data sheet will sometimes contain a graph of temperature rise vs dissipated power. Add the temperature rise to the ambient temperature and you've got an estimate for the temperature it will reach. This is usually defined for the resistor sitting in free air, so it will be higher for an enclosed space. The maximum power is usually derated with ambient temperature, that 5 W resistor won't be able to handle 5 W at 150 °C ambient. If the data sheet does not contain a load vs temperature curve, check other data sheets of resistors with similar materials, construction and dimensions.
Another way would be to estimate the thermal resistance from the temperature derating curve. Temperature derating often just shows the maximum power that will keep the temperature below the max. operating temperature, so if a 20 W resistor can handle 100% of the power at 70 °C ambient, linearly decreasing to 0% at 270 °C, you might estimate the thermal resistance to be 200 K / 20 W = 10 K/W. This assumes that the thermal resistance is constant, which may not be accurate, so it may be too conservative (high).