cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi install4iis.js

2004-06-07 Thread keith
keith   2004/06/07 15:15:32

  Modified:jk/native2/server/isapi install4iis.js
  Log:
  Actually filter can be on service or server, so move it back to server.

  However, we may have to create our own Filters container as IIS

  only creates one automatically for the service.
  
  Revision  ChangesPath
  1.5   +3 -4  jakarta-tomcat-connectors/jk/native2/server/isapi/install4iis.js
  
  Index: install4iis.js
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/isapi/install4iis.js,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- install4iis.js7 Jun 2004 21:08:26 -   1.4
  +++ install4iis.js7 Jun 2004 22:15:32 -   1.5
  @@ -255,9 +255,8 @@
   try {

   filters = findADSIObject(webServer, _IIS_FILTERS, Filters);

   if (filters == null) {

  -TRACE(Unable to find the  + _IIS_FILTERS +  for  +

  -  webServer.ServerComment);

  -return null;

  +//may have to create the website-level filters container

  +filters = webserver.create(_IIS_FILTERS, Filters);

   }

   newFilter = findADSIObject(filters, _IIS_FILTER, appParams.FilterName);

   if (newFilter == null) {

  @@ -488,7 +487,7 @@
   ERROR(args, Unable to create virual directory / + params.WebName);

   }

   

  -if (!createISAPIFilter(IIsWebService, params)) {

  +if (!createISAPIFilter(IIsWebServer, params)) {

   /* TODO: roll-back virtual dir */

   ERROR(args, Unable to create the ' + params.FilterName + ' filter.);


   }

  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi install4iis.js

2004-06-07 Thread keith
keith   2004/06/07 14:08:26

  Modified:jk/native2/server/isapi install4iis.js
  Log:
  Filters is on the service object
  
  Revision  ChangesPath
  1.4   +2 -2  jakarta-tomcat-connectors/jk/native2/server/isapi/install4iis.js
  
  Index: install4iis.js
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/isapi/install4iis.js,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- install4iis.js26 Apr 2004 17:41:46 -  1.3
  +++ install4iis.js7 Jun 2004 21:08:26 -   1.4
  @@ -487,8 +487,8 @@
   if (!createVirtualExecDir(IIsROOT, params)) {

   ERROR(args, Unable to create virual directory / + params.WebName);

   }

  -

  -if (!createISAPIFilter(IIsWebServer, params)) {

  +

  +if (!createISAPIFilter(IIsWebService, params)) {

   /* TODO: roll-back virtual dir */

   ERROR(args, Unable to create the ' + params.FilterName + ' filter.);


   }

  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi install4iis.js

2004-06-07 Thread keith
keith   2004/06/07 16:58:17

  Modified:jk/native2/server/isapi install4iis.js
  Log:
  s-S
  
  Revision  ChangesPath
  1.6   +1 -1  jakarta-tomcat-connectors/jk/native2/server/isapi/install4iis.js
  
  Index: install4iis.js
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/isapi/install4iis.js,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- install4iis.js7 Jun 2004 22:15:32 -   1.5
  +++ install4iis.js7 Jun 2004 23:58:17 -   1.6
  @@ -256,7 +256,7 @@
   filters = findADSIObject(webServer, _IIS_FILTERS, Filters);

   if (filters == null) {

   //may have to create the website-level filters container

  -filters = webserver.create(_IIS_FILTERS, Filters);

  +filters = webServer.create(_IIS_FILTERS, Filters);

   }

   newFilter = findADSIObject(filters, _IIS_FILTER, appParams.FilterName);

   if (newFilter == null) {

  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi install4iis.js

2004-04-26 Thread mturk
mturk   2004/04/26 10:41:46

  Modified:jk/native2/server/isapi install4iis.js
  Log:
  Cannot belive I've missed the breaks inside the switch.
  Now the command options are working.
  
  Revision  ChangesPath
  1.3   +10 -5 jakarta-tomcat-connectors/jk/native2/server/isapi/install4iis.js
  
  Index: install4iis.js
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/isapi/install4iis.js,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- install4iis.js13 Mar 2004 10:38:32 -  1.2
  +++ install4iis.js26 Apr 2004 17:41:46 -  1.3
  @@ -327,15 +327,14 @@
   

   this.program = WScript.FullName.toLowerCase();

   this.program = this.program.substr(this.program.lastIndexOf(\\) + 1);

  -//if (this.program.indexOf(wscript.exe) == -1)

  -//_DEBUG = false;

  +if (this.program.indexOf(wscript.exe) == -1)

  +_DEBUG = false;

   this.script = WScript.ScriptName;

   }

   

   function getopt(args, ostr)

   {

   if (args.optind = args.argc) {

  -

   return null;

   }

   try {

  @@ -422,19 +421,25 @@
   while ((opt = getopt(args, s:f:d:v:l:h))) {

   switch (opt) {

   case s:

  -params.ServerName = args.optarg;

  +params.ServerName = args.optarg;   

  +break; 

   case f:

   params.FilterName = args.optarg;

  +break; 

   case d:

   params.FilterDesc = args.optarg;

  +break; 

   case l:

   params.FilterLib  = args.optarg;

  +break; 

   case v:

   params.WebName= args.optarg;

  +break; 

   case h:

  +default:

   Usage(args);

   return 0;

  -

  +break; 

   }

   }

   TRACE(argc  + args.argc +  optind  + args.optind);

  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi install4iis.js

2004-03-13 Thread mturk
mturk   2004/03/13 02:38:32

  Modified:jk/native2/server/isapi install4iis.js
  Log:
  Fix the install script argument parsing
  
  Revision  ChangesPath
  1.2   +5 -4  jakarta-tomcat-connectors/jk/native2/server/isapi/install4iis.js
  
  Index: install4iis.js
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/isapi/install4iis.js,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- install4iis.js29 Feb 2004 13:10:45 -  1.1
  +++ install4iis.js13 Mar 2004 10:38:32 -  1.2
  @@ -437,8 +437,8 @@
   

   }

   }

  -

  -if (args.optind = args.argc) {

  +TRACE(argc  + args.argc +  optind  + args.optind);

  +if (args.optind = args.argc) {

   /* Case when isapi_redirector2.dll is inside TOMCAT_HOME\bin */

   params.WebPath = WScript.ScriptFullName.substr(0,

WScript.ScriptFullName.lastIndexOf(\\));

  @@ -446,14 +446,15 @@
   }

   else {

   params.WebPath = args.argv(args.optind);

  +++args.optind;

   }

   if (!checkFilterExists(params)) {

   ERROR(args, The specified filter library could not be found...\n +

 File  + params.WebPath + \\ + params.FilterLib +  does not 
exist.);

   

   }

  -if (args.argc  (args.optind  (args.argc - 1)))

  -tchome = args.argv(args.argc + 1);

  +if (args.optind  args.argc)

  +tchome = args.argv(args.optind);

   else if (!tchome)

   tchome = params.WebPath;

   workers2 = tchome + _DEFAULT_WORKERS2 ;

  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi install4iis.js

2004-02-29 Thread mturk
mturk   2004/02/29 05:10:45

  Added:   jk/native2/server/isapi install4iis.js
  Log:
  Installation script for jk2.
  Helps setting isapi_redirector2.dll as IIS filter and
  creates desired virtual directory wit execute permissions.
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-connectors/jk/native2/server/isapi/install4iis.js
  
  Index: install4iis.js
  ===
  /*

   *  Copyright 1999-2004 The Apache Software Foundation

   *

   *  Licensed under the Apache License, Version 2.0 (the License);

   *  you may not use this file except in compliance with the License.

   *  You may obtain a copy of the License at

   *

   *  http://www.apache.org/licenses/LICENSE-2.0

   *

   *  Unless required by applicable law or agreed to in writing, software

   *  distributed under the License is distributed on an AS IS BASIS,

   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

   *  See the License for the specific language governing permissions and

   *  limitations under the License.

   */

  

  /**

   * Description: Install script for Tomcat JK2 ISAPI redirector

   * Author:  Mladen Turk [EMAIL PROTECTED]   

   * Version: $Revision: 1.0 $   

   */

  

  

  /**

   * Global variables

   */

  //var IIsWebService;

  //var IIsWebServer;

  //var IIsROOT;

  //var AppParams;

  

  /**

   * Defaults

   */

  _DEFAULT_SERVER_NAME = Default Web Site;

  _DEFAULT_DESCRIPTION = JK2 ISAPI Redirector;

  _DEFAULT_FILTER_NAME = jakarta;

  _DEFAULT_HEADERS = X-Powered-By: Apache Software Foundation

  _DEFAULT_OPTIONS = rbdi;

  _DEFAULT_REGISTRY= HKLM\\SOFTWARE\\Apache Software Foundation\\Jakarta Isapi 
Redirector\\2.0;

  _DEFAULT_FILTERLIB   = isapi_redirector2.dll;

  _DEFAULT_WORKERS2= \\conf\\workers2.properties;

  

  /**

   * Set this to false to disable TRACE messages;

   */

  _DEBUG = true;

  _TRACE_COUNTER = 1;

  

  /**

   * Constants variables

   */

  _APP_INPROC  = 0;

  _APP_OUTPROC = 1;

  _APP_POOLED  = 2

  _IIS_OBJECT  = IIS://LocalHost/W3SVC;

  _IIS_SERVER  = IIsWebServer;

  _IIS_WEBDIR  = IIsWebVirtualDir;

  _IIS_FILTERS = IIsFilters;

  _IIS_FILTER  = IIsFilter;

  

  function ERROR(args, sMsg)

  {

  WScript.Echo(Error processing  + args.script + \n + sMsg);

  WScript.Quit(-1);

  }

  

  function RPAD(str, n)

  {

  var p;

  p = str;

  for (i = str.length; i  n; i++)

  p +=  ;

  return p;

  }

  

  function HEX(num)

  {

  var digits = 0123456789ABCDEF;

  var n = num;

  var h = ;

  for (i = 0; i  8; i++) {

  h = digits.charAt(n  15) + h;

  n = n  4;

  }

  return h;

  }

  

  function TRACE(sMsg)

  {

  if (_DEBUG) {

  var line = _TRACE_COUNTER + ;

  WScript.Echo(line.substring(0, 4) + sMsg);   

  ++_TRACE_COUNTER;

  }

  }

  

  function EXCEPTION(exception, func)

  {

  WScript.Echo(exception +  In function ' + 

   func + '\nError number:  +

   HEX(exception.number) +  -  + exception.description + );

  WScript.Quit(-1); 

  }

  

  

  function Parameters()

  {

  this.ServerName = _DEFAULT_SERVER_NAME;

  this.WebDescription = _DEFAULT_DESCRIPTION;

  this.FilterName = _DEFAULT_FILTER_NAME;

  this.FilterDesc = _DEFAULT_DESCRIPTION;

  this.WebName= _DEFAULT_FILTER_NAME;

  this.Headers= _DEFAULT_HEADERS;

  this.WebOptions = _DEFAULT_OPTIONS;

  this.RegistryKey= _DEFAULT_REGISTRY;

  this.AppProtection  = _APP_POOLED;

  this.WebPath= C:;

  this.FilterLib  = _DEFAULT_FILTERLIB;

  }

  

  function findWebServiceObject(clsName, objName)

  {

  var webService;

  var webObjects;

  try {

  webService = GetObject(_IIS_OBJECT);

  if (!clsName || !objName)

  return webService;

  webObjects = new Enumerator(webService);

  while (!webObjects.atEnd()) {

  TRACE(RPAD(webObjects.item().Class, 18) + 

RPAD(webObjects.item().Name, 15) + webObjects.item().AdsPath);

  if (webObjects.item().Class == clsName 

  webObjects.item().Name  == objName)

  return webObjects.item();

  

  webObjects.moveNext();

  }

  }

  catch(exception) {

  EXCEPTION(exception, findWebServiceObject);

  } 

  

  return null;

  }

  

  function findWebServer(serverComment)

  {

  var webService;

  var webObjects;

  try {

  webService = GetObject(_IIS_OBJECT);

  

  webObjects = new Enumerator(webService);

  while (!webObjects.atEnd()) {