I have created a group of shapefiles using QGIS and I have stored their corresponding information in PostGIS database by importing the shapefile into pgAdmin3 using shapefile and DBF loader. Then I imported the whole PostGIS database to GeoServer. It works fine using OpenLayers link in layer preview option of GeoServer. The attribute values are showing up in tabular form when I click on each object.
What I need now is to create a web based application using Leaflet or OpenLayers where the attribute value is showing as pop-ups and I want the facility to add more shapefiles/PostGIS table dynamically.