Hello,
When getting started, you need to work through the tutorial:
http://www.web4j.com/Tutorial.jsp
Since you are using SQLServer, any items that are specific to the
database will need to change. You are correct, you need to put your
database driver where Tomcat can see it.
In the electricity.xml file, you will need to change the indicated
settings:
<Context docBase="C:\Temp4\electricity" reloadable="true">
<Resource
name="jdbc/electricity" -- stays the same
auth="Container" -- stays the same
type="javax.sql.DataSource" -- stays the same
username="johanley" -- CHANGE this
password="********" -- CHANGE this
driverClassName="com.mysql.jdbc.Driver" -- CHANGE this
url="jdbc:mysql://localhost:3306/electricity?
useServerPrepStmts=false" -- CHANGE this
maxActive="10" -- stays the same
maxIdle="5" -- stays the same
/>
</Context>
If you are still having problems, let me know.
- John O'Hanley