If you speak about run-time application structure, it has some pre-defined structure. You do not have to have exactly the same structure when you develop the project. Instead of it, you can rearrange the files and folders and create a war and deploy it toward servlet container. Using
ant script (build.xml) is most common way to do so.
However, you can simplify the process, having a structure similar to the structure of the war file. Some servlet containers are enable for null-deployment. I.e. ability to launch the application from the place where it is developed. Having the build.xml is not required in this case. Exadel uses null-deployment. Just for kick start do the following:
1. From the Eclipse menu, select File->New->Project then Exadel Studio->JSF->JSF Project
2. On the first screen of the wizard, type any name and select JSFKickStart as a template
3. Click Next
On the second screen, wizard ask you about Registering Web Context in the server.xml This means register your new application under Tomcat for null-deployment. Leave the checkbox checked.
4. Click Finish
Exadel Studio create a ready-to-launch simple JSF application for you. To launch the application:
5. Run the Tomcat using the green arrow at the Eclipse toolbar.
6. Select the new created project in the Package Explorer tree and then click the Launch Application button (Running Man near Butterfly) from the Eclipse toolbar.
The browser with running application should appear.
Close the browser and return back to the Eclipse. Overview the structure, Exadel Studio created for you. (It is more convenient to switch to the Eclipse Resource Perspective, because the Package Explorer on this perspective shows unfiltered tree structure). The project contains WebContext folder. It is top point of the application. (WebContext is not a reserved name, it my be different in your own application). This folder is registered in the Tomcat server.xml as a context folder for your application. WebContext folder contains WEB-INF folder (this name is reserved). WEB-INF contains 'classes' and 'lib' folders and faces-config.xml and web.xml
Let's return back to your previous project you imported. Does it have the similar structure? If so, it is ready for null-deployment. Right click on the project root and select Exadel Studio -> Register Web Context in Tomcat from the context menu (actually, if you import the project with Import JSF Project wizard, the project might be already registered). Stop Tomcat from the toolbar, then start it again. Launch the application with "Running Man on Butterfly" button.
--
Sergey :
jsfTutorials.net [ June 15, 2005: Message edited by: Sergey Smirnov ]