How can I pass non HTTP_ prefixed environment variables to my CGI program in iPlanet 4.1
We have a need to pass some application specific environment variables (e.g: DB_URL) to CGI programs based on the request data. I am trying to solve it with NSAPI module registered at AuthTrans stage.
- Init directive in obj.conf won't help since it will set the environment for the entire server.
- pblock_nvinsert functions won't help since they prefix the variables with HTTP_. This is not acceptable for us.
- I am not clear if util_env_create would help if I don't want environment setting to effect the entire server.
Any help is greatly appreciated.
Regards
We have a need to pass some application specific environment variables (e.g: DB_URL) to CGI programs based on the request data. I am trying to solve it with NSAPI module registered at AuthTrans stage.
- Init directive in obj.conf won't help since it will set the environment for the entire server.
- pblock_nvinsert functions won't help since they prefix the variables with HTTP_. This is not acceptable for us.
- I am not clear if util_env_create would help if I don't want environment setting to effect the entire server.
Any help is greatly appreciated.
Regards
Similar Messages
-
How can I pass the values to the variable by using INPUT ON from output
HI,
In this code I printed s_number by using INPUT ON .
In the out put I want to give the some new values to that field s_number.
That new value I pass to the another prgroam ZMAT_LABEL_FIRST .
How could I pass this new content to this program. I wrote like this but I am not getting new content what I entered in the output.
REPORT ZMAT_LABEL_SCREEN_V1 NO STANDARD PAGE HEADING .
PARAMETERS S_MBLNR TYPE MSEG-MBLNR.
DATA C .
DATA CNT TYPE I.
DATA S_NUMBER(3) TYPE C.
DATA : BEGIN OF IT_MBELN OCCURS 0,
MBLNR TYPE MSEG-MBLNR,
END OF IT_MBELN.
DATA : BEGIN OF IT_MSEG OCCURS 0,
ZEILE TYPE MSEG-ZEILE,
MBLNR TYPE MSEG-MBLNR,
MEINS TYPE MSEG-MEINS,
BPMNG TYPE MSEG-BPMNG,
MAKTX TYPE MAKT-MAKTX,
END OF IT_MSEG.
DATA IT_FINAL LIKE IT_MSEG .
data: it_ret like ddshretval occurs 0 with header line.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_MBLNR.
SELECT MBLNR
FROM MSEG
INTO TABLE IT_MBELN.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'MBLNR'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = 'ZMAT_LABEL_SCREEN '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = IT_MBELN
FIELD_TAB =
RETURN_TAB = IT_RET
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF SY-SUBRC = 0.
read table it_ret index 1.
move it_ret-fieldval to S_MBLNR.
ENDIF.
START-OF-SELECTION.
SELECT A~ZEILE
A~MBLNR
A~MEINS
A~BPMNG
B~MAKTX
INTO CORRESPONDING FIELDS OF TABLE IT_MSEG
FROM MSEG AS A INNER JOIN MAKT AS B
ON AMATNR = BMATNR
WHERE MBLNR = S_MBLNR.
****FINDING THE NUMBER OF RECORDS IN THE TABLE
DESCRIBE TABLE IT_MSEG LINES CNT.
at line-selection.
DO CNT TIMES.
READ LINE SY-INDEX FIELD VALUE C.
IF C = 'X'.
READ TABLE IT_MSEG INDEX SY-INDEX .
***HERE READ THE S_NUMBER(WHAT I ENTERED IN THE OUTPUT) AND PASS TO THIS PROGRAM
submit ZMAT_LABEL_FIRST with p_mblnr = IT_MSEG-mblnr
with number = S_NUMBER
WITH S_ZEILE = IT_MSEG-ZEILE and return.
CLEAR IT_MSEG.
ENDIF.
ENDDO.
**********ALL ITEMS CORRESPODNING TO THE DOCUMENT NUMBER DISPLAY
END-OF-SELECTION.
LOOP AT IT_MSEG.
WRITE : /10 C as CHECKBOX,IT_MSEG-ZEILE,IT_MSEG-MAKTX,IT_MSEG-BPMNG,IT_MSEG-MEINS, S_NUMBER COLOR 5 INPUT ON.
ENDLOOP.
Regards,
SuryaHi Surya..
Change it like this ...
START-OF-SELECTION.
SELECT A~ZEILE
A~MBLNR
A~MEINS
A~BPMNG
B~MAKTX
INTO CORRESPONDING FIELDS OF TABLE IT_MSEG
FROM MSEG AS A INNER JOIN MAKT AS B
ON AMATNR = BMATNR
WHERE MBLNR = S_MBLNR.
****FINDING THE NUMBER OF RECORDS IN THE TABLE
DESCRIBE TABLE IT_MSEG LINES CNT.
at line-selection.
<b>DO. </b>
READ LINE SY-INDEX FIELD VALUE C
<b>FIELD VALUE IT_MSEG-ZEILE.</b>
<b>if sy-subrc ne 0.
EXIT.
ENDIF.</b>
IF C = 'X'.
***HERE READ THE S_NUMBER(WHAT I ENTERED IN THE OUTPUT) AND **PASS TO THIS PROGRAM
<b>CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
INPUT = IT_MSEG-ZEILE
IMPORTING
OUTPUT = IT_MSEG-ZEILE .</b>
submit ZMAT_LABEL_FIRST with p_mblnr = IT_MSEG-mblnr
with number = S_NUMBER
WITH S_ZEILE = IT_MSEG-ZEILE and return.
CLEAR IT_MSEG.
ENDIF.
ENDDO.
**********ALL ITEMS CORRESPODNING TO THE DOCUMENT NUMBER DISPLAY
END-OF-SELECTION.
LOOP AT IT_MSEG.
WRITE : /10 C as CHECKBOX,IT_MSEG-ZEILE,IT_MSEG-MAKTX,IT_MSEG-BPMNG,IT_MSEG-MEINS, S_NUMBER COLOR 5 INPUT ON.
ENDLOOP.
<b>Reward if Helpful.</b> -
How can I pass environment variables to the child process?
How can I pass environment variables to the child process? This is what I tried and it didn't work.
static public void main (String[] args) throws Exception {
ProcessBuilder b = new ProcessBuilder("java", "-cp", ".", "Child");
Map<String, String> map = b.environment();
map.put("custom.property", "my value");
b.redirectErrorStream(true);
Process p = b.start();
BufferedReader reader = new BufferedReader (new InputStreamReader(p.getInputStream()));
String line = null;
while (null != (line = reader.readLine())) {
System.out.println(line);
public static void main(String[] args) {
System.out.println("The value of custom.property is : " + System.getProperty("custom.property"));
}and the result is:
The value of custom.property is : nullComplete test:
static public void main (String[] args) throws Exception {
ProcessBuilder b = new ProcessBuilder("java", "-Dcustom.property=my property value", "-cp", ".", "Child");
Map<String, String> map = b.environment();
map.put("custom.property", "my environment value");
b.redirectErrorStream(true);
Process p = b.start();
BufferedReader reader = new BufferedReader (new InputStreamReader(p.getInputStream()));
String line = null;
while (null != (line = reader.readLine())) {
System.out.println(line);
public static void main(String[] args) {
System.out.println("Property value of custom.property is : " + System.getProperty("custom.property"));
System.out.println("Environment value of custom.property is : " + System.getenv("custom.property"));
} -
How can I pass a value to the command prompt?
I was wondering how can I pass a value to the command prompt with Windows and Linux? I'm more interested in Linux's system than Windows though. Is there a way to return info from the command prompt?
Here is a snippet from http://mindprod.com/jglossexec.html that explains how in detail.
Runtime.getRuntime().exec("myprog.exe") will spawn an external process that runs in parallel with the Java execution. In Windows 95/98/ME/NT/2000/XP, you must use an explicit *.exe or *.com extension on the parameter. It is also best to fully qualify those names so that the system executable search path is irrelevant, and so you don't pick up some stray program off the path with the same name.
To run a *.BAT, *.CMD, *.html *.BTM or URL you must invoke the command processor with these as a parameter. These extensions are not first class executables in Windows. They are input data for the command processor. You must also invoke the command processor when you want to use the < > | piping options, Here's how, presuming you are not interested in looking at the output:
Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat" );
Runtime.getRuntime( ).exec ("cmd.exe /E:1900 /C MyCmd.cmd" );
Runtime.getRuntime( ).exec ("C:\\4DOS601\\4DOS.COM /E:1900 /C MyBtm.btm" );
Runtime.getRuntime( ).exec ("D:\\4NT301\\4NT.EXE /E:1900 /C MyBtm.btm" );
There are also overloaded forms of exec(),
Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null);
Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null, "C:\\SomeDirectory");
The second argument can be a String [], and can be used to set environment variables. In the second case, "C:\\SomeDirectory" specifies a directory for the process to start in. If, for instance, your process saves files to disk, then this form allows you to specify which directory they will be saved in.
Windows and NT will let you feed a URL string to the command processor and it will find a browser, launch the browser, and render the page, e.g.
Runtime.getRuntime( ).exec ("command.com http://mindprod.com/projects.html" );
Another lower level approach that does not require extension associations to be quite as well set up is:
Runtime.getRuntime( ).exec ("rundll32 url.dll,FileProtocolHandler http://mindprod.com/projects.html" );
Note that a URL is not the same thing as a file name. You can point your browser at a local file with something like this: file://localhost/E:/mindprod/jgloss.html or file:///E|/mindprod/jgloss.html.
Composing just the right platform-specific command to launch browser and feed it a URL to display can be frustrating. You can use the BrowserLauncher package to do that for you.
Note that
rundll32.exe url.dll,FileProtocolHandler file:///E|/mindprod/jgloss.html
won't work on the command line because | is reserved as the piping operator, though it will work as an exec parameter passed directly to the rundll32.exe executable.
With explicit extensions and appropriately set up associations in Windows 95/98/ME/NT/2000/XP you can often bypass the command processor and invoke the file directly, even *.bat.
Similarly, for Unix/Linux you must spawn the program that can process the script, e.g. bash. However, you can run scripts directly with exec if you do two things:
Start the script with #!bash or whatever the interpreter's name is.
Mark the script file itself with the executable attribute.
Alternatively start the script interpreter, e.g.
Runtime.getRuntime( ).exec (new String[]{"/bin/sh", "-c", "echo $SHELL"}"; -
How can I pass a Presentation Variable (Date) into a prompt
Hello
How can I pass a Presentation Variable (date) into a prompt? I seem to be able to do this successfully for a non-date value but have had no luck with a Date variable.
Here's a simplistic version of what I'm trying to do:
1. I have a Presentation Variable called startDate which is a Date that defaults to this SQL - SELECT "Reporting Dates"."Measure Date" FROM Trading WHERE "Reporting Dates"."Date Name" = 'Current'.
2. I now want to pass this variable into a prompt with SQL like this: SELECT "Position Date"."Position Date" FROM Trading where "Position Date"."Position Date" = date'@{startDate}{2009-04-24}'
I get this error: Datetime value @{startDate}{2009-04-24} from @{startDate}{2009-04-24} does not match the specified format.
Now I can use the exact same syntax in a filter. For example, a simple Answers request where I pick Position Date with a filter saying "Position Date"."Position Date" = date'@{startDate}{2009-04-24}' works fine.
What am I doing wrong?
Thanks!Can you provide more information please?
1. What is the format of the first date prompt, is it YYYY-MM-DD or?
2. Which data type is Position Date."Position Date" in the physical layer, date or date time?
3. What is the column formula in the first prompt?
4. The first prompt is set to drop-down or?
5. If you are using this SQL Results in the second prompt:
SELECT "Position Date"."Position Date" FROM Trading where "Position Date"."Position Date" = date '@{startDate}{2009-04-24}'
then @{startDate} must be in YYYY-MM-DD format to work properly, otherwise (for example):
datetime value 01/01/2000 from 01/01/2000 does not match the specified format.
This doesn't work for example:
SELECT Times.time_id FROM "Normal model" where Times.time_id =date '01/01/2000'
Regards
Goran
http://108obiee.blogspot.com -
How can I pass field value betwen view in ICWC?
Hi experts,
I am new to this BSP programming. I have some requirements to modify standard ICWC in CRM 5.0
Hope can get some advices and helps here.
I have added a new field called <status> to context note SEARCHCUSTOMER in BupaSearchB2B view and also the same field name to context note CUSTOMER in BupaCreate view.
I have added the field into both the HTM views and able to execute thru WebClient. However, I have one problem in passing the <status> value from BupaSearchB2B view to the BupaCreate view when I click on the 'create' button.
I do search and saw this thread How can I pass field value beetwen view in IC Web Client? , but i cant figure out how it works.
Do I need to create the field <status> to context note CUSTOMER in BupaSearchB2B? Currently the context note does not have any attributes.
Really appreciate for any help.
Edited by: mervyn tay on Apr 7, 2009 11:42 AMsolved by myself...
code in the CREATE_ACCOUNT method.
ev_entity->set_property( iv_attr_name = 'ZZICNO'
iv_value = lv_icnum1 ). -
How can I pass an empty array to a parameter of type PLSQLAssociativeArray
How can I pass an empty array to a parameter of type PLSQLAssociativeArray in VB? I defined the parameter like this
Dim myArray() as String = new String() {}
Dim myPara as new Oracle.DataAccess.Client.OracleCollectionType.PLSQLAssociativeArray
myPara = 0
myPara.Value = myArray
When I execute my stored procedure giving the above parameter, I got error saying OracleParameter.Value is invalid.
I have tried to give it the DBNull.Value, but it doesn't work either.
Note: everything works fine as long as myArray has some item in there. I just wonder how I can make it works in case I have nothing.
Thank you,How can I pass an empty array to a parameter of type PLSQLAssociativeArray in VB? I defined the parameter like this
Dim myArray() as String = new String() {}
Dim myPara as new Oracle.DataAccess.Client.OracleCollectionType.PLSQLAssociativeArray
myPara = 0
myPara.Value = myArray
When I execute my stored procedure giving the above parameter, I got error saying OracleParameter.Value is invalid.
I have tried to give it the DBNull.Value, but it doesn't work either.
Note: everything works fine as long as myArray has some item in there. I just wonder how I can make it works in case I have nothing.
Thank you, -
How can i pass the Input value to the sql file in the korn shell ??
Hi,
How can i pass the Input value to the sql file in the korn shell ??
I have to pass the 4 different values to the sql file and each time i pass the value it has to generate the txt file for that value like wise it has to generate the 4 files at each run.
can any one help me out.
RajaCan you please more elaberate., perhaps you should more elaberate.
sqlplus is a program. you start it from the korn shell. when it's finished, processing control returns to the korn shell. the korn shell and sqlplus do not communicate back and forth.
so "spool the output from .sql file to some txt file from k shell, while passing the input parameters to the sql file from korn shell" makes no sense. -
How can I pass more than one parameters in PDK-URL services?
Hi all,
How can I pass more than one parameters in PDK-URL service? All samples on Portal Center shows just one parameter passing.
<inputParameter class="oracle.portal.provider.v1.URLPortletParameter">
<name>csz</name>
<isMandatory>false</isMandatory>
<displayName>What location do you want a map for (City, State or Zip)?</displayName>
</inputParameter>
How can I write the privider.xml file for passing multiple parameters?I answer to my question. I've got the answer.
I repeatly write down the <inputParameter> tags, and it works. -
How can i pass more than 1 param to servlet to show blob image
Hi
my servlet expects 2 param to SELECt an image from a blob column
public class ImageBlobServlet extends HttpServlet {
private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
public void init(ServletConfig config) throws ServletException {
super.init(config);
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
response.setContentType(CONTENT_TYPE);
String ImageId = request.getParameter("id");
String TipImg = request.getParameter("tip");
OutputStream os = response.getOutputStream();
Connection conn = null;
try {
Context ctx;
ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("java:/comp/env/jdbc/rhDS");
conn = ds.getConnection();
PreparedStatement statement = conn.prepareStatement("select FIT from " +
"RHH_FOTOS IMG " +
"where IMG.IDASSO = ? and IMG.TIM_COA = ?");
statement.setInt(1, new Integer(ImageId));
statement.setString(2, TipImg);
To display the image i tried to use:
<af:image id="ot1"
*source="/imageblobservlet?id=#{bindings.Con.inputValue}?tip=#{"EMP"}"*
shortDesc="Foto"/>
but i receive all content in the get of first param.
String ImageId = request.getParameter("id");
How can i pass one more then 1 param in EL.
Thanks in advanceHello,
seems to me you're using wrong separator for the second param into your URL:
<af:image id="ot1" source="/imageblobservlet?id=#{bindings.Con.inputValue}
tip=#{"EMP"}" shortDesc="Foto"/>
I think it should be:
<af:image id="ot1" source="/imageblobservlet?id=#{bindings.Con.inputValue}
tip=#{"EMP"}" shortDesc="Foto"/>
Jack -
How can I pass arguments from one MIDlet to another MIDlet
Hi everybody !
Can anybody help me in knowing that how can I pass the parameters from one
MIDlets to another one in same application.
I am devloping a application in which I am using more than two MIDlet and I
want to transfer Parameter from one MIDlet to another one.
I just explain what I have done....
I made a MIDlet "A" and "B" in the same project using NetBeans IDE.
In MIDlet "A" I create the Object of MIDlet "B" so that the constructor of
MIDlet "B" is called and parameter can be transferred.
But when I run the program it shows me two MIDlet on the screen, that I
doesn't need.
Suggestion are most welcome....
Thanks in advance
Regards
BhagwatIf you create two MIDlet in a midlet suite, it will display as you mentioned means you can't change the display style.
-
How can I pass parameters from one process flow to another process flow?
How can I pass parameters from one process flow to another process flow (sub process) in warehouse builder? let me know the steps I have to do in warehouse builder.
Thanks in advance,
KishanHi Kishan,
Please post this question to the Warehouse Builder forum:
Warehouse Builder
Thanks, Mark -
How can I pass data generated in a SubVI inside a Case Structure out of the Case Structure?
Hello,
I am using a USB 2701 to control a heater. I have three SubVIs that are all working properly on their own. I'd like to use an Enum to select which of the SubVIs is running at a given time. The problem is that no data is passing out of the case structure. How can I pass the temperatures and heater outputs acquired by the SubVIs to the main VI? I've attached my some of my code below. I can't attach more than 3 files, but you can see how the main VI is configured. Like I said, the SubVIs are working individually, so you shouldn't really need to look at them.
Thank you,
CJones581
Attachments:
RampHeater6-21-07.vi 305 KB
69_Heater_Case.vi 23 KB
HeaterTCD6-21-07.vi 210 KBCJones,
You might check a couple of things.
Your HeaterTCD... VI has a While loop with a stop button condition. HeaterTCD pass out values only when it finishes running. If it doesn't pop open the front panel (which usually doesn't happen when running a SubVI) you could run into a stuck loop because you don't have access to the Stop button. This could appear in the form of no data being passed out (because the SubVI never stops running). The primary VI opens the HeaterTCD VI, starts it, and waits for the VI to finish and pass final values .
Secondary note: Unless you want your SubVI panel (which probably isn't open when running the main VI) to update continuously, consider moving your Temperature Graph and Temperature oC indicators outside the while loop. Pass final values to them via a tunnel, since the main VI will only read their values after the loop finishes running, anyway.
It might help to add error management to HeaterTCD like you have for RampHeater. If you connect error lines with Error Outs to your main VI, that will help tell if there is an error somewhere that is preventing info output.
RampHeater SubVI has the same issue with the stop button. It is also probably getting stuck in the While loop waiting for a manual push of that SubVI's Stop button.
An easy way to test this would be to set up a logic circuit so that when the While loop iteration counter reaches a certain number, it registers True and sends it to the conditional. I know this isn't what you want to do long-term, but if that lets your SubVI return outputs it means that the SubVI was just never stopping.
Hope that helps.
David C, Applications Engineering
David C
Applications Engineering -
HT201250 how can i pass information from one mac to another mac by using the time capsule
how can i pass information from one mac to another mac by using the time capsule
If you want to transfer files, settings, etc., you must open Migration Assistant (Applications > Utilities) in the Mac that you want to transfer the files and follow the instructions
-
How can I pass multiple condition in where clause with the join table?
Hi:
I need to collect several inputs at run time, and query the record according to the input.
How can I pass multiple conditions in where clause with the join table?
Thanks in advance for any help.
Regards,
TDIf you are using SQL-Plus or Reports you can use lexical parameters like:
SELECT * FROM emp &condition;
When you run the query it will ask for value of condition and you can enter what every you want. Here is a really fun query:
SELECT &columns FROM &tables &condition;
But if you are using Forms. Then you have to change the condition by SET_BLOCK_PROPERTY.
Best of luck!
Maybe you are looking for
-
Measuring percentage of space used by type of content?
I work with a weekly publication where we try to keep advertising content to a maximum of 70 percent for every 20 pages. Is there a way, through InDesign, to have the program track specific kinds of content (ie: advertising) by the amount of space us
-
Error in Accessing Service Browser in CAF
I am trying to accessing Service browser from test tools in CAF.I am getting Sevurity warning as Access forbidden.So please resolve this issue. Thank you, Murthy.
-
Can I use the iPhone when is he charging?
Can I use the iPhone when is he charging?
-
Unable to create a new instance in Hyperion Conf Utility
Hi, I have installed Planning 9.3.1 on XP Prof. Everything is configured correctly except for the instance. I try to create a new instance and system gives out the following - "System failure : Error while retrieving xml from database" I have re-inst
-
I just upgraded to iOS 6.1 on my iPhone 4. Now my email app won't open.