Here's the patch file for getting JWS 2.0 beta 2 running on Linux.

Here's how to do it:

1) Put the patch file in the <JWS2.0> directory.

2) patch -p1 < jws20b2-linux.patch

3) cd <JWS2.0>/native
4) make -f Makfile.sol install (yes, the makefile still has a .sol but its now for 
linux)

5) cd <JWS2.0>/bin
6) ./httpd& (you may have to edit this file to point to your jdk1.1 directory)
7) ./jsadmin admin/admin -stop (ditto)

I think that should do it.

cc

diff -rc JavaWebServer2.0/bin/httpd JavaWebServer2.0-linux/bin/httpd
*** JavaWebServer2.0/bin/httpd  Wed May 19 06:30:24 1999
--- JavaWebServer2.0-linux/bin/httpd    Thu Jun 10 01:11:06 1999
***************
*** 34,38 ****

  cd $HTTPD_HOME

! bin/jserv -jre "$@"

--- 34,38 ----

  cd $HTTPD_HOME

! bin/jserv -os linux -nojre -javahome /usr/local/jdk1.1 "$@"

Only in JavaWebServer2.0-linux/bin: httpd~
diff -rc JavaWebServer2.0/bin/jsadmin JavaWebServer2.0-linux/bin/jsadmin
*** JavaWebServer2.0/bin/jsadmin        Wed May 19 06:30:21 1999
--- JavaWebServer2.0-linux/bin/jsadmin  Thu Jun 10 01:12:26 1999
***************
*** 22,25 ****
  # Shell script to execute administration commands on JavaServer servers.
  #
  BINDIR=`dirname $0`
! $BINDIR/jserv -main_class com.sun.server.http.admin.CommandLine -no_login $*
--- 22,25 ----
  # Shell script to execute administration commands on JavaServer servers.
  #
  BINDIR=`dirname $0`
! $BINDIR/jserv -os linux -nojre -javahome /usr/local/jdk1.1 -main_class 
com.sun.server.http.admin.CommandLine -no_login $*
Only in JavaWebServer2.0-linux/bin: jsadmin~
diff -rc JavaWebServer2.0/bin/jserv JavaWebServer2.0-linux/bin/jserv
*** JavaWebServer2.0/bin/jserv  Wed May 19 06:30:21 1999
--- JavaWebServer2.0-linux/bin/jserv    Thu Jun 10 01:13:46 1999
***************
*** 407,413 ****
  # Set up home directory for the server.
  #
  if [ -z "$JSERV_HOME" ]; then
!     d=`/bin/dirname $0`
      if [ -n "$d" ]; then
        JSERV_HOME=`cd $d/.. >/dev/null 2>&1 && pwd`
      fi
--- 407,413 ----
  # Set up home directory for the server.
  #
  if [ -z "$JSERV_HOME" ]; then
!     d=`/usr/bin/dirname $0`
      if [ -n "$d" ]; then
        JSERV_HOME=`cd $d/.. >/dev/null 2>&1 && pwd`
      fi
Only in JavaWebServer2.0-linux/bin: jserv~
Only in JavaWebServer2.0-linux/lib: linux
Only in JavaWebServer2.0-linux/logs: adminserver
Only in JavaWebServer2.0-linux/logs: javawebserver
diff -rc JavaWebServer2.0/native/Makefile.sol 
JavaWebServer2.0-linux/native/Makefile.sol
*** JavaWebServer2.0/native/Makefile.sol        Wed May 19 05:24:50 1999
--- JavaWebServer2.0-linux/native/Makefile.sol  Thu Jun 10 01:09:41 1999
***************
*** 26,48 ****
  LIBNAME =     server

  # Location of Java Developer's Kit (and runtime)
! JAVA_HOME =   /opt/java

  # Java runtime flags
  JAVAH =               $(JAVA_HOME)/bin/javah -jni
! CLASSPATH =   
$(TOP)/classes:$(TOP)/lib/classes.zip:$(JAVA_HOME)/classes:$(JAVA_HOME)/lib/classes.zip

  # OS and machine type
! OS =          solaris
! ARCH:sh =     uname -p
! OBJ =                 $(OS)/$(ARCH)

  # Preprocessor, compiler, linker, and related flags
! CC =          cc
! CFLAGS =      -fast -Kpic
  CPPFLAGS =    -I$(OS) -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(OS)
! LDFLAGS =     -G -h $(LIBNAME)
! INSTALL =     /usr/sbin/install

  LIBDIR =      $(TOP)/lib/$(OBJ)

--- 26,49 ----
  LIBNAME =     server

  # Location of Java Developer's Kit (and runtime)
! JAVA_HOME =   /usr/local/jdk1.2

  # Java runtime flags
  JAVAH =               $(JAVA_HOME)/bin/javah -jni
