I have a layer in geoserver with an SLD style, which I display in a map web app using OpenLayers2. I want to know if there is a way to change part of the style (the width of the line geometry) through Openlayers? Is it possible to manipulate easily the SLD (style) of the WMS?
The quick answer to the question is yes it is possible.
You will need to construct an external SLD file, and store it on your server, then you will need to send a GetMap request that references that SLD in your request.
So here for example is a GetMap request to a GeoServer WMS (generated through a web client using OpenLayers)
And here is a request to the same GeoServer WMS layer, but this time using an external SLD file, generated through the same OL client, (well sort of... I hacked it a bit after its creation to add the red stroke, because the client in question only permits changing polygon fill).