If you are looking for pointers on where to start, here it is:
A typical java web environment is a WebContainer like Tomcat server.
See http://tomcat.apache.org
You would need a book/tutorial on how to write servlet that runs in webcontainer.
Once your servlet is up, then you may try connecting to any database vendor. for MS SQL server you would need their JDBC drivers. google tells me u may download here:
http://www.microsoft.com/downloads/details.aspx?FamilyId=6D483869-816A-44CB-9787-A866235EFC7C&displaylang=en
You would need to learn how to get data out using java.sql packages. Read javadoc on these.
Once you got data out of db from servlet, you would typically forward to a JSP page to render a html view of your selected data.
Have fun.