Mike Kay

Greenhorn
+ Follow
since Jun 27, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mike Kay

I have the user filling in a HTML text box in my JSP a serial number string like 1234.
The length of the field is zero filled in my database so I need to put a 0 in front like 01234. Is this possible?

I am building a SQL statement with the user selects like this:
sysserno = request.getParameter("sysserno");
sqlValue=sysserno;
sqlName="SYSNO";
sqlCondition=sysserCondition;
buildSQL();


what can I do to sysserno to make sure it's 5 characters zero filled?
17 years ago
reading more about this getruntime. I see I need to then process the return and make sure I send the correct arguments. I'll have to research this more I guess.
java:75: unreported exception asjava.uniobjects.UniSubroutineException;
must be caught or declared to be thrown
getemailAddress.call();
^
java:76: unreported exception asjava.uniobjects.UniSubroutineException;
must be caught or declared to be thrown
emailAddress = getemailAddress.getArg(2);


I might rather use the getRuntime() command.

getRuntime()...........Is this the best way to get the result into
the variable emailAddress?

String[] cmd = {"/usr/local/bin/getid -I -e :", usr};
emailAddress.getRuntime().exec(cmd);
I'm importing asjava.uniobjects.*;
asjava.uniclientlibs.*;


I'm learning this whole Java language, so I am very new to it. I tried using the perform in a pic program and then use

UniSubroutine getemailAddress = uSession.subroutine("GETEMAIL", 3);

try {
getemailAddress.setArg(0, STMT);
getemailAddress.setArg(1, user);<---this was assigned when they login
getemailAddress.setArg(2, RESULT);
getemailAddress.call();
EMAILADDRESS = getemailAddress.getArg(2);
} catch (UniSubroutineException e) {
return valid;
}


to get the results. but I kept getting a you must use caught error. I was wondering if I could just perform the statement via java or whatever the best way to do it is.
I can get a users email address by performing the following

STMT="/usr/local/bin/getid -I -e ":USRNAME

PCPERFORM STMT CAPTURING JUNK

EM.ADDR=JUNK<1,1,1>

but I want to be able to get that via my Java program when the user logs in to the website. I just want it to be able to retrieve their email address and store it in an email varible that I can use throughout the web pages.

Is this possible?