Dev Heaven
Pojo Application Server
If one uses Harbor out of the box, i.e. drop it into webapps
and start the server, its a nice way to get going quickly, and its
easy enough for your customers to understand, however as a
developer, you will want to integrate Harbor with your dev
environment.
It allows for easy customization and a great deal of control.
All good dev tools will do this however this procedure focuses on
the Netbeans IDE.
- Rename the Harbor.War file to Harbor.ZIP
and unpack all its contents to some place on your machine.
- In Netbeans make a New -> Web
Project -> Web Application.
On the next page, call the project
"harbor".
In the Server Field: Select the TOMCAT
server.
On the next page De-Select any
frameworks... click Finish.
Study the default template it gives you.
- Find this new project in your file manager, you will see a
subfolder called WEB.
Copy everything you extracted from Harbor.War to this folder, EXCEPT
the WEB-INF folder.
Look in the WEB-INF folder and only
copy WEB.XML across.
- Go back to Netbeans and study how you can now see and
explore all these files easily.
Right click on the Libraries, and
select Add Jar, navigate to your
unpacked WEB-INF/Lib folder and
select all the libraries.
- Right click on the Harbor project
name and select Properties -> Run.
In the Relative URL field, type
/service
- Right click on the Project name, and click on Clean
and Build.
- Right click on the Project name, and click
Run.
The browser will launch saying Harbor is
Operational. You can
now use Harbor as normal.
... and you can do all sorts of other wonderful things, like:
- If you click on the Runtime Tab ->
Servers, you will see you can stop
and start the server.
- If you edit the WEB.XML file
and change the Log level to 2,
you will see when you Run your project the logs
are visible in the output window.
- You can delete Ships and Harbor Repository files you don't
want.
- You can add web pages, and servlets.
- You can quickly edit the Harbor META-INF security files and
check that the XML is valid.
- If you use the Tools->Server
manager you can add other Tomcats...
and then if you right click Harbor ->
Properties -> Run, you can select the Tomcat you
want, and if you click deploy, 'your' Harbor will be put
on that Tomcat.
- If you Clean
and Build and look at the File
Manager harbor/dist file... your
brand new harbor.war is waiting there to be used.
Its a wonderful development environment.