while we are on that subject i took a weekend to locate a workable copy of wsadmin.sh
the contents of which are illustrated below MG> start wsadmin.sh script #!/usr/bin/bash --debug # example wsadmin launcher # WAS_HOME should point to the directory for the thin client JAVA_HIGH_ZIPFDS="0" WAS_HOME="/IBM/ThinClient" USER_INSTALL_ROOT="/IBM/ThinClient" # JAVA_HOME should point to where java is installed for the thin client #JAVA_HOME="$WAS_HOME/java" WAS_LOGGING="-Djava.util.logging.manager=com.ibm.ws.bootstrap.WsLogManager -Djava.util.logging.configureByServer=true" if [[ -f ${JAVA_HOME}/bin/java ]]; then JAVA_EXE="${JAVA_HOME}/bin/java" else JAVA_EXE="${JAVA_HOME}/jre/bin/java" fi # For debugging the utility itself # WAS_DEBUG=-Djava.compiler="NONE -Xdebug -Xnoagent - # the usual JMX Admin client is accessed via SOAP (thus the reference on soap.client.props) Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7777" CLIENTSOAP="-Dcom.ibm.SOAP.ConfigURL=file:${USER_INSTALL_ROOT}/properties/soap.client.props" CLIENTSAS="-Dcom.ibm.CORBA.ConfigURL=file:${USER_INSTALL_ROOT}/properties/sas.client.props" CLIENTSSL="-Dcom.ibm.SSL.ConfigURL=file:${USER_INSTALL_ROOT}/properties/ssl.client.props" CLIENTIPC="-Dcom.ibm.IPC.ConfigURL=file:${USER_INSTALL_ROOT}/properties/ipc.client.props" # the following are wsadmin property # you need to change the value to enabled to turn on trace wsadminTraceString=-Dcom.ibm.ws.scripting.traceString=com.ibm.*=all=enabled wsadminTraceFile=-Dcom.ibm.ws.scripting.traceFile=${USER_INSTALL_ROOT}/logs/wsadmin.traceout wsadminValOut=-Dcom.ibm.ws.scripting.validationOutput=${USER_INSTALL_ROOT}/logs/wsadmin.valout # this will be the server host that you will be connecting to #wsadminHost=-Dcom.ibm.ws.scripting.host=myhost.warzawa.ibm.com wsadminHost=-Dcom.ibm.ws.scripting.host=localhost # you need to make sure the port number is the server SOAP port number you want to connect to, in this example the server SOAP port is 8875 wsadminConnType=-Dcom.ibm.ws.scripting.connectionType=SOAP wsadminPort=-Dcom.ibm.ws.scripting.port=8875 # you need to make sure the port number is the server RMI port number you want to connect to, in this example the #server RMI port is 2811 #wsadminConnType=-Dcom.ibm.ws.scripting.connectionType=RMI #wsadminPort=-Dcom.ibm.ws.scripting.port=2811 # you need to make sure the port number is the server JSR160RMI port number you want to connect to, in this example #the server JSR160RMI port is 2811 #wsadminConnType=-Dcom.ibm.ws.scripting.connectionType=JSR160RMI #wsadminPort=-Dcom.ibm.ws.scripting.port=2811 # you need to make sure the port number is the server IPC port number you want to connect to, in this example the #server IPC port is 9630..be aware under Windows.. IPC uses "Windows specific RPC" #wsadminHost=-Dcom.ibm.ws.scripting.ipchost=localhost #wsadminConnType=-Dcom.ibm.ws.scripting.connectionType=IPC #wsadminPort=-Dcom.ibm.ws.scripting.port=9630 # specify what language you want to use with wsadmin wsadminLang=-Dcom.ibm.ws.scripting.defaultLang=jacl #wsadminLang=-Dcom.ibm.ws.scripting.defaultLang=jython #make SURE com.ibm.ws.admin.client_<WAS_VERSION>.jar is on CLASSPATH to invoke WasXShell SHELL=com.ibm.ws.scripting.WasxShell # If wsadmin properties is set, use it if [[ -n "${WSADMIN_PROPERTIES+V}" ]]; then WSADMIN_PROPERTIES_PROP="-Dcom.ibm.ws.scripting.wsadminprops=${WSADMIN_PROPERTIES}" else # Not set, do not use it WSADMIN_PROPERTIES_PROP= fi # If config consistency check is set, use it if [[ -n "${CONFIG_CONSISTENCY_CHECK+V}" ]]; then WORKSPACE_PROPERTIES="-Dconfig_consistency_check=${CONFIG_CONSISTENCY_CHECK}" else WORKSPACE_PROPERTIES= fi # Parse the input arguments isJavaOption=false nonJavaOptionCount=1 # for option in "$@"; # do if [ "$option" = "-javaoption" ] ; then isJavaOption=true fi # else if [ "$isJavaOption" = "true" ] ; then javaOption="$javaOption $option" isJavaOption=false fi # else if [ "$nonJavaOption[$nonJavaOptionCount]"="$option" ] ; then nonJavaOptionCount=$((nonJavaOptionCount+1)) fi # done DELIM=" " C_PATH="/IBM/ThinClient/com.ibm.ws.admin.client_8.5.0.jar:/IBM/Websphere/AppServer/plugins/com.ibm.ws.admin.services.jar:${WAS_HOME}/properties:${WAS_HOME}/com.ibm.ws.admin.client_7.0.0.jar:${WAS_HOME}/com.ibm.ws.security.crypto.jar" #Platform specific args... PLATFORM=`/usr/root/bin/uname.exe` case $PLATFORM in AIX® | Linux® | SunOS | HP-UX) CONSOLE_ENCODING=-Dws.output.encoding=console ;; OS/390®) CONSOLE_ENCODING=-Dfile.encoding=ISO8859-1 EXTRA_X_ARGS="-Xnoargsconversion" ;; esac # Set java options for performance PLATFORM=`/usr/root/bin/uname.exe` case $PLATFORM in AIX) PERF_JVM_OPTIONS="-Xms256m -Xmx256m -Xquickstart" ;; Linux) PERF_JVM_OPTIONS="-Xms256m -Xmx256m -Xj9 -Xquickstart" ;; SunOS) PERF_JVM_OPTIONS="-Xms256m -Xmx256m -XX:PermSize=40m" ;; HP-UX) PERF_JVM_OPTIONS="-Xms256m -Xmx256m -XX:PermSize=40m" ;; OS/390) PERF_JVM_OPTIONS="-Xms256m -Xmx256m" ;; esac if [[ -z "${JAASSOAP}" ]]; then JAASSOAP="-Djaassoap=off" fi #"${JAVA_EXE}" /$JAVA_HOME/bin/java.exe \ ${PERFJAVAOPTION} \ ${EXTRA_X_ARGS} \ -Dws.ext.dirs="$WAS_EXT_DIRS" \ ${EXTRA_D_ARGS} \ ${WAS_LOGGING} \ ${javaoption} \ ${CONSOLE_ENCODING} \ ${WAS_DEBUG} \ "${CLIENTSOAP}" \ "${JAASSOAP}" \ "${CLIENTSAS}" \ "${CLIENTSSL}" \ "${CLIENTIPC}" \ ${WSADMIN_PROPERTIES_PROP} \ ${WORKSPACE_PROPERTIES} \ "-Duser.install.root=${USER_INSTALL_ROOT}" \ "-Dwas.install.root=${WAS_HOME}" \ "-Dcom.ibm.websphere.thinclient=true" \ ${wsadminTraceFile} \ ${wsadminTraceString} \ ${wsadminValOut} \ ${wsadminHost} \ ${wsadminConnType} \ ${wsadminPort} \ ${wsadminLang} \ com.ibm.ws.scripting.WasxShell #add custom classpath here # -cp .:/IBM/DOWNLO~1/wlp/bin:/IBM/ThinClient/com.ibm.ws.admin.client_8.5.0.jar:/IBM/Websphere/AppServer/plugins/com.ibm.ws.admin.services.jar:${WAS_HOME}/properties:${WAS_HOME}/com.ibm.ws.admin.client_7.0.0.jar:${WAS_HOME}/com.ibm.ws.security.crypto.jar # # "${nonJavaOption[@]}" exit $? MG>end wsadmin.sh script HTH, Martin ______________________________________________ Verzicht und Vertraulichkeitanmerkung Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. > To: user@struts.apache.org > Subject: Websphere specific config > From: christoph.nenn...@lex-com.net > Date: Tue, 10 Sep 2013 14:47:01 +0200 > > Dear List, > > > to make struts2 work in Websphere, one has to set Websphere specific > properties, you may want to add that to the wiki: > > https://struts.apache.org/release/2.3.x/docs/websphere.html > > > > The properties are: > com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror = true > com.ibm.ws.webcontainer.invokefilterscompatibility = true > > At least that is necessary when using StrutsPrepareAndExecuteFilter. > > > In Websphre admin console one has to add those properties here: > > Servers > Application servers > {server name} > Web container > Custom > Properties > > > > A wsadmin jython script to set those properties could look like this: > > > > > > def findObjectName(objectId): > index = objectId.find('(') > return objectId[0 : index] > > > node = AdminNodeManagement.listNodes()[0] > server = AdminConfig.list('Server') > > nodeName = findObjectName(node) > serverName = findObjectName(server) > > webContainer = AdminConfig.list('WebContainer', node) > webContainerDetails = AdminConfig.show(webContainer) > > if > webContainerDetails.find("com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror") > > == -1: > print "creating prop: > com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror" > AdminServerManagement.configureCustomProperty(nodeName, > serverName, "WebContainer", > "com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror", "true") > if > webContainerDetails.find("com.ibm.ws.webcontainer.invokefilterscompatibility") > > == -1: > print "creating prop: > com.ibm.ws.webcontainer.invokefilterscompatibility" > AdminServerManagement.configureCustomProperty(nodeName, > serverName, "WebContainer", > "com.ibm.ws.webcontainer.invokefilterscompatibility", "true") > > > > > Regards, > Christoph > > This Email was scanned by Sophos Anti Virus