Really you just need Tomcat installed on your machine. The other stuff is useful if you're doing enterprise development, but since you're asking these kinds of questions, I'll assume you're not

Also, I'm assuming you know at least something about a database and that SQL Server is properly set up on your other machine. If it isn't, then you really need to question why you are doing this.
Anyways, what you'll want to do is create a servlet that responds to an HTTP request from a webpage you've set up. You'll also need to configure your web.xml file and put a resource-ref section in it. Like this:
<resource-ref>
<description>Resource</description>
<res-ref-name>
jdbc/db
</res-ref-name>
<res-type>
javax.sql.DataSource
</res-type>
<res-auth>
Container
</res-auth>
</resource-ref>
In the server.xml for in your tomcat/conf directory, you'll need to configure a Resource:
<Context path="/TestServlet" docBase="C:\projects\test\testservlet" workDir="C:\projects\test\testservlet\work\org\apache\jsp">
<Resource name="jdbc/db" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/db">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>30</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>username</name>
<value>the_username</value>
</parameter>
<parameter>
<name>password</name>
<value>the_password</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.gjt.mm.mysql.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/test?autoReconnect=true</value>
</parameter>
</ResourceParams>
</Context>
Then in your servlet's init function, you'll want to get access to that database stuff you've been setting up:
public void init(ServletConfig config) throws ServletException
{
context = config.getServletContext();
try{
initCtx = new InitialContext();
envCtx = (Context) initCtx.lookup("java:comp/env");
ds = (DataSource) envCtx.lookup("jdbc/db");
}
catch(Throwable t)
{
t.printStackTrace(System.out);
}
super.init(config);
}
Finally in the method in which you want to call your database, you'll need something like this:
Connection conn;
conn = ds.getConnection();
Statement st = conn.createStatement();
String sql = "select whatever from yourtable";
ResultSet rs = st.executeQuery(sql);
if ( rs.next() )
{
//do whatever you want with the data
}
conn.close();