- Portal Scripting Interface is an extension to the WebSphere Application Server wsadmin tool.
- You can use the Portal Scripting Interface to configure and administer your portal by running scripts from a command line.
- You can also write the commands into a file and run that file.
- Portal Scripting supports two languages JACL and Jython.
Difference between JACL and Jython :
- Jacl is a Java-based variant of the Tcl language(Tool Command Language).
- Jython is a Java-based variant of the Python language.
- The most important thing to consider in comparing the two is that JACL is officially deprecated under WebSphere 6.x and will be phased out completely in favor of Jython in WebSphere 7.x.
- If you're writing scripts now, it's probably best to just learn Jython and write in Jython, as the Jacl2Jython tool still requires manual verification and editing of the converted script code. The conversion tool will probably convert most simple scripts, but anything even moderately complex has a chance of not translating very well, which may result in scripts doing unexpected things or not running at all.
-> Portal Scripting is installed at /opt/WebSphere/AppServer/bin
-> Portal Scripting Interface startup command file: wpscript.sh
-> Portal Scripting supports two lang;
1. Jython -- -lang jython
2. JACL -- -lang jacl
-> Command for Jython : ./wpscript.sh -lang jython
Command for JACL : ./wpscript.sh -lang jacl
We got three ways to start wsadmin tool;
First:
1. goto location, IBM/WebSphere/PortalServer/bin
2. all script(jython/jacl) files should be located at, IBM/WebSphere/PortalServer/bin
3. run command, wpscript.bat -lang jython
4. to run a script(jython) file, wpscript.bat -lang jython -javaoption "-Djython.package.path=D:\IBM\WebSphere\AppServer\plugins\com.ibm.ws.wlm.jar" -username admin -password admin -f XXX.py
Second(Prefered):
1. goto location, IBM/WebSphere/AppServer/bin
2. all script(jython/jacl) files should be located at, IBM/WebSphere/AppServer/bin
3. run command, wsadmin.bat -lang jython
4. to run a script(jython) file, wsadmin.bat -lang jython -javaoption "-Djython.package.path=D:\IBM\WebSphere\AppServer\plugins\com.ibm.ws.wlm.jar" -username admin -password admin -f XXX.py
Third:
1. goto location, IBM/WebSphere/wp_profile/bin
2. all script(jython/jacl) files should be located at, IBM/WebSphere/wp_profile/bin
3. run command, wsadmin.bat -lang jython
4. to run a script(jython) file, wsadmin.bat -lang jython -javaoption "-Djython.package.path=D:\IBM\WebSphere\AppServer\plugins\com.ibm.ws.wlm.jar" -username admin -password admin -f XXX.py
We are working with jython example
-> Not all of the WebSphere® Application Server component classes are packaged in the same .jar file.
If you are going to be using the wsadmin tool to run Jython scripts,
include the jython.package.path system property on your wsadmin command to ensure that all of the required JAR files are set to the jython package path during wsadmin startup.
-> Run wsadmin with an option other than -f or -c or without an option.
The wsadmin tool starts and displays an interactive shell with a wsadmin prompt.
From the wsadmin prompt, enter any Jacl or Jython command.
You can also invoke commands using the AdminControl, AdminApp, AdminConfig, AdminTask, or Help wsadmin objects.
To leave an interactive scripting session, use the quit or exit commands.
-> to run a jython file we have to type this below command and this file should be kept at following location "/bin"
wsadmin.bat -lang jython -f jythonfile.py
Ref : http://setgetweb.com/tech/portal80/adpsi_start.html http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Fae%2Ftxml_dataaccess.html
http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Fae%2Ftxml_launchscript.html
http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Fae%2Ftxml_configjdbc.html
http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Fae%2Ftxml_template.html
http://publib.boulder.ibm.com/infocenter/wsdoc400/v6r0/index.jsp?topic=/com.ibm.websphere.iseries.doc/info/ae/ae/cdat_jdbcprov.html
- You can use the Portal Scripting Interface to configure and administer your portal by running scripts from a command line.
- You can also write the commands into a file and run that file.
- Portal Scripting supports two languages JACL and Jython.
Difference between JACL and Jython :
- Jacl is a Java-based variant of the Tcl language(Tool Command Language).
- Jython is a Java-based variant of the Python language.
- The most important thing to consider in comparing the two is that JACL is officially deprecated under WebSphere 6.x and will be phased out completely in favor of Jython in WebSphere 7.x.
- If you're writing scripts now, it's probably best to just learn Jython and write in Jython, as the Jacl2Jython tool still requires manual verification and editing of the converted script code. The conversion tool will probably convert most simple scripts, but anything even moderately complex has a chance of not translating very well, which may result in scripts doing unexpected things or not running at all.
-> Portal Scripting is installed at /opt/WebSphere/AppServer/bin
-> Portal Scripting Interface startup command file: wpscript.sh
-> Portal Scripting supports two lang;
1. Jython -- -lang jython
2. JACL -- -lang jacl
-> Command for Jython : ./wpscript.sh -lang jython
Command for JACL : ./wpscript.sh -lang jacl
We got three ways to start wsadmin tool;
First:
1. goto location, IBM/WebSphere/PortalServer/bin
2. all script(jython/jacl) files should be located at, IBM/WebSphere/PortalServer/bin
3. run command, wpscript.bat -lang jython
4. to run a script(jython) file, wpscript.bat -lang jython -javaoption "-Djython.package.path=D:\IBM\WebSphere\AppServer\plugins\com.ibm.ws.wlm.jar" -username admin -password admin -f XXX.py
Second(Prefered):
1. goto location, IBM/WebSphere/AppServer/bin
2. all script(jython/jacl) files should be located at, IBM/WebSphere/AppServer/bin
3. run command, wsadmin.bat -lang jython
4. to run a script(jython) file, wsadmin.bat -lang jython -javaoption "-Djython.package.path=D:\IBM\WebSphere\AppServer\plugins\com.ibm.ws.wlm.jar" -username admin -password admin -f XXX.py
Third:
1. goto location, IBM/WebSphere/wp_profile/bin
2. all script(jython/jacl) files should be located at, IBM/WebSphere/wp_profile/bin
3. run command, wsadmin.bat -lang jython
4. to run a script(jython) file, wsadmin.bat -lang jython -javaoption "-Djython.package.path=D:\IBM\WebSphere\AppServer\plugins\com.ibm.ws.wlm.jar" -username admin -password admin -f XXX.py
We are working with jython example
-> Not all of the WebSphere® Application Server component classes are packaged in the same .jar file.
If you are going to be using the wsadmin tool to run Jython scripts,
include the jython.package.path system property on your wsadmin command to ensure that all of the required JAR files are set to the jython package path during wsadmin startup.
-> Run wsadmin with an option other than -f or -c or without an option.
The wsadmin tool starts and displays an interactive shell with a wsadmin prompt.
From the wsadmin prompt, enter any Jacl or Jython command.
You can also invoke commands using the AdminControl, AdminApp, AdminConfig, AdminTask, or Help wsadmin objects.
To leave an interactive scripting session, use the quit or exit commands.
-> to run a jython file we have to type this below command and this file should be kept at following location "/bin"
wsadmin.bat -lang jython -f jythonfile.py
Ref : http://setgetweb.com/tech/portal80/adpsi_start.html http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Fae%2Ftxml_dataaccess.html
http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Fae%2Ftxml_launchscript.html
http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Fae%2Ftxml_configjdbc.html
http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Fae%2Ftxml_template.html
http://publib.boulder.ibm.com/infocenter/wsdoc400/v6r0/index.jsp?topic=/com.ibm.websphere.iseries.doc/info/ae/ae/cdat_jdbcprov.html
No comments:
Post a Comment