The NWS Tutorial

How to create a new NWS project?



WARNING: This tutorial is being written! Do not hesitate to report any errors or suggestions.

The procedure for creating a new NWS project through Eclipse is relatively simple. You simply have to follow the next procedure.

  1. Start Eclipse and select the desired workspace. The workspace is a directory where you can define several projects: said otherwise a workspace is a set of projects.
  2.  
  3. From the "File" menu, create a new Java project. Give it a name and finish the construction stage of the project.
  4.  
  5. Add to your project a WEB-INF directory. Then add the following subdirectories: WEB-INF/classes, WEB-INF/lib and WEB-INF/sources.
  6.  
  7. Ask the options of the project (through the right mouse button): a dialog box will appear. In the selection, choose "Java Build Path" and select the "Source" thumb. You must now have to set the project to point to the directory of the sources and to the directory of classes production on, respectively, WEB-INF/classes and WEB-INF/sources, as shows the screenshot below.
  8.  
     
  9. Put the Java archive of the NWS framework in the directory WEB-INF/lib.
  10.  
  11. Edit the file WEB-INF/web.xml as shown below. The project is now completed to receive your development. Place the Web pages from the root of the project. Place, of course, your Java classes in WEB-INF/sources. All you now have to do is to develop your web application.
  12.  
 
01 <?xml version="1.0" encoding="UTF-8"?>
02 <!DOCTYPE web-app PUBLIC
03   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
04   "http://java.sun.com/dtd/web-app_2_3.dtd">
05 
06 
07 <web-app>
08 
09     <display-name>Virtual Caddy - NWS Sample</display-name>
10     <description>NWS Sample</description>
11 
12     <servlet>
13       <servlet-name>NWS Servlet</servlet-name>
14       <servlet-class>corelib.services.web.server.ControllerServlet</servlet-class>
15     </servlet>
16 
17     <servlet-mapping>
18         <servlet-name>NWS Servlet</servlet-name>
19         <url-pattern>*.wp</url-pattern>
20     </servlet-mapping>
21 
22 </web-app>
File WEB-INF/web.xml

CAUTION : NWS is proposed to you in BETA version to allow evaluation of this framework. Infini Software is released from any responsibility for the use of framework NWS. In addition, Infini Software can in no way be liable for the use of information contained in these tutorials.

Dominique LIARD - © 2007 SARL Infini Software - All rights reserved
Other brands and product names in these documents are the property of their respective owners.