Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Web Tools Guide
Previous Page Home Next Page

Static Web projects

If you want to create a content-based Web application that does not contain any dynamic content (such as servlets, JSP files, filters, and associated metadata) you might prefer to create a static Web project, as opposed to a dynamic Web project.

Static Web projects have the following characteristics:
  • a Web content folder (called WebContent) for all publishable resources, You can change the name of this folder from the project's pop-up menu.
  • a Theme folder, the suggested directory for storing cascading style sheets and other style-related objects.
  • the ability to define folders outside of the Web content folder, for storing intermediate files, such as MIF files
  • a conversion path from a static Web project to a dynamic Web project. If you decide to convert the project, it will be a fully-valid dynamic Web project.
In addition, your project will still have the following features (which are common to both static and dynamic Web projects ) :
  • HTML syntax validation
  • a broken link fix-up wizard
  • a Web site navigation tool
  • a new server type, the Static Web server, which makes it easy to publish static Web projects

The folder that a static Web project is published to is modifiable, so that when you set the publishing "root" value (called a context root), such as /web1, for a static project, everything in the Web content folder will be published to the web1 folder under the Web server's doc root. This enables you to group Web resources on a Web server in folders that correspond to Web projects in the workbench. When projects defined in this way are ready for production, you can publish specific projects directly to the doc root by changing the value to / and all publishing, link fixing, and browsing will update automatically.

Aliases can also be used to specify a context root value. For example, suppose that there is an alias that is defined on the target Web server, as follows:
Alias /scripts/ "/var/www/scripts"
In this example, in which the current static Web project will contain common JavaScript™ files, you can set the context root value to be "scripts". In order for the resources in the static Web project to be published to the correct location on the Web server, you must add this Alias mapping to the server tools instance of the static Web server, as follows.
  1. From the Server view, double-click on the static Web server configuration to open the server configuration editor.
    Note: This assumes that you've already defined the static Web server.
  2. Click the Configuration editor tab.
  3. Scroll down to the Alias Path Mapping section, and add the new Alias mapping.
Now that "scripts" is defined as an Alias, the Web content in the static Web project will be published to the mapped path, /var/www/scripts.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire