开发者

How can I connect a mySQL database file by using JSP in Spring MVC?(Also Hibernate used.) [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying开发者_JS百科 this question so that it can be reopened, visit the help center. Closed 11 years ago.

Do you advice any tutorial or example?


Don't put it in a JSP; that logic belongs in a service. The service is called by a controller, which is mapped to a particular request from a JSP.

Lots of examples from Spring docs:

  • Spring JDBC
  • Spring MVC step by step


To connect to a MySQL database with Java you clearly need to understand JDBC fundamentals first: specially, how to connect to a Database.

Then you can start worrying about connecting to your MySQL DataBase within SpringMVC or a JSP file. To do that, you will need to provide information about what Application Server you are using.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