0% found this document useful (0 votes)
41 views

How To Create A Web Application in Eclipse

The document provides steps to create a web application in Eclipse: 1) Install Eclipse IDE and Tomcat server 2) Create a Dynamic Web Project in Eclipse and add a JSP file 3) Run the project on the Tomcat server to view it at localhost:8080/projectname 4) Export the project as a WAR file to deploy it to Tomcat's webapps folder
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

How To Create A Web Application in Eclipse

The document provides steps to create a web application in Eclipse: 1) Install Eclipse IDE and Tomcat server 2) Create a Dynamic Web Project in Eclipse and add a JSP file 3) Run the project on the Tomcat server to view it at localhost:8080/projectname 4) Export the project as a WAR file to deploy it to Tomcat's webapps folder
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

::: Developer Toolkit ::: How to create a web application in Eclipse

How to create a web application in eclipse:

01. 02. 03. 04. 05. 06. 07. 08. 09. 10. 11. 12. 13. 14. 15. 16. 17. 18.

Download and install http://tomcat.apache.org/ Download and install Eclipse IDE for Java EE Developers Start Eclipse Window -> Preferences -> Web -> CSS+HTML+JSP -> Encoding: ISO 10646/Unicode(UTF-8) Window -> Open Perspective -> Other -> Java EE File -> New -> Dynamic Web Project Enter Project name Target Runtime -> [New] -> Apache -> Apache Tomcat vX.X -> Next -> Tomcat installation directory -> [Browse] -> <Path to tomcat>\Tomcat X.X -> Finish Finish Right click on WebContent -> New -> JSP (index.html / index.jsp as startfile) -> Next -> Use JSP template -> New JSP File(xhtml) -> Finish Right click on project -> Run As -> Run on Server -> Finish Project is available under http://localhost:8080/projectname To change the context root/URI in eclipse : Right click on project -> Properties ->Web Project Settings -> "New Context root" -> Apply -> OK -> OK Right click project -> Export -> WAR file -> Destination: -> [Browse] -> <Path to tomcat>\Tomcat X.X\webapps (write name in small letters) -> Save -> Finish To change the context root/URI for tomcat just rename the WAR file Stop Eclipse-tomcat-server by pressing STRG+ALT+S Start tomcat ("<Path to tomcat>\Tomcat X.X\bin\tomcatXw.exe") Now Project is deployed in tomcat and can be used without eclipse

How to import the unit converter example in eclipse:

01. 02. 03. 04. 05. 06. 07.

Download and install http://tomcat.apache.org/ Download and install Eclipse IDE for Java EE Developers Start Eclipse Window -> Preferences -> Web -> CSS+HTML+JSP -> Encoding: ISO 10646/Unicode(UTF-8) Window -> Open Perspective -> Other -> Java EE Right click on Project Explorer -> Import -> WAR file -> WAR file [Browse] -> "UnitConverter_DWP.war" -> Open Target Runtime -> [New] -> Apache -> Apache Tomcat vX.X -> Next -> Tomcat installation directory -> [Browse] -> <Path to tomcat>\Tomcat X.X -> Finish
1/2

::: Developer Toolkit ::: How to create a web application in Eclipse

08. 09. 10. 11. 12. 13. 14. 15.

Next -> Finish Goto http://jscience.org/ and download JScience (Get Library) (you only need jscience.jar of the zip-file) Copy jscience.jar to /<eclipse-workspace>/UnitConverter_DWP/WebContent/WEBINF/lib In eclipse press F5 Project -> Clean... -> OK Rightclick on project -> Run As -> Run on Server -> Finish Project is available: http://localhost:8080/UnitConverter_DWP or http://localhost/UnitConverter_DWP To change the context root/URI in eclipse : Right click on project -> Properties ->Web Project Settings -> "New Context root" -> Apply -> OK -> OK

2/2

You might also like