|
Use the following steps to set up and run the HelloWorld example in your own environment.
Make a Project Folder
First, make sure you've read Appendix A. Then, on your C: drive, create a directory named beehive-projects. In the beehive-projects directory, create a directory named helloworld. Before proceeding, confirm that the following directory structure exists:
C:\
beehive-projects
helloworld
Copy Runtime JARs to the Project Folder
Copy the folder BEEHIVE_HOME/samples/netui-blank/resources into your project folder, C:\beehive_projects \helloworld. BEEHIVE_HOME is the top-level folder of your Beehive installation, as explained in Appendix A.
Copy the folder BEEHIVE_HOME/samples/netui-blank/WEB-INF into your project folder, C:\beehive-projects \helloworld.
Now, assemble the runtime resources for your Page Flow application. The runtime JARs include the Page Flow runtime, the NetUI tag library, and so on. You can load these resources into your project's WEB-INF/lib folder using the following Ant command at the command prompt:
ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml
-Dwebapp.dir=C:\beehive-projects
\helloworld deploy.beehive.webapp.runtime
This command will copy all JAR files to the WEB-INF/lib directory. Next, create the controller file, the central file for any Page Flow. Then, in the directory C:/beehive-projects/helloworld, create a file named HelloWorldController.jpf. In a text editor (or your IDE of choice), open the file HelloWorldController.jpf. In the directory C:/beehive-projects/helloworld, create a file named helloworld.jsp.
Compile and Deploy the Page Flow
You're now ready to compile the Page Flow and deploy it to Tomcat. Start the Tomcat server. Using the command shell opened in the previous step, at the command prompt, enter the following:
ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml
-Dwebapp.dir=C:\beehive-projects \helloworld
-Dcontext.path=helloworld build.webapp deploy
To undeploy the application, use the following Ant command:
ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml
-Dwebapp.dir=C:\beehive-projects \helloworld
-Dcontext.path=helloworld undeploy
|