Passing Parameters to a discoverer folder using Note 282249.1

I am creating reports for a multi-lingual environment. My problem is trying to present the headings in the reports in the language required. Since I am creating all the code for the reports in custom folders, I thought I would just hide my column headings using color on color and add a row to my report that is a headings row.
In order for the headings row to display, it must have the value for the parameter I am using...a type of id. I followed the instructions in Note:282249.1 for passing a parameter to a discoverer folder. It works perfectly...sometimes. I think the 'sometimes' has something to do with caching.
As the Note says, I created a function 'setparam' and then I created a condition in the report which is 1=SETPARAM(:my_parameter). Here's how I ran the report and the results:
1. Condition in the report, heading row doesn't display
2. Remove the condition, use the same parameter, heading row displays
3. Condition still not in, use new parameter value, heading row doesn't display
4. Add Condition back in, same parameter value as #3, heading row displays
5. Remove condition, same parameter value as #3 & #4, heading row displays
6. Add Condition back in, same parameter value as #3, #4 & #5, heading row displays
7. Condition in the report, new parameter value, heading row doesn't display
8. Results same as #2
and so forth. Which is why I decided it has to do with caching.
So then I ran the sql in SQL Developer and got this error. "SQL Error: Missing IN or OUT parameter at index:: 1". I googled the error, but the results are outside my scope of knowledge.
Anyone?
Thanks so much,
Tricia

Hi,
It is difficult to use this technique with the /BATCH command because you cannot specify the order in which the worksheets will be processed.
My suggestion is that you change you set_context function so that the value is stored in a table and then create a logon trigger so that the users' contexts are reloaded when the user connects. Your contexts will then effectively be permanent and reset from session to session.
You will need to create a table to store the contexts:
CREATE TABLE disco_user_context
(username VARCHAR2(30), attribute VARCHAR2(30), value VARCHAR2(4000),
CONSTRAINT disco_user_context_pk PRIMARY KEY (username, attribute));And modify your set context function to store the contexts:
FUNCTION set_context(p_name VARCHAR2,
                     p_value VARCHAR2) RETURN VARCHAR2
IS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
dbms_session.set_context('EUL_DISCO', p_name, p_value);
INSERT INTO disco_user_context (username, attribute, value)
VALUES (user, p_name, p_value);
COMMIT;
RETURN p_value;
EXCEPTION WHEN DUP_VAL_ON_INDEX THEN
UPDATE disco_user_context
SET value = p_value
WHERE username = user AND attribute = p_name;
COMMIT;
RETURN p_value;
END set_context;Then create an initialization procedure in your package:
PROCEDURE initialize
IS
result VARCHAR2(4000);
BEGIN
FOR contexts IN (SELECT attribute, value FROM disco_user_context WHERE username=user)
LOOP
    result := set_context(contexts.attribute, contexts.value);
END LOOP;
END initialize;And create a logon trigger to call the initialization procedure:
CREATE OR REPLACE TRIGGER rodwest.disco_logon_trigger AFTER logon ON rodwest.SCHEMA
BEGIN disco_pkg.initialize; END;
/Hope that helps,
Rod West

