Steps for writing and running jsp programs in eclipse:
1. Click File->New->Project , the interface as shown in the figure appears, select Web->Dynamic Web Project, click next
2. Fill in the project name in Project name, and click New in target runtime runtime, select the version of tomcat you installed, click Finish
3. You can find the newly created project in the Project Explorer on the left Project MyJsp, find WebContent
#4, right-click WebContent, new->jsp file, the window as shown in the figure will appear, you can change the file name in the file name column , finish
5. Then you can write the jsp file. It should be noted that in some of the generated codes, the parameters after charset must be changed to "utf- 8", otherwise the Chinese characters will appear garbled
6. You can write some tags below. Friends who are interested in this can learn the relevant knowledge of html language
7. Click the green button in the middle to run
8. Click next in the window that appears, and then continue. In the window that appears, select the jsp project that needs to be run into the right window
9. The final running result is as shown in the figure.
The above is the detailed content of How to write and run jsp program in eclipse. For more information, please follow other related articles on the PHP Chinese website!