In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to configure Servlet for Tomcat+MyEclipse development. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
The following mainly starts with the configuration of tomcat:
First of all: download tomcat, I use version 5.5.
Then set the tomcat:
TOMCAT_HOME: C:\ Program Files\ Apache Software Foundation\ Tomcat 5.5
CATALINA_BASE:C:\ Program Files\ Apache Software Foundation\ Tomcat 5.5
CATAlINA_HOME:C:\ Program Files\ Apache Software Foundation\ Tomcat 5.5
Please adjust the above path according to your actual situation.
Next: start tomcat and test whether tomcat is installed in the browser
If the tomcat installation is complete
Below, copy common\ servlet-api.jar from the tomcat installation directory to your jre\ lib\ ext
Then there are the steps for MyEclipse to develop Servlet. Create a new webproject in myeclipse, name it Hello, add servlet function, IDE will automatically generate relevant files, you can change the relevant configuration of web.xml located in the WEB-INF directory, but for now we ignore it, and then open the generated index.jsp, modify and add a form form, the action value is: Hello\ servlet\ your-servlet-name, where your-servlet-name is the name of the servlet class you just built, and then add two buttons in index.jsp. Ok,index.jsp modification completed.
Then we configure the tomcat path in myeclipse, open windows in the myeclipse menu bar, select preferences, select myeclipse enterprise workbench in the pop-up dialog box, select servers menu bar, select tomcat5.x server, set the corresponding path, and select the button of enable. Click ok.
OK, tomcat has been configured, and then we start tomcat in myeclipse. Please make sure that the tomcat just used for testing is turned off, otherwise an error will be reported. Then we open servers and deploy our project to tomcat
Type: http://localhost:8080/Hello/ in the browser, click the submit button, and you will see the following sentence: This is class servlet.test.Test, using the GET (or POST) method.
This is the end of this article on "how to configure Servlet for Tomcat+MyEclipse development". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.