敲代码遇到的问题
首先数据库没有源码,我自己写了几条,结果可以跟老师的对上。大家不嫌弃可以直接用。
INSERT INTO goods VALUES (6,'华派手机',1200,1800,null);
INSERT INTO goods VALUES (7,'华派pad',800,1400,null);
INSERT INTO goods VALUES (8,'酷为手机',650,1100,null);
INSERT INTO goods VALUES (9,' 酷为pad',700,1500,null);
INSERT INTO goods VALUES (10,'遐想手机',800,1100,null);
INSERT INTO goods VALUES (11,'遐想pad',750,1100,null);
INSERT INTO goods VALUES (12,'助兴手机',900,1600,null);
INSERT INTO goods VALUES (13,'助兴pad',900,1700,null);
INSERT INTO goods VALUES (14,'棒槌手机',1300,3100,null);
INSERT INTO goods VALUES (15,'棒槌pad',1200,3100,null);
INSERT INTO tradinginf VALUES (4,6,123456,7);
INSERT INTO tradinginf VALUES (1,6,123456,0);
INSERT INTO tradinginf VALUES (2,6,123456,0);
INSERT INTO tradinginf VALUES (3,6,123456,0);
INSERT INTO tradinginf VALUES (5,7,123456,4);
INSERT INTO tradinginf VALUES (6,8,123456,7);
INSERT INTO tradinginf VALUES (7,8,123456,0);
INSERT INTO tradinginf VALUES (8,9,123456,3);
INSERT INTO tradinginf VALUES (9,10,123456,1);
INSERT INTO tradinginf VALUES (10,11,123456,2);
INSERT INTO tradinginf VALUES (11,12,123456,1);
INSERT INTO tradinginf VALUES (12,13,123456,2);
INSERT INTO tradinginf VALUES (13,14,123456,1);
INSERT INTO tradinginf VALUES (14,15,123456,4);
INSERT INTO tradinginf VALUES (15,15,123456,0);
第二个问题是结尾的时候jsp页面点击生成报表报错404
我的解决办法是在web.xml文件中配置
<servlet>
<servlet-name>ShowReport</servlet-name>
<servlet-class>servlet.ShowReport</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ShowReport</servlet-name>
<url-pattern>/ShowReport</url-pattern>
</servlet-mapping>
然后就可以解决了。