If some one ever asks me the most primary reason for the success of Firefox and Thunderbird, I guess, I would probably vote for 'Add-ons
' . Some of the extensions that I use with Firefox / Thunderbird are almost life saving for my day to day work that switching sounds almost inconcievable. To me, the ability to have your customers extend the product to better suite their business is such a powerful thing !.
Almost, most popular products today support such an ability and Sun Java System Web Server
has the ability to extend as well. Hope, this is not news to most of the readers considering that we have had this support for quite a long time .
Well, the way extensions work with our Web Server is through something called as NSAPI plugins. For the curious one's, wanting to know more about how our extensions / plugins work with Web Server, check out Developer Programmer Guide.
where in one will find necessary API's to learn , use so as to develop custom NSAPI plugins.
As far as I am aware of, there are quite a number of very popular NSAPI plugins like Reverse Proxy Plugin (bundled within Web Server 7 Technology Preview
) , Sun Java System ASP Server
, NSAPI plugin for PHP
, Weblogic Plugin
currently running on top of Sun Java System Web Server. Also, may I recommend you to check out this article on Sun Java System Web Server use cases
describing how well NSAPI plugins can be utilized to solve your business needs.
Considering that, it has been a long day for me and my wife, who keeps tab on me these days as to what time I go to bed, I am not going to go in detail as to how to write a NSAPI plugin / extension or when would you want one. I guess, that can wait for some other day. For now, let us concentrate on how to install these NSAPI plugins (most likely 3rd party) on top of Sun Java System Web Server 7
Assuming that you have some basic idea on what NSAPI plugin is, let me just concentrate on how to install your favorite NSAPI plugins on top of Sun Java System Web Server 7.
First things first - any 3rd party NSAPI plugins that worked with our previous versions of our Web Server also known as Sun ONE Web Server, Netscape Enterprise Web Server should continue to work with Sun Java System Web Server 7 Technology Preview
as well. I am sure, that must be a relief but the catch is your plugin provider might not yet officially support this new release (or not yet officially released !) from Sun. Until then, I am afraid, you might be on your own !.
Also, Web Server 7 will not support any 3rd party NSAPI plugin migration from previous versions. Also, we do not have any GUI or Command Line (CLI) support to configure these 3rd party plugins. So, if you are a web server admin or 3rd party NSAPI plugin developer, wondering how to hack your current NSAPI plugin on top of Sun Java System Web Server 7, here are few thing to keep in mind
- Sun Java System Web Server 7 has introduced the notion of 'configurations' and internally stores these configuration within internal repositories so as to allow deploying either to single or cluster mode environment.
- Sun Java System Web Server 7 has rich CLI and introduces commands like 'get-config-file' , 'set-config-file' or 'pull-config' to make any manual changes made to the server's configurations can be made aware to administration server configuration repository.
- Unless you make Web Server 7 Administration server make aware of any manual configuration changes made to your configuration / instance, you will not be able to deploy any new set of configuration changes through Administration Server.
Considering the above issues, this is what I would do to install a 3rd party NSAPI plugin like PHP
on top of Web Server 7
- Start Web Server 7 Administration Server
- modify 'magnus.conf' , 'mime.types', 'obj.conf' as mentioned in your plugin documenation.
- use Web Server 7 Administration Server CLI as follows
bin/wadm pull-config --user=admin --port=8989 --config=CONFIG NODE
where CONFIG is the configuration that you are currently working on.
and NODE is the host name of the machine in which you want this change to apply to.
In most cases, NODE and CONFIG will the fully qualified hostname (hostname.domainname) of your current system
Well, the easy way to find out the configurations is to do something like
bin/wadm list-config --user=admin --port=8989 --config=CONFIG
For folks interested in venturing into advanced scenarios, read below :
In some situations (if you have lot of web applications or search collections configured within your server instance, then you might notice that running the above mentioned 'pull-config' might take little longer. In that case, there is this command that one can try it out (assuming you haven't started the NSAPI plugin configuration yet)
- Start Web Server 7 Administration Server
- Run the following CLI command
bin/wadm get-config-file --user=admin --port=8989 --config=CONFIG magnus.conf > /tmp/magnus.conf
bin/wadm get-config-file --user=admin --port=8989 --config=CONFIG mime.types > /tmp/mime.types
bin/wadm get-config-file --user=admin --port=8989 --config=CONFIG obj.conf > /tmp/obj.conf
- Now, manually make changes to /tmp/magnus.conf, /tmp/mime.types, /tmp/obj.conf changes as mentioned within your plugin provider documentation to configure this 3rd party plugin
- Once all done, run the following command
bin/wadm set-config-file --user=admin --port=8989 --config=CONFIG --upload-file=/tmp/magnus.conf magnus.conf
bin/wadm set-config-file --user=admin --port=8989 --config=CONFIG --upload-file=/tmp/mime.types obj.conf
bin/wadm set-config-file --user=admin --port=8989 --config=CONFIG --upload-file=/tmp/obj.conf mime.types
If in case, you have read through the whole section and found it useful, please feel free to send me your rants, comments etc.