How to add WMS layer in OpenLayers from GeoServer?
Your OpenLayers.Layer.WMS statements should look like this:
basemap = new OpenLayers.Layer.WMS( "Layer Name1",
"http://localhost:8080/geoserver/wms/workspacename", {layers: 'workspacename:layername'} );\
utility = new OpenLayers.Layer.WMS( "Layer Name2",
"http://localhost:8080/geoserver/wms/workspacename", {layers: 'workspacename:layername', transparent:"true"}, {isBaseLayer:false} );