perjantai 30. elokuuta 2013

Dynamic Web Project small view around

When you have created a new Dynamic Web Project it will look like this. A lot of folders. Don't panic. We are going to need just few of them in the beginning. WebContent as the name says is the folder for all your web content. For example, images, CSS and HTML goes here. There are two folders inside WebContent. META-INF which we are not going to touch and WEB-INF where you can add libraries. 

 

To start developing your web project just simply right click WebContent and select New - JSP file.


This is your "index.html" page. You can start creating HTML normally. 

Next do the same thing, right click WebContent, but select File instead of JSP and type style.css and finish for example. This is your CSS file. Both index and css straight under the WebContent. You could also create a new folder inside WebContent for example "images" and add some content to your web page.

When you have build your page layout you can open folder Java Recourses. Inside SRC folder you add all the java files for your project. Of course you need some Java knowledge. 

To run your page, press the green play button

Select Run On Server, pick Tomcat and Finish

  

Now Eclipse opens Web browser and shows your page.



This is my test page and my folder hierarchy.





Ei kommentteja:

Lähetä kommentti