In actual development, these generated code and comments are generally not available to us, each time we have to manually delete these comments and code, very troublesome. The following is an example of how to modify the template code for a servlet in MyEclipse 2014, which is a generic version, which can be modified.
Method/Step
- 1
Locate the \common\plugins folder in the MyEclipse installation directory, for example: C:\Users\bai\AppData\Local\MyEclipse Professional 2014\plugins, Then find Com.genuitec.eclipse.wizards_******.jar this jar file (* denotes a string of numbers), as long as it is com.genuitec.eclipse.wizards**** this jar package is correct.
- 2
With the compression tool open, note that it is open not to unpack this jar package, as shown in:
- 3
Open Com.genuitec.eclipse.wizards_*****.jar This jar file, you can see that there is a templates folder, into the Templates folder, You can see that there is a Servlet.java file in it, as shown in:
- 4
Open the Servlet.java file, you can see the template code inside: Delete the comment, in the Dopost () method write Doget (request, response);
- 5
Find the Doget () and Dopost () methods inside, delete the comments, write doget in the Dopost () method (request, response);
- 6
Save, and then close! Restart your myeclipse!!
Create a new servlet after reboot, just tick the Doget () method and the Dopost () method.
- 7
Results:
END
Experience is for reference only, if you need to address specific issues (especially legal
Modifying the template code for a servlet