Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Retriveing Selected files in CGI
peklo
Hello all,
I am launching a CGI to Transform xml into an output using a custom menu Item.
1. How do I retrieve the Files selected in the cgi?
2. I use the XALAN process command to do the transformation, but it sets the user and group on the output as iplanet (our web server) instead of the user executing the command. Any way around this?
Thanks in advance.
CP
Find more posts tagged with
Comments
Migrateduser
I can help you with #1, but you'll need to provide more information -- what version of TS? When you respond, attach your script. There's a few ways you could approach this -- that's the good news. But, I need more context before I could be of any help.
Dave
Current Environment(s):
(1) TS 6.5 on W2K3
(2) TS 6.1 SP1 on W2K3
By the way, I miss Unix terribly.
peklo
We are on TS 6.5.
here is what I have for the script so far....I haven't really done much to it other than make sure I could tranform files.
Once I learn how to get the selected files from the "Request" I will loop through them and build out the rest:
#!../../iw-perl/bin/iwperl
use CGI;
print "Content-type:text/html\n\n";
print "About to run command";
`java org.apache.xalan.xslt.Process -IN /iwmnt/teamsite/main/sales_extranet/inc_main/WORKAREA/workarea/test.xml -XSL /iwmnt/teamsite/main/sales_extranet/WORKAREA/workarea/Inc_Snc_XSLT/foo.xsl -OUT /home/cc915059/phonepage.jsp`;
print "done with command";
Thanks for your help
CP
Adam Stoller
Look through all the form variables stored in param() -- read the perldoc for CGI.pm for more information.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Migrateduser
You might want to remove the "java" call from your script, but the selected files are actually passed in via HTTP POST to your script. If I recall correctly, it can be referenced as something like "file_0" .. "file_n", but if you look at the output of show_env.cgi (or .ipl, I forget which), it will dump all of the variables to the browser, indicating which to use.
Dave
Current Environment(s):
(1) TS 6.5 on W2K3
(2) TS 6.1 SP1 on W2K3
By the way, I miss Unix terribly.