Setting a multi-user development environment
With Content Server v6.3 and 7.0.x, FatWire edited an eclipse plug-in name “FatClipse”. Unfortunately, that plug is not available in upper version (v7.5.x). However, I will describe in that post how to set your IDE (netbean in my case) for being able to edit your JSP and java files with the requiered confort…
Content Server development system is centralised onto a server. Developer must download temporarely files, update them locally, then upload the file for being tested. The process is completed using FatWire’s tool named “Content Server Explorer”, a windows application.
Files managed by CSE are temporary stored into the user temp directory. As some point, it should be linked with the IDE environment.
In order to link both directories, we will use the “linkd.exe” utility as windows shortcuts are inefficient for our purpose. “Linkd” is deployed with the rktool for windows 2003 but it is compatible with WinXP.
D:\>linkd Links an NTFS directory to a target valid object name in Windows 2000. LINKD Source [/D] Destination Source - Displays the Windows 2000 name targeted by Source Source Destination - Links source directory to Destination directory or a Windows 2000 device or any valid Windows 2000 name Source /D - Deletes Source, regardless of whether a link exists at source /? - Prints this help message LINKD grafts (links) the target name directly into the name space at Source, so that Source subsequently acts as a name space junction. The Source directory must reside on a disk formatted with NTFS in Windows 2000. The destination (the target of the link) can be any valid directory name or device name or valid object name in Windows 2000. When the target name does not resolve to a directory or a device, open calls fail. All characters in both the Source and Destination names must be in the ASCII character set. Usage of arbitrary Unicode characters is not supported. Type "LINKD /? | more" if you need to see all the help text
First of all, IDE is used for only editing files. Due to the Content Server architecture, there is no way to edit and execute through the IDE. At the end of that page, I will demontrate how to edit and run without action using a local JumpStart Kit (FatWire demo system).
(software architecture image here)
- Using your prefered IDE, instantiate a new dynamic web application.
- Retrieve all Content Server java librairies and tag library definition files (stored under WEB-INF/lib and WEB-INF/futuretense_cs) from your running Content Server application, deployed on the development platform.
- Add them the java libraries to your project environment.
- Under the WEB-INF directory, create a sub directory named “futuretense_cs” then copy all tld files into that target directory.
- Update your web.xml files for including the application resources newly added. Then the editor will be able to check the JSP syntax, suggesting java signature and doing some style checking. Copy them from your original web.xml file of your development server (all the <context-param>, <filter>, <filter-mapping>, <listener>, <servlet>, <servlet-mapping>, and <jsp-config> including all the <taglib> entries).
Content Server explorer tool downloads files into your user temporary directory (for instance D:\Documents and Settings\Administrator\Local Settings\Temp\localhost8180\ElementCatalog). The immediate sub directory has the name of your remote or local server including the listener port number. The next sub folder is the named of the table from which the file is downloaded (in our case, ElementCatalog).
That directory must be mutualised into your Web Application development environment using linkd utility on windows system or ‘ln -s’ under linux.
Using a prompt window, go to your working development directory (for instance D:\Development\cs\web). Then creates a link to your temporary directory with the following command line
>linkd ElementCatalog "D:\Documents and Settings\Administrator\ Local Settings\Temp\localhost8180\ElementCatalog"
When you open a file with Content Server Explorer, the IDE can automatically see the newest file and display it into your project explorer. Then, you can update it, saving it but remember you are currently modifying a temporary file. Content Server Explorer inspects the file and stamped it as updated. Select the “save all” button. As that step, Content Server Explorer uploads the file onto the server and stored into the Content Server storage directory.
At the end, you should be able to experiment the same of the following screen capture.
Setting a local development environment
Why using Content Server explorer when you can straightforward access the local storage directory of Content Server? Your IDE shortcut must target the Content Server storage directory named Storage/ElementCatalog.
However, those files are replicated by Content Server into the applcation server environment. In order to automatically update the application server running environment, the system administrator can configure Content Server in “auto file check” mode. It is only recommended on the development system due to some performances issues on production system as Content Server checks the file timestamp each time a file is accessed…
The property to set is ft.filecheck=yes defined into the “futuretense.ini” file, located into the Content Server installation directory.
As commented at the beginning of this page, IDE is only used for editing and saving JSPs. If the developer wants to create new files, it can’t be done through the netbeans or Eclipse tool. Programs are registered as assets into Content Server (CSElement or Template), the developer must use the Content Server Advanced interface for instantiating them.
There is also two additional limitations. Each time a file is uploaded, Content Server changes the storage filename name for an asset. For instance, alternatively original “test.jsp” file is renamed “test,0.jsp” and reverse when saving again.