Configure servlet in linux

Source: Internet
Author: User
Set the servlet in linux, and install Tomcat 6 manually. Using netbeans in windows is very simple and you have configured it directly .. But it is quite troublesome in linux. All configurations must be written by yourself .. After a night, it was still not completed .. After that, btw got it ready. It's actually quite simple...

Set the servlet in linux, and install Tomcat 6 manually.

Using netbeans in windows is very simple and you have configured it directly ..

But it is quite troublesome in linux. All configurations must be written by yourself ..

After a night, it was still not completed ..

After that, btw got it ready.

In fact, it is also very simple ..

We all know that jsp is rooted in/lib/var/tomcat6/webapps/ROOT. That is, your jsp file must be placed in this directory. of course, you can configure it.

However, the servlet class file must be manually created under the ROOT WEB_INF folder, create a new classes folder under this folder, and put all the class files in it.

This completes half of the work. The next step is the configuration problem.

Add the following statement to/etc/tomcat6/web. xml:

 


Name
ClassName


Name
/PatternName


Make sure that the servlet-name is the same. classname does not need to be suffixed with. class, and patternName is random.

Enter http: // localhost: 8080/patternName in the browser .. Before that, restart Tomcat 6.

Author: "The columns of blank_bird"

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.