Modifying the template code for a servlet

Source: Internet
Author: User

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. 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. 2

    With the compression tool open, note that it is open not to unpack this jar package, as shown in:

  3. 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. 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. 5

    Find the Doget () and Dopost () methods inside, delete the comments, write doget in the Dopost () method (request, response);

  6. 6

    Save, and then close! Restart your myeclipse!!

    Create a new servlet after reboot, just tick the Doget () method and the Dopost () method.

  7. 7

    Results:

    END

Experience is for reference only, if you need to address specific issues (especially legal

Modifying the template code for a servlet

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.