We introduce the notion of halfspaces associated to a group splitting, and investigate the relationship between the coarse geometry of the halfspaces and the coarse geometry of the group. Roughly speaking, the halfspaces of a group splitting are subgraphs of the Cayley graph obtained by pulling back the halfspaces of the Bass--Serre tree. Our first theorem shows that (under mild conditions) any splitting of a one-ended group can be upgraded to a splitting where all the halfspaces are one-ended. Our second theorem demonstrates that a one-ended group usually has a JSJ splitting where all the halfspaces are one-ended. And our third theorem states that if a one-ended finitely presented group G admits a splitting such that some edge stabilizer has more than one end, but the halfspaces associated to the edge stabilizer are one-ended, then H2(G,ZG)={0}; in particular G is not simply connected at infinity and G is not an n-dimensional duality group for n≥3.