Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

(http://www.studytonight.

com/)

SERVLET TECHNOLOGY

SEE T HE INDEX

Creating First Servlet Application using Eclipse IDE


EclipseIDEisthemostpopularJavaIDEusedintheIndustry.Itisdevelopedbyanopensourcecommunityand
canbedownloadedforfreefromEclipse.org(http://www.eclipse.org/)

Steps to create Servlet using Eclipse IDE


T ocreateaServletapplicationinEclipseIDEyouwillneedtofollowthefollowingsteps:
1. GotoFile>New>DynamicWebProject

2. GiveaNametoyourProjectandclickNext

3. CheckGenerateweb.xmlDeploymentDescriptorandclickFinish

4. Now,thecompletedirectorystructureofyourProjectwillbeautomaticallycreatedbyEclipseIDE.

5. ClickonFirstproject,gotoJavaResources>src.RightclickonsrcselectNew>Servlet

6. GiveServletclassnameandclickNext

7. GiveyourServletclassaNmaeofyourchoice.

8. LeaveeverythingelsetodefaultandclickFinish

9. NowyourServletiscreated,writesomecodeinsideit.Youcantakereferencefromthecodeinthepicture
below.

10. Addservletapi.jarJARfiletoyourproject.ClickonLibraries,rightclickonWebAppLibrariesselect
BuildPath>ConfigureBuildPath

11. ClickonAddExternalJARs

12. T hisJARisnowaddedtoyourproject'sbuildpath.
13. Selectservletapi.jarfromApacheT omcatDirectory

14. NowallyouhavetodoisStarttheserverandruntheapplication.

Prev(creatingservletinnetbeans)

Studytonight2016

Next(servletrequest)

Handcrafted with Love

AboutUs(http://www.studytonight.com/about)Suggest(http://www.studytonight.com/suggest)Terms
(http://www.studytonight.com/terms)ContactUs(http://www.studytonight.com/contact)Collaborate
(http://www.studytonight.com/collaborate/)Authors(http://www.studytonight.com/authors/)Blog
(http://blog.studytonight.com/)

You might also like