Modify the creation of a servlet-generated template to make the generated servlet more refreshing. __servlet

Source: Internet
Author: User

When you use Eclipse to create a servlet, Eclipse is created with a reference to a template, which makes it a lot easier, but there are a lot of annotations and default settings in this template. After we figure out what the servlet is and how it's used, it's always a bit annoying to create a servlet every time. For example:

A servlet created in this way is created from a template. This is not a bit messy.

Here's how to modify this template:
1.Myeclipse installation directory inside the search
Com.genuitec.eclipse.wizards_11.5.0.me201310291746.jar
Find the following:

2. Right-key compression format open
Find Templates folder

3. After you have seen the location of the template, copy one out to stay for backup may also need to restore the original template after the time (can also make the entire jar backup more violent simple)

Open the template and look like this

Generally we deal with Doget and dopost requests, so generally only modify these two can be, the other on-demand changes, I changed to this:

Save it after the change. The modified template is then overwritten into the original package (close MyEclipse first), and then the new servlet will be created as you modified it. Done.
As follows:

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.