IntelliJ IDEA+ jquery Easyui+MSSQLSERVER+Servlet actual combat 4. Establish web applications and application framework Servlet to establish enterprise applications

IntelliJ IDEA+ jquery Easyui+MSSQLSERVER actual combat 4. Establish web applications and application frameworks to establish enterprise applications

In this section, we will use the web application framework Servlet to build a skintest web application. Based on this application, the reader can basically build an enterprise-level web application with a slight modification.

After the article, there is a framework and source code download...

The framework is shown in the figure below (source code will be uploaded later...)

After downloading the source code, you can add the framework file corresponding to the table corresponding to your own new database in the directory according to the example table t_jqmc, and start writing your own program.

IDE settings

File->project structure select librar, add 9 packages under source code web/web-inf/lib (ms sqlserver package, net.sf.json.JSONObject depends on jar package)

After the bhjs database in the database directory of the source code is restored in MSSQLSERVER, it should be as shown below

Frame and source code download: link: https://pan.baidu.com/s/1yoQNHlWE9hpXcmpKT-B0lw Extraction code: 9agt

1. If you cannot access the database during debugging, please copy mssql-jdbc-7.0.0.jre8 into the Tomcat 9.0/lib directory

2. If the java compiler does not find the package javax.servlet.

Solution: Copy a servlet-api.jar package from the tomcat lib directory to the "JDK\jre\lib\ext" directory, and recompile it.

Or: Right-click on your project, and the property setting list will pop up: Build Path->Add Libraries..., the Add Library dialog box will pop up, select Server Runtime, click the Next button, and select the web server (provided that the web server is configured, for example Tomcat), click Finish.

To be continued..., the code will continue to be updated...

Guess you like

Origin blog.csdn.net/fanxiaoduo1/article/details/106564220