Similar Messages

  • Passing parameters in a html page using xwd_tmppg.create

    We are in the initial stage of Developing a OLAP Web Application using
    Oracle Express Web Agent 6.3.2,Oracle Express Administrator6.3.2.
    Flow of our screens are:-
    We have a login screen that authenticates user entry to access his assigned role screen.Based on the role the user selects we will be listing out the analysis in a screen that the user could access.
    Express Programs are used to create Role and Analysis screen.
    User logged information is passed from login to role screen and to
    analysis screen using XWD_APPPG.CREATE that accepts parameters.
    Moreover this function can only be used to create html page with out
    data views.
    Now let us come to our problem-
    We need to take the user from analysis screen to detailed data view screen that shows the OLAP cube with a back & exit button.As explained earlier you need to use the function XWD_TMPPG.CREATE to create dataview.It is not possible to pass parameters through this function.This function accepts .html as the only parameter.But we need to pass the userid info to get back to analysis screen for the user to select the next analysis.I need the user logged info available in the template file.
    Is there any solution for this problem or any other approach to capture the user logged info in the template file???

    Hi Aneel,
    Thanks for your informative suggestion on how to receive data from
    previous page on to the template page using LOCATION.SEARCH.SUBSTRING
    function.
    I could very successfully get the userid information by implementing
    this method within the SCRIPT boundary.
    I also want to pass this value to a express program embedded
    within the <!--EXPRESS call foot(userid)--> so that it will enable the
    user to go back to List of analysis page.her my footer program will
    inturn call the Analysis Page with the userid information.That's my
    whole idea.
    I tried the following methods to acieve my end result-
    1)Tried to store the value in a local variable in the template & passed
    it to the express program -- Error thrown was "userid is not attached in
    the database"
    2)Directly specifed location.search.sunstring in the express program..
    Still the same error was thrown
    3)Thought of storing the value in the name of hidden object .Still this
    will not work out because i need to declare the object in the FORM..
    Moreover the value is avialable wihin the JAVA SCRIPT range.Out of this
    range template is not able to identify this value.
    Any idea Aneel form your end.
    Can you let me know how to use hidden object in achieving the result.
    I have been working very hard for quite sometime.
    Advance thanks.
    Nanda Kishore

  • Passing parameters to included JSP files using JSF

    I have included JSP, which I use in many other JSP files. I want to display message in this included JSP which depends on the information in JSP files which include this JSP. How can I do this without using scriptlets?
    Message was edited by:
    cheltsov

    I have one included page in one jsp page(mother page). I have included it by jsp:include tag. The included page consists of two inputText. I need to pass the parameters of the mother page together with the parameters in the included page in the backingBean of the mother page. Hope this one is clearer.
    The code snippet in the mother page looks like this
    <jsp:include page="/pages/ps/sample_rep2.jsp"/>.
    In the sample_rep2.jsp, I have two inputText. How can I pass this in the backingBean of the motherpage.
    The sample_rep2.jsp is the included page here. The sample_rep2.jsp looks like this:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <af:panelBox>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <af:panelBox>
    <af:inputText label="User ID" id="userid" value="CDOUGLAS"/>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <af:panelBox>
    <af:inputText label="User ID" id="userid" />
    <af:inputText label="Age" id="age"/>
    </af:panelBox>

  • How to pass parameters to a page invoked using java script.--- Very Urgent.

    Hello,
    I have an advanced Table in my page. In the first column there is a
    messageChoice. In the second column there is link item.On the link item i have set the following value for destination uri.
    javascript:var a=window.open('OA.jsp?page=/AutoSales/oracle/apps/per/auto/webui/AutoSurrogatesPG&retainAM=Y','a','height=500,width=900,status=yes,toolbar=no,menubar=no,location=no,resizable=yes,scrollbar=yes'); a.focus();
    The user selects a value from the message choice and when he clicks on the link item, the value selected from the list should go to the new page invoked using java script as a parameter. I need the value selected from choice to generates few fields in the new page. I have preferred java script because i need the base page and a model window should open. I have tried using setForwardUrl() and setting '_blank' and new window for target frame property on the link item. But it isnt working. The new page is opening in the same window.
    I have also tried putting the value in a session.
    Please help with any kind of suggestions or solutions.
    Thank you.

    Uma,
    You need to
    - Have a PPR Action on the messageChoice (this would trigger a form submit to populate the underlying View Attribute)
    - Either
    - Retrive the value from the View Attribute in the pop-up page (as I could see that you are retaining the AM)
    - Use a SPEL in the link (on the modal page) to use the value from the View Attribute as the parameter value (in the form ${oa.current.<ViewAttributeName>)
    HTH

  • How to pass parameters to an XSL for use in a transform (JSP/XSLT)?

    I have an XSL: style.xsl
    I have an XML: data.xml
    I want to do an XSL Transform on data.xml, using style.xsl, with parameter
    Language=en
    With Saxon you would do:
    saxon data.xml style.xsl Language=en
    But how would I do this with WL6.x, using the JSP XSLT tag:
    <x:xslt [xml="uri of XML file"]
    [media="media type to determine stylesheet"]
    [stylesheet="uri of stylesheet"]
    <x:xml>In-line XML goes here
    </x:xml>
    <x:stylesheet [media="media type to determine stylesheet"]
    [uri="uri of stylesheet"]
    </x:stylesheet>
    </x:xslt>
    Thanks
    Alain Jacquot

    There is currently no way to do this from the jsp xslt tag. I have filed an
    issue because this is available in the JAXP 1.1 API. If you need this
    functionality in the current version you will need to use the JAXP API
    directly.
    Sam
    "Alain Jacquot" <[email protected]> wrote in message
    news:3b368016$[email protected]..
    I have an XSL: style.xsl
    I have an XML: data.xml
    I want to do an XSL Transform on data.xml, using style.xsl, with parameter
    Language=en
    With Saxon you would do:
    saxon data.xml style.xsl Language=en
    But how would I do this with WL6.x, using the JSP XSLT tag:
    <x:xslt [xml="uri of XML file"]
    [media="media type to determine stylesheet"]
    [stylesheet="uri of stylesheet"]
    <x:xml>In-line XML goes here
    </x:xml>
    <x:stylesheet [media="media type to determine stylesheet"]
    [uri="uri of stylesheet"]
    </x:stylesheet>
    </x:xslt>
    Thanks
    Alain Jacquot

  • Passing parameters in PL/SQL FOLDER

    I've made a structure of content inside a content area.
    Inside this structure, I've created som PL/SQL Folders to display information stored in a rempote database.
    How can I manipulate the values to submit from the area of the PL/SQL folder,
    for instance a value selected from a customize ComboBox and read it in the same PL/SQL folder after the submit?
    Thanks in advance,
    Gilberto Pe-Curto
    [email protected]

    This has nothing to do with the SQL and PL/SQL languages - and sounds like you're dealing with a product called Oracle Applications or something or another.
    Wrong forum for that. Please have a look at the forum indexes and ask product related questions in the correct forum.
    Please close this thread.
    Thanks.

  • Creating a Dynamic LOV to pass parameters

    I am attempting to create an LOV to pass parameters to my Discoverer report I have on my portal. Any way to make the LOV dynamic? I want a simple sql statement in there to populate it. I used a simple parameter portlet and that wont work...just static list.
    Thanks.

    I suppse the answer is "No" there is no way to do it....
    Anyone found a way to do this?

  • Challenge passing parameters to discoverer report

    Hello everyone, I am following the instructions on this website - http://learndiscoverer.blogspot.com/2008/11/metalink-note-304192.html
    Basically, we want to use parameters for discoverer reports, especially date parameters because of some performance issues we have been having with discoverer.
    Here is the process I am using. Please correct me if I am doing anythinng wrong.
    1. Login to apps schema and create context
    CREATE OR REPLACE CONTEXT DISCO_CONTEXT
    USING EUL4_US.DISCO_PKG
    2. Login to eul4_us schema and create package
    CREATE OR REPLACE PACKAGE DISCO_PKG
    AS
    FUNCTION set_context(p_name VARCHAR2,
    p_value VARCHAR2) RETURN VARCHAR2;
    FUNCTION show_context(p_name VARCHAR2) RETURN VARCHAR2;
    END disco_pkg;
    CREATE OR REPLACE PACKAGE BODY DISCO_PKG
    AS
    FUNCTION set_context(p_name VARCHAR2,
    p_value VARCHAR2) RETURN VARCHAR2
    IS
    BEGIN
    dbms_session.set_context('DISCO_CONTEXT', p_name, p_value);
    RETURN p_value;
    END set_context;
    FUNCTION show_context(p_name VARCHAR2) RETURN VARCHAR2
    IS
    BEGIN
    RETURN SYS_CONTEXT('DISCO_CONTEXT', p_name);
    END show_context;
    END disco_pkg;
    Then grant access to apps
    GRANT ALL ON DISCO_PKG TO APPS;
    Then import the functions show_context and set_context into discoverer
    3. Go back to apps schema and create synonym
    CREATE PUBLIC SYNONYM DISCO_PKG FOR EUL4_US.DISCO_PKG;
    4. Create discoverer custom folder using the following query:
    SELECT DISTINCT
    pet.run_result_id
    ,papf.employee_number
    FROM
    per_all_people_f papf,
    --hr_lookups hl,*
    per_all_assignments_f paaf,
    hr_all_organization_units haou,
    per_jobs pj,
    per_grades pg,
    pay_people_groups ppg,
    --per_addresses pa,*
    --hr_locations_all hla,*
    per_positions pps,
    per_people_f ppf,
    pay_assignment_actions paa,
    pay_payroll_actions ppa,
    PAY_RUN_RESULTS_V pet,
    --pay_element_types_v1 pet,
    pay_all_payrolls_f papaf
    WHERE
    papf.person_id=paaf.person_id
    AND papf.employee_number=ppf.employee_number
    AND paaf.organization_id=haou.organization_id
    AND paaf.job_id=pj.job_id(+)
    AND paaf.grade_id=pg.grade_id(+)
    AND paaf.people_group_id=ppg.people_group_id(+)
    AND paaf.position_id=pps.position_id(+)
    AND paaf.business_group_id=0
    AND paa.assignment_id = paaf.assignment_id
    AND paa.payroll_action_id = ppa.payroll_action_id
    AND paa.assignment_action_id=pet.assignment_action_id
    AND paaf.payroll_id=papaf.payroll_id
    AND ppa.effective_date BETWEEN paaf.effective_start_date AND paaf.effective_end_date
    AND ppa.effective_date BETWEEN papf.effective_start_date AND papf.effective_end_date
    AND ppa.action_type ='R'
    AND ppa.action_status = 'C'
    AND paaf.assignment_type = 'E'
    AND paaf.primary_flag = 'Y'
    AND haou.business_group_id=0
    AND ppa.effective_date = TO_DATE(SYS_CONTEXT('DISCO_CONTEXT','PAYROLL_DATE'))
    5. Create a parameter called Payroll Date. Default value is set to NULL and the "Create Condition" checkbox is unchecked.
    6. Create a calculation
    SET_CONTEXT('PAYROLL_DATE', TO_CHAR(:Payroll Date))
    And that's it.
    The thing is, this doesn't work for me.
    But for the same query, if I enter the date value I am substituting, values show up. So it seems for some reason, the context value probably isn't being set or thereabouts.
    I have tried setting the context manually in a TOAD session using:
    declare
    v_ret varchar2(50);
    begin
    --dbms_session.set_context('DISCO_CONTEXT', 'PAYROLL_DATE', '31-MAR-2010');
    v_ret := disco_pkg.set_context('PAYROLL_DATE', '01-MAR-2010');
    dbms_output.put_line(v_ret);
    end;
    And afterwards run the query:
    select sys_context('DISCO_CONTEXT', 'PAYROLL_DATE') from dual
    And results do show up here. So I'm wondering what could be wrong.
    Please help.

    Hi ,
    Are you saying I should create a new workbook that is not based on my custom folder for setting and showing the context value? You don't need to create a new workbook, you can just create a new worksheet in your report workbook, but you will need two sheets to use contexts. The sheet that sets the contexts should not be based on your custom folder, but on a folder that returns a single row. You cannot set and check contexts in a single SQL statement, so you have to have 2 worksheets.
    You can default the contexts using a trigger or initialisation SQL so that the user only has to set the contexts if they are not using the defaults.
    Rod West

  • Discoverer viewer (Passing parameters)

    Hi!
    I have according to metalink Note 282249 been able to pass parameters from discoverer desktop to admin and the tabes comes out all right. The problem is that it does not seems to work with the browser discoverer 4i viewer the error message i get is in swedish (Fel uppstod vid öppning av arbetsbok med namnet:
    Följande objekt saknas:Hr All Organization Units 2.Namn
    whitch means word by word:
    error arose when opening workbook called:
    The following object is missing:Hr All Organization Units 2.Namn
    I'm new to Discoverer.
    //Åsa Frank
    Posting the XML if maby you can understand it:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <discoverer login_method="discoverer">
    <session id="gcfgthh9e1.o7jHpkjMpwTvq6XOnkHzr2TNnhDCrkPHnl9I/A5KpRfzoQjO/Bbzcx4Ra34L" />
    - <request source="/discoverer4i/viewer" parameters="?ac=KC~40vespa&eul=APPS&nlsl=sv-se&wbk=SKNING_VIA_VARUBENMNINGDIS2_ny&fm=xml">
    <error code="311">Hr All Organization Units 2.Namn</error>
    <command name="fm">xml</command>
    <command name="ac" ref="KC~40vespa">KC@vespa</command>
    <command name="eul">APPS</command>
    <command name="wbk">SKNING_VIA_VARUBENMNINGDIS2_ny</command>
    <command name="nlsl">sv-se</command>
    </request>
    - <account mv_summaries_supported="true" name="KC@vespa" ref="KC~40vespa">
    <user>KC</user>
    <database>vespa</database>
    - <eul default="true" name="APPS">
    - <workbook name="APPS.Sökning via varubenämningNY.DIS" ref="APPS.S~c3~b6kning~20via~20varuben~c3~a4mningNY.DIS" key="SKNING_VIA_VARUBENMNINGDIS2_ny">
    <error code="311">Hr All Organization Units 2.Namn</error>
    <error code="311">Hr All Organization Units 2.Namn</error>
    <error code="311">Hr All Organization Units 2.Namn</error>
    <error code="311">Hr All Organization Units 2.Namn</error>
    </workbook>
    <version component="eul_version" product="" version="EUL V4.1.14.0.0.0" />
    </eul>
    <option name="usd">2</option>
    <option name="daq">false</option>
    <option name="qrl">10000</option>
    <option name="qll">15</option>
    <option name="aq">true</option>
    <option name="qpw">60</option>
    <option name="msa">60</option>
    <option name="ftd">true</option>
    <option name="qtl">1800</option>
    <option name="qif">250</option>
    <option name="nv" ref="~20" />
    <option name="nad">-</option>
    <option name="rpp">25</option>
    <version component="db_version" product="Oracle9i Enterprise Edition Release" version="9.2.0.6.0 - 64bit Production" />
    <version component="server_version" product="" version="Discoverer-server V4.1.48.06.00" />
    </account>
    <export name="xls" format="application.vnd.ms-excel">Microsoft Excel Workbook (*.xls)</export>
    <export name="xlsp" format="application.vnd.ms-excel">MicroSoft Excel Workbook with PivotTable (*.xls)</export>
    <export name="htm" format="text.html">Hyper-Text Markup Language (*.htm)</export>
    <export name="txt" format="text.plain">Text (Tab delimited) (*.txt)</export>
    <export name="csv" format="text.plain">CSV (Comma delimited) (*.csv)</export>
    <export name="prn" format="text.plain">Formatted Text (Space delimited) (*.prn)</export>
    <export name="dcs" format="text.plain">DCS (Express Format) (*.dcs)</export>
    <export name="dif" format="application.vnd.ms-excel">DIF (Data Interchange Format) (*.dif)</export>
    <export name="slk" format="application.vnd.ms-excel">SYLK (Symbolic Link) (*.slk)</export>
    <export name="wks" format="application.vnd.ms-excel">WKS (Lotus 1-2-3) (*.wks)</export>
    <locale language="sv" country="SE">svenska (Sverige)</locale>
    <version component="servlet_version" product="Discoverer 4i Viewer" version="4.1.48.06.00" />
    <version component="xml_version" product="Viewer XML Version" version="16032001" />
    <version component="xml_parser_version" product="Oracle XML Parser" version="2.0.2.9.0 Production" />
    <version component="servlet_container_version" product="Servlet Container" version="ApacheJServ/1.1.2" />

    It works to login as the user i created the BA with... however i can't seem to access the costume folder with the other user User2. User2 has select any table grant. do i need to make an exta object grant? If so where do I find out what object?
    //Frank
    Message was edited by:
    user541666

  • SSRS,MDX- Passed parameters are not hitting the main query in Dataset

    I have created a SSRS report which has to accept two parameters i.e., store name, Date(to show sales on particular date) in report. which are working fine for me. but, those passed parameters are not hitting the main query in main Dataset. what ever i
    pass in parameters, it is displaying all the rows(every city values). i think i am not correct in creating the statement in  Main dataset query, to receive those 2 parameters into the main query. can anybody please help me how to create the statement
    in main date set to display the results for the exact parameter i am passing(which has to be in MDX).
    ram

    Hi ramprasad74,
    According to your description, you want to use parameter in the report, then after parameter values are selected, corresponding data will be displayed in the report. But the parameters do not work and all the rows are displayed.
    To pass parameter to main report dataset, we need to define parameter for MDX query and assign parameter name same as SSRS report parameter. For detail information, please refer to the following steps:
    Create a Dataset to retrieve data for Store name parameter.
    Create Store name parameter, type name and prompt, set Date type to Text, check Allow multiple values check box, then select get values from the dataset.
    Create a Dataset for Date parameter.
    Create Date parameter, type name and prompt, set Date type to Date/Time, then select get values from the dataset.
    Create a new dataset used to retrieve data for the report, add statement like below to the mdx query: {STRTOMEMBER(@Date)} * {STRTOSET (@Store_name)}.
    In Query Designer pane, click Query Parameters and assign parameter name same as SSRS report parameter.
    For more information about SSRS Report with Single and Multi Selection Parameter using MDX Query, please refer to the following blog:
    http://www.codeproject.com/Articles/799265/SSRS-Report-with-Single-and-Multi-Selection-Parame
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.

  • Passing Parameters using key mapping in web envirnment

    if I use the url for passing parameters directly to report as
    http://appserver/dev60cgi/rwcgi60?report=inv.rep+server=server=repserver+userid=scott/tiger@db+param1=1+param2=2+DESTYPE etc;
    it works fine but Now the problem is I m using key mapping to hide username and password for this the url is
    http://appserver/dev60cgi/rwcgi60?mapkey+report=inv.rep+server=repserver+param1=1+param2=2;
    where mapkey is defined in CGIcmd.dat file as
    mapkey := scott/tiger@db
    I have checked by rearranging the order of paramerters but still get error.
    Oracle Reports Server CGI - Reports Server name is not specified.
    but I m mentioning the server name as server=repserver
    Hope to get it soon
    Thnx in advance

    You key defined in the cgicmd.dat file should be:
    mapkey := userid=scott/tiger@db *
    You need parameter name 'userid=' before scott, and need space character and '*' in the line. Without '*', cgi won't take any more parameter from the URL after the key, so '+report=inv.rep+server=repserver+param1=1+param2=2' is ignored if there is no '*' for mapkey.

  • Passing date parameters to a custom folder

    Is there any simple way to pass date parmeters to a custom folder?

    I think I recognize a question very similar to this recently.
    And it's the same situation, in that - what do you mean by passing a date?
    I understand it to mean that you want a user - at run time - to enter a date or date range that will then return only that data from a custom folder.
    1. You could have all data returned (ie: no date conditions applied to the SQL) and then filter using the Disco tool (ie: plus, viewer, desktop).
    2. If you want to 'pass' those date parameters into the actual folder in the EUL, then there is a method that you can use using functions you write.
    3. Or you could code the actual database SQL view with some kind of hard-coded date parameters (ie: SYSDATE - 30), etc.
    Russ

  • Passing Parameters from Forms to Discoverer

    Hello Everybody,
    Is there a way to pass parameters from Oracle Forms to discoverer 4??
    I want to call Discoverer from a Form and pass parameters to a sheet.
    Thanks

    Hi,
    I don't have 10g right now, so can't test it...
    Isn't it possible to just put the params you won't show to your users 'behind' other objects on the param form?
    Strange behaviour anyway, in 6i Reports does not seem to care wether the params are on the form or not.
    Rgds,
    Guido

  • Using shell pass parameters with space to Java

    Hi friends,
    I have a shell script accepting parameters as below
    #!/bin/sh
    #test.sh
    ./setEnv.sh
    java -classpath $CP com.rky.Main *$@*
    CP=
    If I run the script like this ./test.sh -annotation "This is a problem".
    If shell pass the parameters to Java, the parameter "This is a problem" will recognized as 4 parameters by java. That's not what I want . I still need java use it as a whole parameter.
    Do you have any easy ideas to resolve this problem out of my java code?
    Thank you.

    yes, from the bash manpage:
           @      Expands to the positional parameters, starting from  one.   When
                  the  expansion  occurs  within  double  quotes,  each  parameter
                  expands to a separate word.  That is, "$@" is equivalent to "$1"
                  "$2"  ...   If the double-quoted expansion occurs within a word,
                  the expansion of the first parameter is joined with  the  begin-
                  ning  part  of  the original word, and the expansion of the last
                  parameter is joined with the last part  of  the  original  word.
                  When  there  are no positional parameters, "$@" and $@ expand to
                  nothing (i.e., they are removed).(your manpage could be a little different because of versions, and I got this from the manpage of bash on a mac. but the main things should apply)

  • Hey guyys .if some 1 from firefox team can help it wud be great......I was using firefox 3.6.3 on Mac OS 10.5.8 and Today I installed firefox 3.0(besides application folder) but not in same application folder like firefox 3.6.3 ...so now i had 2 firefox v

    hey guyys .if some 1 from firefox team can help it wud be great......I was using firefox 3.6.3 on Mac OS 10.5.8 and Today I installed firefox 3.0(besides application folder) but not in same application folder like firefox 3.6.3 ...so now i had 2 firefox version 3.6.3 and 3.0....I had 3.6.3 already open ..i closed it to... open 3.0 ....when i opened 3.0 it asked me to import settings i said no....it opened well.....then i close 3.0 and tried to open 3.6.3 version ...now it was a problem everything got lost sessions, bookmarks, add ons, etc....it went back to default ....when i had 2 profiles in 3.6.3.....can any pls help me on dis 1...is there a way to restore my sessions, bookmarks and add ons ??? I have uninstalled 3.0 version now....??? pls pls pls ....help
    == This happened ==
    Just once or twice
    == today

    It turns out that the problem had to do with network accounts, even though it was not clear at first.  Redirecting the program to the local machine's cache with a network home redirector script fixed the issue.  Thanks anyway.

Maybe you are looking for

  • Just Installed Firefox 6.0.2 And I'm Having Many Problems On Some Web Sites When Using Firefox:

    -When I click on a picture on some sites it will go to the next page with a large view of the picture and then when I go back one page to do the same with another picture (or even the same picture) nothing happens. -Videos don't show up or on some si

  • IPod Sync Problem - syncs songs, but then no songs on ipod - space taken by other

    I recently got a new computer with Windows 7.  I installed itunes (64 bit for windows 7) and imported my songs from my external hard drive.  I automatically synced my ipod classic and once it completed got the instructions that it was ok to disconnec

  • RoboHelp project management strategy

    Morning I have some general questions, for which I doubt there are any "correct" answers, but I'm sure people will have useful to say all the same. First, some background information. I have used RoboHelp before (version 8) to manage a handful of sma

  • Oracle database on ASP model - question

    my orale 8i database is running on sun solaris and the whole front end is an ASP model product. for every customer we have separate schemas and the same set of all database objects are there in every schema. this is going well. my questions is: inste

  • Dynamically calculating values and validating in reports

    Hi I need to be able to calculate and display the running total of column (representing a % - sales allocation) within an updatable report as the users steps off the row after making a change to the allocation. Greatful for your suggestions on ways o