Auto Texture-Coords Generation! HELP!

The glTexGen works fine on the glutSolidTeapot.

But when I do this on my own triangles it only works on some faces (floor, ceiling).

Please send some sample code.
How do I magnify the texture usin glTexGen (without using glTexCoord2d)?