! CLASSPATH =   
$(TOP)/lib/jst.jar:$(TOP)/classes:$(TOP)/lib/classes.zip:$(JAVA_HOME)/jre/lib/rt.jar

  # OS and machine type
! OS :=         linux
! ARCH :=               $(strip $(shell uname -p))
! DOTHIS :=     $(shell mkdir -p $(OS)/$(ARCH))
! OBJ :=                $(OS)/$(ARCH)

  # Preprocessor, compiler, linker, and related flags
! CC =          gcc
! CFLAGS =      -O3 -fPIC
  CPPFLAGS =    -I$(OS) -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(OS)
! LDFLAGS =     -Xlinker -shared -Xlinker -soname -Xlinker $(LIBNAME)
! INSTALL =     /usr/bin/install

  LIBDIR =      $(TOP)/lib/$(OBJ)

***************
*** 78,84 ****

  install: $(LIBRARY)
        $(INSTALL) -d $(LIBDIR)
!       $(INSTALL) -f $(LIBDIR) $(LIBRARY)

  clean:
        rm -rf $(OS)
--- 79,85 ----

  install: $(LIBRARY)
        $(INSTALL) -d $(LIBDIR)
!       $(INSTALL) $(LIBRARY) $(LIBDIR)

  clean:
        rm -rf $(OS)
Only in JavaWebServer2.0-linux/native: Makefile.sol~
diff -rc JavaWebServer2.0/native/UNIXUser.c JavaWebServer2.0-linux/native/UNIXUser.c
*** JavaWebServer2.0/native/UNIXUser.c  Wed May 19 05:24:50 1999
--- JavaWebServer2.0-linux/native/UNIXUser.c    Thu Jun 10 01:06:53 1999
***************
*** 37,45 ****
  {
      char              *logname;
      char                *password;
!     struct passwd     value;
      char              buf [BUFSIZ];
!     struct spwd         svalue;
      char                *xmsg;
      char                sbuff [BUFSIZ];
      jclass            cl;
--- 37,45 ----
  {
      char              *logname;
      char                *password;
!     struct passwd     value, *pPasswd;
      char              buf [BUFSIZ];
!     struct spwd         svalue, *pSpwd;
      char                *xmsg;
      char                sbuff [BUFSIZ];
      jclass            cl;
***************
*** 70,76 ****
      /*
        jio_fprintf(stderr, "Native:: Logname is %s\n", logname);
      */
!     if (getpwnam_r (logname, &value, buf, sizeof buf) == 0) {
        /*
         * setting homedir or passwd to null indicates an error,
         * and the caller throws an exception
--- 70,76 ----
      /*
        jio_fprintf(stderr, "Native:: Logname is %s\n", logname);
      */
!     if (getpwnam_r (logname, &value, buf, sizeof buf, &pPasswd) == 0) {
        /*
         * setting homedir or passwd to null indicates an error,
         * and the caller throws an exception
***************
*** 88,94 ****
        password = value.pw_passwd;
        if (strcmp (password, xmsg) == 0) {
          /** Getting Shadow Password **/
!         if (getspnam_r(logname, &svalue, sbuff, sizeof sbuff))
            password = svalue.sp_pwdp;
        }

--- 88,94 ----
        password = value.pw_passwd;
        if (strcmp (password, xmsg) == 0) {
          /** Getting Shadow Password **/
!         if (getspnam_r(logname, &svalue, sbuff, sizeof sbuff, &pSpwd))
            password = svalue.sp_pwdp;
        }

Only in JavaWebServer2.0-linux/native: UNIXUser.c~
diff -rc JavaWebServer2.0/native/UNIXUserEnumeration.c 
JavaWebServer2.0-linux/native/UNIXUserEnumeration.c
*** JavaWebServer2.0/native/UNIXUserEnumeration.c       Wed May 19 05:24:50 1999
--- JavaWebServer2.0-linux/native/UNIXUserEnumeration.c Thu Jun 10 01:08:35 1999
***************
*** 58,66 ****
        (JNIEnv *env, jobject obj)
  {
      char              buf [BUFSIZ];
!     struct passwd     value;

!     if (getpwent_r (&value, buf, sizeof buf) == 0)
        return NULL;

      return (*env)->NewStringUTF(env, value.pw_name);
--- 58,66 ----
        (JNIEnv *env, jobject obj)
  {
      char              buf [BUFSIZ];
!     struct passwd     value, *pPasswd;

!     if (getpwent_r (&value, buf, sizeof buf, &pPasswd) == 0)
        return NULL;

      return (*env)->NewStringUTF(env, value.pw_name);
Only in JavaWebServer2.0-linux/native: UNIXUserEnumeration.c~
Only in JavaWebServer2.0-linux/native: linux
Only in JavaWebServer2.0-linux/system: sessionSwap

Reply via email to