WebSphere Portal Server - Newbee question regarding JACL-script on th e portal

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > November 2005 > Newbee question regarding JACL-script on th e portal





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Newbee question regarding JACL-script on th e portal
Rune Hellem

2005-11-28, 7:51 am

Trying to run this simple jacl-script:

<script>
# set User ID/ pwd for portal Login command
# Hint: User ID and passwords should normally not be placed inside a
# configuration script; better use property files or command line arguments
if { $argc != 2 } {

fail "invocation syntax: wpscript testme.jacl <user> <pwd>"
}
set user [lindex $argv 0]
set pwd [lindex $argv 1]
$Portal login $user $pwd
</script>
I works fine, but not if I pass to few or to many arguments, then it fails with the following message:

<message>
WASX7017E: Exception received while running file "testme.jacl"; exception information: com.ibm.bsf.BSFException: error while eval'ing Jac
l expression: invalid command name "fail"
</message>

Have also tried to replace "fail" with "throw new
EvalException", but same goes here...

Guess it's quite obvious, but I can't seem to figure out why...

R.
Rune Hellem

2005-11-28, 6:05 pm

This helps:
<code>
if { $argc != 2 } {
puts "Syntax: testme.jacl <username> <password>"
exit 0
}
</code>

But it could be sexier with the possibility to throw my own exception

Any hints?

R.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com