I have added all data in PostgreSQL with the help of POSTGIS. I made a store in Geoserver, but after adding data when I click on the Open Layer option it does not open, and a file downloaded is shown at the bottom (showing WMS service). What is the problem?
If trying to view a layer on the openlayers preview results in an error it means the layer is miconfigured somehow. You should see an exception on the console or in the geoserver log. Impossible to know what the issue is without it.