If you use the layer property of your scroll view (or any UIView) you can easily get a solid border...
myView.layer.borderWidth = 2;
myView.layer.borderColor = [UIColor blackColor];
Shadowed borders are more complicated, you can create a PNG image with transparency in the middle and shadows around the edge - it needs to have 9 distinct areas: 4 for each corner, 4 for each edge, and a completely transparent 1x1 pixel area in the middle. For example if your shadow extends 6 pixels into your image, your image would be 13x13 with the 6 pixel wide/high borders and the 1x1 area in the middle. Then you set it as a scalable image using:
newImage = [image stretchableImageWithLeftCapWidth:6 topCapHeight:6];
Then you put the image on the parent view so it takes up the entire area of the scroll view. If you want the shadows to go OVER your scrollable elements, (so your scroll view looks inset/behind the rest of the page) then place a transparent UIView over the top with the shadow image on it so that it shows through to your scroll view behind it.