开发者

How to upload image in web services using jsp?

开发者 https://www.devze.com 2023-03-02 13:50 出处:网络
@WebService() public class UrmapsDatabaseManage { private static Connection getConnection() thr开发者_如何学运维ows Exception {

@WebService() public class UrmapsDatabaseManage {

private static Connection getConnection() thr开发者_如何学运维ows Exception { Class.forName("com.mysql.jdbc.Driver"); String url = "jdbc:mysql://localhost:3306/dburmap";

return DriverManager.getConnection(url,

"root", "123"); }

above is my connection with mysql db..Could someone help me to do a code to insert image into my db? Please help me :(


Instead of saving whole image in database you should consider uploading the image somewhere relative your webapp path and only save that path in database.

0

精彩评论

暂无评论...
验证码 换一张
取 消