When the action is upon a contract and against one or more defendants jointly liable, judgment may be given on the confession of one or more defendants, against all the defendants thus jointly liable, whether such defendants have been served or not, to be enforced only against their joint property and against the joint and separate property of the defendant making the confession.