By default there is no web application in Net Beans 7.1 so you have to install plugin of web application.In order to do that, go to tool>plugin.A window will pop-up where all updates,available plugins,downloaded, installed plugins option are available.In order to install these plugins you must be connected to internet.
In available plugins,click reload catalog which will update available plugins.From the list select
--web application
--Glassfish
--Css preview
and install, it make take few minutes .After installation you need to restart Net beans IDE.
Now you are done. Go File>new project ,now you have option for JAVA web in category then select web application in project.click next,then give name for project and location for project to save.Then in next, select server from drop down list which is Glassfish that we installed before,you can add other server like tomcat instead.Select java EE version as java EE 6 and click finish.

