Thursday, 1 February 2018

Configure Tomcat in Eclipse

Open Eclipse

Got Window>Show view > other > servers

Now configure Server tab visible at beside console tab

Click  ->   new server wizard

Select tomcat version

Next > Finish


Now Double click on Tomcat server in the server list

check radio buttion  "Use Tomcat installation" server location section

Then save the file by typing ctrl+s

Now right click on Tomcat server in the server list

Properties > Switch Location  > Apply > ok


Now right click on Tomcat server in the server list  and  Click on Start



-------------------------------------------------------------------------------------------------


Creating Web project and deploying in tomcat


New > other > web > Dynamic web project >

Project Name : MyWebapplication

Next  src > next

Context Root : My webapplication
Content directory: Webcontent  -> here .jsp, html files need to place here

check mark -> Generate web.xml deployment descriptor(web.xml)



----------------------------------------------------------------------------------------------------



window > show view >  navigator 


expand project >  webcontent > web-inf  > web.xml
click source view


Now goto

select webcontent  > new > other > web  > html file  > next  > index.html > finish



write inside body



<h3>Welcome to HTML <h3>


then save


---------------------------------------------------------------------------

select project > Run As  > Run on server > next  > finish


No comments:

Post a Comment