Passing parameter with space?

How does java pass parameter value with spaces? e.g. url?param1=value with space .
Is there any built in method like PHP's addslashes?
Thanks.

URLEncoder.encode("value with
space","UTF-8")Also the core JSTL tag c:url will encode parameters with spaces, and of course there's the crude way of just using the + sign.

Similar Messages

  • Passing arguments with spaces through to asc.jar

    According to the docs, we can pass arguments through to llc using -fllvm-llc-opt.  Additionally, with llc we can pass arguments through to asc.jar using -ascopt.  Let's say I want to define an AS3 variable in my flascc swf/swc.  asc.jar says that I can do this using "-config <ns::name=value>".
    So it seems like I should be able to do this:
    gcc ... -fllvm-llc-opt=-ascopt=-config CONFIG::RELEASE=true
    But this doesn't work, as the "-config" parameter takes its next argument via a space and not an equals, which throws the whole thing off.  gcc thinks its another argument.  Trying it with spaces like this:
    gcc ... "-fllvm-llc-opt=-ascopt=-config CONFIG::RELEASE=true"
    also doesn't work.  The toolchain outputs:
    Error:
    LLVM ERROR: Failed to run /usr/bin/java with args:
    -Xmx1500M -jar /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/asc2.jar -merge -md -abcfuture -AS3
    -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/builtin.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/playerglobal.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/BinaryData.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/Exit.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/LongJmp.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/ISpecialFile.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/IBackingStore.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/InMemoryBackingStore.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/IVFS.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/CModule.abc
    -config CONFIG::RELEASE=false -d /var/folders/cn/hjz9nbt53bdfpn1rzn6wdb900000gr/T//ccQPoczK.lto.2.as /var/folders/cn/hjz9nbt53bdfpn1rzn6wdb900000gr/T//ccZDGxMF.lto.1.as -outdir . -out output
    As you can see, the "-config" command made it to asc.jar.  What I think is happening is that its being passed to asc.jar as one argument (not two).  For example, I can copy-paste this command into bash and it will work-- just not when done from gcc.
    So: how do I pass arguments with spaces through to asc.jar?

    I believe you should be able to do this by splitting it across two fllvm-llc-opt flags:
    gcc ... -fllvm-llc-opt=-ascopt=-config -fllvm-llc-opt=-ascopt=CONFIG::release=true
    The Makefile in the 12_Stage3D sample that ships with the FlasCC SDK demonstrates this.

  • RWCLIENT issue when passing parameters with spaces

    AS 10.2.0.2 on Sun Solaris 10. We have reports that are scheduled and sum of the parameters have spaces in the value. For example parm1=I am with spaces. We would then generate a command line that shows the parameter like rwclient.sh server=rep_serv report=report1 parm1=I am with spaces. This errors with numerous messages. I tried surrounding the value in single quotes like this rwclient.sh server=rep_serv report=report1 parm1='I am with spaces'. When running the quoted command the report server shows the parameter as parm1='I' am with spaces. We have the parameter page of the report as the first page which allows us to see what was actually used as parameters. Of course the data in the database has no value that matches with the single quotes so no data. I need to be able to pass a value with spaces and it actually show as a parameter with spaces. We do not have this issue when we can run with forms built-ins as you actually build a parameter list to pass. Thanks in advance.
    Edited by: gdaustin1 on Jan 26, 2012 8:03 AM

    It's a bit of both I guess. On a command line a space is used to separate switches and variables. Like this demo.bat:
    @echo off
    echo %1Results in:
    C:\Temp>demo.bat Hello World
    Hello
    C:\Temp>demo.bat "Hello World"
    "Hello World"If you want to remove the double quotes, you have to change your source code to:
    @echo off
    echo %~1Now you get:
    C:\Temp>demo.bat "Hello World"
    Hello World

  • Passing parameters with spaces in Oracle reports

    I hav a system that passes a query string to a servlet and generates an Oracle Report. All of the varibles worked Ok as long as they don't have spaces in them. Whenever a parameter with spaces is encountered,it generates an error. i tried to enclose it in single or double quotes but it didn't work. I also tried to insert the Url Encode for spaces which is %20 but it also generated an error. pls help me on this one...

    I suppose you're working with GET instead of POST. Try to use the POST method; this gives you the possibility to work with a URL without parameters behind the question mark. This might be the solution to your problem.

  • Pass parameter with apostrophe

    Hi,
    How I can pass parameter with apostrophe to a store procedure.Whats the change i need to make to ' when i am passing.
    Thanks in advance.
    Pramod

    If you are using bind variables, the string should be escaped automatically. If you are not using bind variables, you should be using bind variables.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Passing parameter with apostrophe to sp

    Hi,
    How I can pass parameter with apostrophe to a store procedure.Whats the change i need to make to ' when i am passing.
    Thanks in advance.
    Pramod

    just use double apostrophe
    SQL> var x char
    SQL> exec :x := '''';
    PL/SQL-Prozedur wurde erfolgreich abgeschlossen.
    SQL> print x
    X
    '

  • Pass parameter with blank space for report ver 6

    Hi,
    I face a problem that i willing to pass the acno where it's value with blank space, for example ' 9' as parameter into my report, and assign it as v_acno. Inside the report query i add a where condition, acno >= :v_acno. When i run the report and pass acno without ' , it do not show any record. But when i run the report and pass acno with ' then able to show the records.
    for example the value i key in
    with ' = ' 9'
    without ' = 9
    So how i can solve it by pass the acno without ' but the record still able to show?
    thks
    Message was edited by:
    user569740
    Message was edited by:
    user569740

    Hi Nick,
    It occurs because an argument of the DTExec commands must be enclosed in quotation marks if it contains a space. From the dtexe (SSIS Tool): Syntax Rules section of the
    dtexec Utility (SSIS Tool) document, we can see:
    All options must start with a slash (/) or a minus sign (-). The options that are shown here start with a slash (/), but the minus sign (-) can be substituted.
    An argument must be enclosed in quotation marks if it contains a space. If the argument is not enclosed in quotation marks, the argument cannot contain white space.
    Doubled quotation marks within quoted strings represent escaped single quotation marks.
    Options and arguments are not case-sensitive, except for passwords.
    So, you need to make the value of the variable @QUERY_STRING within double quotes in the value of the variable @Cmd or remove the space within the @QUERY_STRING value.
    Regards,
    Mike Yin
    TechNet Community Support

  • Passing text parameter with spaces to oracle forms function

    Hi,
    I have a personalized link in R12.1.3 from OAF to a custom form, which is working fine:
    Item Style = Link
    Destination URI = form:PO:XXPO:STANDARD:XXXABC03:VENDOR_ID={@VendorID} QUERY_MODE=No
    View Instance = SupplierVO
    XXPO is the responsibility key, and PO the responsibility application
    XXXABC03 is the function name
    VENDOR_ID and QUERY_MODE are the form parameters
    This link works as expected.
    I have a problem passing a text parameter containing spaces. The Oracle Application Framework Developer's Guide
    Release 12.1.3 states the following
    Note: If you wish to send varchar2 parameter values that contain spaces, use \" to enclose the string value. For example, to pass in something of the form:
    TXN_NUMBER=LT INVOICE 1
    Use:
    TXN_NUMBER=\"LT INVOICE 1\"
    So my personalization becomes
    Item Style = Link
    Destination URI = form:PO:XXPO:STANDARD:XXXABC03:VENDOR_ID={@VendorID} VENDOR_NAME=\"{@VendorName}\" QUERY_MODE=No
    View Instance = SupplierVO
    But the problem is that the spaces in the vendor name parameter are replaced with %20 when the form opens, e.g. EXAMPLE%20SUPPLIER%20LTD instead of EXAMPLE SUPPLIER LTD
    Has anybody got this type of personalization working? Thanks in advance, Ruth
    Additional Note:
    In real life I have created a workaround for this example. I just pass vendor_id and have modified the XXXABC03 form to derive vendor_name from vendor_id. But I now have another requirement where the parameter WILL have spaces.
    In desperation I may add a function to the form to replace %20 with a space in text parameters.
    But it would be nice if Oracle worked how it is explained in the manual......

    Hi,
    I'm not sure if there is a built in function. Else, Javascript code would be necessary.
    Using the technique in the link below will do.
    http://www.java2s.com/Code/JavaScript/Form-Control/Jumptothenextfield.htm
    Unfortunately, it doesn't seem like that tabIndex attribute is supported in ADF Faces. Link below.
    ADF Faces setting the tab order between fields
    They are suggestions to use the <h:inputText> component instead but not sure if that is supported and if other problem may occur.
    Regards,
    Chan Kelwin

  • How to write c# to pass parameter with craxddrt.dll?

    any example provided to open crystal report by passing parameter
    after add reference craxddrt.dll etc.
    for 8.5 report

    [Samples|https://wiki.sdn.sap.com/wiki/display/BOBJ/ReportDesignerComponentSDKCOM+Samples].
    Also check your Developer Help file...
    Adn as Don said, unless you have obtained license for craxDDrt.dll, you are breaking your agreement. Use craxDrt.dll...
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Passing parameters with spaces to SCCM Run PowerShell Script task

    I am working on an OS deployment task sequence in SCCM 2012 R2 with several Run PowerShell Script tasks.  Most of them run fine, but I am having trouble with the one I need to pass parameters to.
    The parameters I need to pass are:
    -ComputerOU "ou=All Workstations,dc=contoso,dc=com" -GroupDN "cn=Group1,ou=All Groups,dc=contoso,dc=com"
    I have that line (with actual DNs) entered in Parameters of the task.
    But when the script runs on the target machine, the values of the parameters in the script are truncated at the spaces.  $ComputerOU is set to "ou=All" and $GroupDN is set to "cn=Group1,ou=all"
    What syntax should I be using the Parameters field of the Task in order to properly pass PowerShell parameter string values that include spaces?
    Tim Curwick
    MadWithPowerShell.com

    Thank you, TC, but I am not calling the parameters from within PowerShell.
    The parameters are in the settings of a task sequence task to be used by the task to launch a script.  The syntax I am using would be correct for use within PowerShell or from a command line or batch script, but SCCM appears to be doing some parsing
    before or while it is passing them to the script, possibly dropping the quotes which causes mishandling of the spaces in the string values.
    Historically, it is always challenging to give one application parameters to pass to another application, and the required syntax can get quite tricky when the two application handle quotes or spaces differently, or when the parent application wants to parse
    something intended to be passed on as is to the child application.
    I'm sure someone has already figured out what the syntax needs to be for doing this with an SCCM 'Run PowerShell Script" task, it's just one of those issues that is hard to Google effectively.
    Any other ideas?
    Tim Curwick
    MadWithPowerShell.com

  • How to do a Get-ADGroup and pass SamAccountName with spaces

    Hi,
    I read a text file of groups in SamAccountName form into a variable, then do a Get-ADgroup to ensure they are in a specific SearchBase, then I want to delete them if found in the Searchbase.  Problem is the SamAccountNames have spaces in them
    and I cant figure out the right syntax in the Get-ADGroup for the $Group variable to accomodate the spaces, or put quotes around the $Group variable.  Examples of SamAccountNames are Accounts Payable and LDW URP 
    $EGroups = Get-Content c:\MyGroups.txt
    [int]$counter = 0
    Foreach ($Group in $EGroups) {
    Try {
    $counter++
    $DMGroup = Get-ADGroup -Filter {SamAccountName -eq $Group} -SearchBase "OU=Test,DC=Acme,DC=Com" -SearchScope Subtree
    Remove-ADGroup $DMGroup -Whatif
    $Group | Out-File $env:HOMEPATH\EGroupsRemoved.txt -Append
    Catch {
    $Group | Out-File $env:HOMEPATH\EGroupsNotRemoved.txt -Append
    Write-Host "Processed $counter Groups"
    Thanks for your help! SdeDot

    If you're using the SamAccountName then I would recommend you use the parameter set that allows you to provide it to the -Identity parameter, not the -Filter parameter. You can see the three parameter sets if you do a Get-Help Get-ADGroup and look in the
    Syntax section. The example below will read in groups listed in a text file, even if there are spaces in the groups, and return information about each of them as they pass through the Get-ADGroup cmdlet. You'll definitely want to keep your try-catch blocks
    in place to help gracefully handle any issues where a group cannot be found in the directory.
    Example Text File
    ADMIN-Front Office Staff
    ADMIN-Front Office Students
    $Groups = Get-Content -Path 'C:\GroupFile.txt'
    Foreach ($Group in $Groups) {
    Get-ADGroup -Identity $Group

  • Pass parameter with fscommand exec

    Hi,
    I am writing a text file with batch file and this batch file which is called from fscommand.
    I need to pass a parameter from fscommand. Is is possible ?
    Following is flash and batch file code.
    Flash Source
    import flash.events.Event;
    bt.addEventListener(MouseEvent.CLICK,save);
    function save(e:Event){
        fscommand("EXEC","write.bat");
    Batch file
    ECHO This is my new text1 %1 > "temp.txt"
    Thanks ------------------- Amit

    As mentioned in one of your other posts you could use FileReference.save(...) this does require user interactive however and Flash Player 10.
    Alternatively you could create a userId and save the data in an online database (but obviously this isn't local)
    If you are using AIR you could create a local database
    Otherwise I don't do not know of a way to achieve what you are after

  • Can I Pass String with Spaces in it To exec()

    Hello All,
    I am passing a Command in Runtime.exec() method, which is a String and contains a folder name(Folder---Name) which is having Spaces in it. For eg. c:/Folder/Folder(Spaces in between)Name/Data.java
    My Problem is when i pass it to exec() it automatically gets converted to a Folder name with only one space
    E.g c:/Folder/Folder(One Space in between)Name/Data.java,
    Because of which my command is not able to find the Folder specifed.
    I want the Original Path(c:/Folder/Folder(Spaces in between)Name/Data.java) to be passed and executed through
    exec() so that the command runs successfully..........
    Any help will be highly appreciable..
    Thanks
    Er.Atul

    When I make a simple array of String a, Try to run simple command like "change Directory"....
    *try {*+
    String[] a = {"cd atul", "cd poc"};+
    Runtime runtime = Runtime.getRuntime();+
    Process procedure = runtime.exec(a);+
    +*} catch (IOException ex) {*+
    Logger.getLogger(Testing.class.getName()).log(Level.SEVERE, null, ex);+
    It Gives me this type of Exception............
    Feb 20, 2009 5:13:36 PM Testing <init>
    SEVERE: null
    java.io.IOException: Cannot run program "cd atul": CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
    at java.lang.Runtime.exec(Runtime.java:593)
    at java.lang.Runtime.exec(Runtime.java:466)
    at Testing.<init>(Testing.java:26)
    at Testing.main(Testing.java:36)
    Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
    at java.lang.ProcessImpl.start(ProcessImpl.java:30)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
    *... 4 more*

  • READURL Call on Macintosh, won't pass variables with spaces???

    Here is my code and the problem. I am trying to passing a
    tablename and a classname with READURL and the PHP script takes the
    info and returns to me my classid. This works wonderfully on the
    PC, but on the MAC, when I click on a classname with a space I get
    back a empty string as my return value.....here is my code from AW
    and PHP......If you can help I would readlly appreciate it.

    http doesn't like spaces in URLs.
    This clicking on a classname -- is that happening on a web
    page, or in AW?
    Either way, you should urlencode the link. Replace any spaces
    in the URL
    with + signs, either manually on a web page, or by using the
    replace
    function in AW [replace("", "+", string)]. Then, in your PHP
    script, you can
    change the $_classname assignment to include urldecode:
    $_classname = urldecode($_GET["classname"]);
    This should return it to the multi-word format.
    Paul Swanson
    Portland, Oregon, USA
    "bradsteele" <[email protected]> wrote in
    message
    news:[email protected]...
    > Here is my code and the problem. I am trying to passing
    a tablename and a
    > classname with READURL and the PHP script takes the info
    and returns to me
    my
    > classid. This works wonderfully on the PC, but on the
    MAC, when I click
    on a
    > classname with a space I get back a empty string as my
    return
    value.....here is
    > my code from AW and PHP......If you can help I would
    readlly appreciate
    it.
    >
    >
    >
    > getClassID.php code ....
    >
    > <?PHP
    >
    > // MAKE THE SCRIPT NON_CACHEABLE
    > header("Expires: Mon, 26 Jul 1990 05:00:00 GMT");
    > header("Last-Modified: " . gmdate("D, d M Y H:i:s",
    time() + 300) . "
    GMT");
    > header("Cache-Control: no-cache, must-revalidate");
    > header("Pragma: no-cache");
    >
    > // SET VARIABLES
    > $_table = $_GET["table"] . "_classes";
    > $_classname = $_GET["classname"];
    >
    > // LOGIN TO THE DATABASE
    > mysql_connect("localhost", "user", "user") or
    die("Cannot connect to
    DB!");
    > mysql_select_db("trek") or die("Cannot select DB!");
    >
    > // GET CLASS ID
    > $sql = "SELECT classid FROM `$_table` where classname =
    '$_classname'";
    > $r = mysql_query($sql);
    >
    > // IF MORE THAN 1 ROW, THEN PRINT FALSE (ERROR)
    >
    > while ($row = mysql_fetch_assoc($r)) {
    > $query = $row['classid']; }
    > print $query;
    > ?>
    >
    >
    > AUTHORWARE 7.02 CODE BELOW:
    >
    > -- Get the Class ID
    > if NetConnected then
    > www_action := "?action=getData"
    > www_query :="&table=" ^ tablePrefix ^
    "&classname=" ^
    LowerCase(ClassName)
    > www_URLString := NetLocation ^ "getClassID.php" ^
    www_action ^
    www_query
    > www_ClassID := ReadURL(www_URLString, 10)
    > end if
    >

  • 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)

Maybe you are looking for

  • How to get the "delete" check box back?

    Hi Guys, I just used the "Migrate to Interactive Report" feature. After doing so, the check box is gone that is used to indicate rows to delete. A copy of the region is marked as "disabled" and the check box is still there, but it's not in the newly

  • JSF errors in Weblogic

    I'm deploying an application to WebLogic 9.2. The application was originally created for JBOSS and includes JSFs. I corrected some of the errors, but now when I try to access a webpage within the main jsf, I receive the following error: The attribute

  • Prepayment exceeded invoice amount, a refund is received. How 2 handle this

    I made a prepayment of $100 to a vendor. The invoice I later received from the vendor was $70. The vendor then sent me a refund for the difference between the prepayment amount and the invoice amount (that is $30). 1) How can I treat this refund from

  • How to find resistance, capacitance, inductance of an unknown circuit

    Hi,   How to find resistance, capacitance, inductance of an unknown circuit or how to configure a LCR meter in LabVIEW

  • Still trying to insert my photo into Avery template

    Thank you I was able to turn the background to white.  However I am still trying to figure out how to insert my image into this template so I can then have photoshop manage the color and print it with my Epson 3800 printer.  When I click on the templ