  This work aims to utilize the increased sensitivity and resolution of the
JWST to quantify the HDO/H$_{2}$O ratio in ices toward young stellar objects
(YSOs) and to determine if the HDO/H$_{2}$O ratios measured in the gas phase
toward massive YSOs (MYSOs) are representative of the ratios in their ice
envelopes. Two protostars observed in the Investigating Protostellar Accretion
(IPA) program using JWST NIRSpec were analyzed: HOPS 370, an intermediate-mass
YSO (IMYSO), and IRAS 20126+4104, a MYSO. The HDO ice toward these sources was
detected above the 3$\sigma$ level and quantified via its 4.1 $\mu$m band. The
contributions from the CH$_{3}$OH combination modes to the observed optical
depth in this spectral region were constrained via the CH$_{3}$OH 3.53 $\mu$m
band to ensure that the integrated optical depth of the HDO feature was not
overestimated. H$_{2}$O ice was quantified via its 3 $\mu$m band. From these
fits, ice HDO/H$_{2}$O abundance ratios of 4.6$\pm$1.8$\times$10$^{-3}$ and
2.6$\pm$1.2$\times$10$^{-3}$ are obtained for HOPS 370 and IRAS 20126+4104,
respectively. The simultaneous detections of both crystalline HDO and
crystalline H$_{2}$O corroborate the assignment of the observed feature at 4.1
$\mu$m to HDO ice. The ice HDO/H$_{2}$O ratios are similar to the highest
reported gas HDO/H$_{2}$O ratios measured toward MYSOs as well as the hot inner
regions of isolated low-mass protostars, suggesting that at least some of the
gas HDO/H$_{2}$O ratios measured toward massive hot cores are representative of
the HDO/H$_{2}$O ratios in ices. The need for an H$_{2}$O-rich CH$_{3}$OH
component in the CH$_{3}$OH ice analysis supports recent experimental and
observational results that indicate that some CH$_{3}$OH ice may form prior to
the CO freeze-out stage in H$_{2}$O-rich ice layers.
