| [reply] |
Without seeing any of your code or receiving a more description of any problems that you are experiencing, we are very much working in the dark here. See the node How to get the most of your question from the monks to see how the monks of the monastery can best help you.
Ooohhh, Rob no beer function well without! | [reply] |
can you please answer to my question. i have put the code and also the output it throws.
thanx in advance!
| [reply] |
As i told you, i am passing values from Standalone java application to this perl program abc.pl.
These are the variables which are set in the beginingof the program. This are with respect to the server. The program previously was the server. Now i want to make them with respect to my machine(LOCAL).
$ErrloglogFile = "/export/data/secure03.principal.com/htdocs
/logs/pension/
pnactval.log";
$AcclogFile = "/export/data/secure03.principal.com/htdocs/
logs/pension/pnactval.acclog";
$ArchiveDir = "/export/home/pension/logs/rsc";
$zone = `/usr/bin/date \+\%Z`;
$gzip = "/usr/local/bin/gzip -d -c";
$grep = "/usr/bin/grep";
$cgi = "/cgi-bin/pension/utilities/rscdetail";
$cat = "/usr/bin/cat";
$tempDir = "/tmp";
$randnum = int( rand(99999999) );
$tempFile = "$today$randnum.pnactval";
# ReadParse
# Reads in GET or POST data, converts it to unescaped text, #and puts one key=value in each member of the list "@in"
# Also creates key/value pairs in %in, using '\0' to #separate multiple selections
# If a variable-glob parameter (e.g., *cgi_input) is passed #to ReadParse, information is stored there, rather than in #$in, @in, and #%in.
sub ReadParse {
local (*in) = @_ if @_;
local ($i, $loc, $key, $val);
# Read in text
if ($ENV{'REQUEST_METHOD'} eq "GET") {
$in = $ENV{'QUERY_STRING'};
} elsif ($ENV{'REQUEST_METHOD'} eq "POST") {
read(STDIN,$in,$ENV{'CONTENT_LENGTH'});
}
@in = split(/&/,$in);
foreach $i (0 .. $#in) {
# Convert plus's to spaces
$in[$i] =~ s/\+/ /g;
# Split into key and value.
($key, $val) = split(/=/,$in[$i],2); # splits on the first =.
# Convert %XX from hex numbers to alphanumeric
$key =~ s/%(..)/pack("c",hex($1))/ge;
$val =~ s/%(..)/pack("c",hex($1))/ge;
# Associate key and value
$in{$key} .= "\0" if (defined($in{$key})); # \0 is the multiple se
+parator
$in{$key} .= $val;
}
return 1; # just for fun
}
As you can see it checks in the beginning portion whether
$ ENV{'REQUEST_METHOD'}eq "GET" or "POST".
now do i have to make any changes over here?
PS: This is not the entire code(just the part of it).
| [reply] [d/l] [select] |
As I said earlier ... Have you even tried this out?? Monks like to help people who try stuff and get stumped. We don't do homework or assignments or tell you exactly how to do your job.
You have a brain - use it. If you don't have the knowledge, ask about specific situations you have run into. Give us error messages. Give us things you've tried. Don't say "I have to do this and I'm stupid. Tell me what to do."
------ /me wants to be the brightest bulb in the chandelier!
Vote paco for President!
| [reply] |
Thanx a lot for ur advice!!
I am directing the output to a file. So this is what it generates when i try to run it:
contract_number =397011
member_id =000000003
start_date =10/01/2000
end_date =10/01/2000
Content-type: text/html
Error Summary Report:
No Errors in period
</TABLE>
<TABLE WIDTH=605 BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR><TD COLSPAN="3"> </TD></TR>
<TR><TD COLSPAN="3" ALIGN=center><FORM NAME="Contract Query" METHOD="p
+ost" ACTION="D:/rsc/rscdetail2"><INPUT TYPE=HIDDEN NAME="prev_contrac
+t" VALUE="">
<INPUT TYPE=HIDDEN NAME="prev_start" VALUE="08/21/2001">
<INPUT TYPE=HIDDEN NAME="prev_end" VALUE="08/21/2001">
<INPUT TYPE=SUBMIT VALUE=Back></FORM></TD></TR>
runtime=0 second(s)
First 4 lines are just prints. I tried to test whether the inputs are getting passed from Java to Perl. | [reply] [d/l] |