$Author: bastafidli $
$Date: 2006/08/27 07:52:10 $
$Revision: 1.9 $
$RCSfile: buildingwebapplication.html,v $
OpenSubsystems utilizes browser based user interface as a standard way to access functionality of the subsystems. This interface is referred to as a webui. It consists of web pages, that are displayed by the browser. This interface is constructed as a combination of JSP pages that provide ability to dynamically generate HTML, JavaScriptto provide logic on the client and CSS to manage layout of the page.
OpenSubsystems build process automatically detects if a specific subsystems contains a webui by checking if a web.xml configuration file is present in the directory
C:\Development\OpenSubsystems\config\webui\[subsystem_name]
If it finds the web.xml file, it will try to construct the webui during the compile stage. If build.properties file in
C:\Development\OpenSubsystems\build
directory has uncommented property precompile_webui, it will also precompile all JSP pages. With precompiled JSP pages the application can be deployed using Java Runtime Environment, otherwise it requires full Java Development Kit. JDK contains Java compiler that allows the JSP pages to be compiled on runtime when they are accessed.
The webui consisting of original not precompiled pages is created in the directory
C:\Development\OpenSubsystems\generated\[subsystem_name]\build\webui
The precompiled webui is created in the directory
C:\Development\OpenSubsystems\generated\[subsystem_name]\build\webui-compiled
Neither one of these directories contains external libraries and java code for the specific subsystem, which would by default go to
WEB-INF\classes
and
WEB-INF\lib
Instead these files are during the build process created in directories
C:\Development\OpenSubsystems\generated\[subsystem_name]\build\code
C:\Development\OpenSubsystems\generated\[subsystem_name]\build\ejb-compiled
C:\Development\OpenSubsystems\generated\[subsystem_name]\build\tests
C:\Development\OpenSubsystems\generated\[subsystem_name]\external
The simple reason why the build process doesn't put the compiled java code into the web application directory is that it provides developers with more flexibility. Some developers like to deploy their code libraries into shared directory and therefore they have to exist separately from the webui. This setup allows it since they can copy the exploded webui directory into the web container deployment directory and the libraries and code into the shared directory. The developers that like to deploy the full web application in exploded form can simple place the libraries and code into appropriate location when creating distributable package. This also speeds up the compilation phase of the build process.
If you are not interested in the precompiled webui, you may disable the precompilation process. The build process will be much faster even though you will still encounter performance penalty the first time you access each JSP page. The disadvantage is that you will not find any potential syntactical errors until the runtime, which may make the troubleshooting more cumbersome.
To disable the precompilation of webui, open the build.properties file located in the build subdirectory of directory sources. Locate line that starts with text precompile_webui and comment it out by placing # (hash / pound) sign in front of it.
Next:
Testing Web Application
Previous:
Build Process