Resonant behavior in bounded domains and under the influence of weakly periodic forcing with magnitude M≪1 is studied for a general class of one-dimensional nonlinear wave systems. The model encompasses and provides analogy to numerous physically motivated cases such as acoustic resonators. Through a generalized weakly nonlinear analysis the linear response and associated resonant spectrum may be determined. In the case where the spectrum is sufficiently noncommensurate a single mode response emerges with amplitude O(M13). Dependence upon detuning and dissipative effects follow immediately from the subsequent nonlinear balance. In the case where the spectrum is commensurate a multimodal response arises, leading to a coupled system of solvability conditions. The amplitude of the response depends in detail on the commensurate structure, O(M12) in the case where it is fully commensurate. This is in keeping with the well-known dichotomy between responses for acoustic waves in open and closed tubes. Through continuous variation of the model system, the nature of the transition between these distinct regimes is then studied and through an appropriate modal truncation the connection is achieved. A numerical example is presented to further illustrate and corroborate the general analysis.