How do I pass a local variable as a parameter to a JSP Tag File?

I wrote a custom JSP tag file, and I want to pass a local variable to it through a parameter, like this:
<% Integer someValue = new Integer(-5); %>
<my:TestTag value="someValue"/>
This doesn't work though - the result is the string someValue. Trying to do this doesn't work either:
<% Integer someValue = new Integer(-5); %>
<my:TestTag value="someValue"/>
the value attribute ends up being null.
I know I can work arount by putting the local variable in the request attributes then using ${}, but that seems like a lot of unecessary work. Does anyone know I can just pass a local variable to the custom tag through the custom tags parameter list?

I'm far from beeing an expert, but this may be a clue (?)
Basically, the rule is: everything you want to be considerred as Java must be in a
JSP tag.
As an example, think of how you would do to pass the litteral string "someValue" otherwise. Then you may imagine other related issues...

Similar Messages

  • 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 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 you create a local variable from a boolean control?

    I want to create a local variable from a boolean control, but it says that boolean latch actions are incompatible with local variables, but I need a way to check this boolean control in two differents loops, how can I do it?

    "Graci" schrieb im Newsbeitrag
    news:[email protected]..
    > I want to create a local variable from a boolean control, but it says
    > that boolean latch actions are incompatible with local variables, but
    > I need a way to check this boolean control in two differents loops,
    > how can I do it?
    Use global variables.
    Compare them with a constant Boolean like F or T.
    The result is true or false and then you can use it in a Cae-Loop.
    Martin

  • How do you pass a TES variable in a REST call?

    I am trying to create an email action using the EmailAction.create REST call.  I am able to successfully create an email action, but I cannot get it to work while trying to pass a TES variable (i.e. <JobName>) in the message body.
    Does anyone know how tis is done?

    Here is the XML code:
    <?xml version="1.0" encoding="UTF-8" ?>
    http://purl.org/atom/ns#">
        3
        HTTP
        http://www.tidalsoftware.com/client/tesservlet">
                EJS
                            [email protected]
                            Test Api
                            This is a test, only a test of the rest API.
                            [email protected]
                            test3_email
                            5
                            N
    In the I wnat to pass .

  • How to solve error using local variables?

    I've created a sequence with a local variable.
    But when I execute it, an error occurs since the first step (before the step where I manipulate the local variable).
    The error code is something like:
    Error in Evaluation. Syntax expression. Column [0-0]
    It's interesting because it seems that once I've executed my sequence for the first time I can't create any other sequence where this error doesn't appear.

    Pparo,
    The problem does not occur under TS 1.0.3 on my system. However, I think we can get to the bottom of this.
    When at a breakpoint in your sequence, if I type the expression "Locals.nls == 15-" in the TestStand watch window, I will get the message
    Evaluation Failed: Syntax error in expression (Column 18-18)
    I believe that this is the same type of error that you have encountered. Correct me if I am wrong.
    The numbers after the word "Column" indicate where the error has occurred in the expression. In your case the error occurs at the beginning of an expression. The question still remains as to in which expression is error occurring.
    Are you seeing this error reported in the watch window? If so, then you have typed the expression in the watch window.
    If I copy the bad expression above into a the expression of a Statement step I get a run-time error of
    An error occurred in the 'Statement' step of the 'MainSequence' sequence in 'Sequence File1'.
    The post-expression for the step 'Statement' could not be evaluated.
    Syntax error in expression.
    Error Code: -17322
    From what you report, the error appears to be located in your watch expression. When I executed your sequence with a breakpoint on the first step, I added the watch expression by selected the Context tab, expanding the Sequence Context tree view until I could see the nls variable, and then I dragged nls from the tree view to the watch window. This created the watch expression of Locals.nls. I also created the same watch expression by right clicking in the watch window, selecting Add Watch from the context menu, and selecting (or typing) Locals.nls. The expressions all evaluated to 24 without error.
    This process has NOTHING to do with creating local variables. You asked if you are creating variables properly. There are only 2 ways to create variables in TestStand 1.0.3, neither of which you have described. The most common method is to select the Locals tab after opening your sequence (not during execution), right click in the right pane and add the variable of your choice. It seems like you did this correctly based on the sequence file you sent. The other method of creating variables is to do so programmatically. However, this is beyond the scope of this answer.
    You ask a question about "the best way to create three constants in LabVIEW and pass them to a LabVIEW VI that is a step?" This implies to me that you want to create the strings within a VI called by one sequence step, and then use them in another VI called by a different sequence step. I would recommend taking a look at the example AccessingPropertiesAndVariables.seq that ships with TestStand. The first 3 VIs write values back to step properties, but could just as easily write them back to local variables. The 4th VI writes a file reference back to a TS local variable. The 5th and 6th step get the file reference from the TS local variable. You want to do something similar to the 4th and 5th VI, however, you want to send 3 strings to local TS variables, and then get them in the following VI. This will require using "TestStand - Set Property Value (String).vi" and "TestStand - Get Property Value (String).vi" which can be found in the TestStand function palette in LabVIEW. After reviewing this example you can then ask additional question. I recommend posting the question on a different thread since it is unrelated to your original question about the syntax error.

  • Vb6 - How do I Pass a single variable - CR XI

    I have a vb6 application that retrieves data from an ACCESS DB.  I would like to pass a single variable programatically to an .rpt file loaded into form containing a crviewer object.  The ultimate goal is to generate a report based on a single record identified by the variable.
    This has been killing me for days.  Any help is appreciated.

    Not sure I understand the query, but you can pass any value to an already existing formula, empty or not. Would that work?
    Ludek

  • How to add a new Local Variable for DataBase Logging?

    Hello
    I need to add a Local sequence variable to my STEP_RESULT table, i know i need to modify the schema by adding a new column but not sure on what to write in "Expression" to access the value of local variable. 
    Please reply asap, as its a little urgent.
    Regards
    Nitin Goel

    Hi
    you can read this here:
    http://digital.ni.com/public.nsf/allkb/F5ADBC61222343B586256CE00055E6D6?OpenDocument
    Regards
    DianaS

  • How to assign my custom VBA variable to a parameter

    I want to be able to assign the value from my custom variable to a parameter from a script;
    but I cannot figure out if it is possible;
    I want to be able to manipulate a string using my VBA code, save this string to a variable, and pass it back to a one of the parameters on a page in a scripts, and continue playing the script with this new value instead, without using Data Bank;
    Thank you for help.

    Here is an example that sets a parameter named "UserName."
    Private Sub RSWVBAPage_beforePlay()
    Dim col As New Collection
    col.Add "MyName"
    RSWApp.SetParameterValues "UserName", col
    End Sub
    As you can see, this code is in the before play event. You must put this in before play in the page where the parameter exists. You can also use wild cards when identifying the parameter to be set.
    For example, if you needed to look for UserName_784328732 (with a changing number value)
    You could do the following RSWApp.SetParameterValues "UserName*", col
    I hope this is helpful

  • How Can I Pass a Bash Variable to AppleScript?

    Here's the deal. I'm used to just using sudo to edit files I don't have write access to, but the mate command doesn't work with sudo, so I end up entering my password twice (once with sudo and again when I want to save the file). To get around this I decided to sidestep the mate command completely and write my own script that will let me open TextMate either normally or as root using sudo. Here's what I have so far:
    #!/usr/bin/env bash
    tm=`ps ax | grep '[T]extMate'`
    if [ "$tm" = ""]; then
    /Applications/TextMate.app/Contents/MacOS/TextMate &
    fi
    osascript << EOT
    tell application "TextMate"
    activate
    open "$@"
    end tell
    EOT
    I originally tried just passing the files as arguments directly to the TextMate executable, but for some reason it opens them all as blank files instead of opening the existing files, so I figured I'd use AppleScript to open them once the application is open. The problem is that "$@" doesn't return all the arguments passed to the script, and I don't know what the AppleScript equivalent is (if there is one), so I need a way of passing that value directly to my AppleScript so I can tell it which files to open. I have no idea how to do that, though. Any ideas?

    That's exactly what the mate command does, and as I said, that's not what I want. I can't run TextMate with sudo and get root privileges that way because open will be run as root but the actual application itself will still be run normally. The only way I can open an app with root privileges (that I know of) is to use sudo to run the executable inside the app directly (sudo /Applications/SomeApp.app/Contents/MacOS/SomeApp). Opening it that way lets me open multiple instances of the same app, though, so I have to check if it's already open, and it doesn't bring the app to the front, so I use AppleScript to do that. Then once the app is running, I open the files in it. This way I can run the script with sudo and edit files that I don't have write privileges for without TextMate asking me for my password when I want to save them.

  • How do I pass multiple Applescript variables to next Automator actions/variables?

    I am writing an Applescript in Automator to do several things, but at the end of the Script, I want to pass the files selected in <choose file ..... multiple selection allowed> early in the Script back into Automator as results of the Script. Say I, <set theFiles> to choose file ..... multiple selection allowed>   and later, <result {POSIX path of theFiles} >, if I have selected multiple files, then when Automator recieves the results it runs the names all together!  How can I fix this?

    Choose file returns a list of aliases to the files chosen so not sure what you are doing to that list in the AppleScript before returning it but if you return a list to Automator it will handle it
    As a simple example
    The script runs a choose file and returns the list. The following Automator action accepts the list and preforms it task, in this case copying the files selected in the AS.

  • How do I import a localized variable library?

    Hi all,
    I am setting up illustrations for localization and am running into a problem with loading a modified variable library; for instance, one that has been translated. I getting the message "The incoming variable library is invalid".
    I can't seem to find any information on what to do after:
    -linking and adding variables and objects in the Variables panel
    -taking a snapshot
    -saving the variables library file
    -copying and translating the variables library file
    Thanks!

    I know this is an old thread but i had this problem and a Google search brought me here. Carlos, had a post in another thread, that let me FINALLY get my variables to work. In case anyone else searches for the same problem, this might help.
    My problem was same as OP: creating an xml in excel and loading into illustrator variables window, i got this error message "The Incoming Variable Library is Invalid"
    Pulled my hair out for a weekend and finally saw the thread i linked in the first paragraph and realized that illustrator just doesn't work well with excel xml files. So here's what i did (note: when i say Excel, it can be any excel-type program i believe):
    1) In Excel, Row 1, create headers for the columns as 1-word headings ("phonenumber" instead of "phone number"). These are going to be your Variables and need to be unique.
    2) In Excel, make sure your first column is full of unique data, these will become your Data Sets. I originally had "Color" set as the first column and there were several "Blue" rows so that kept giving me errors, (if you aren't sure, you can use the conditional formatting button to highlight the duplicate values in excel).
    3) Ok, fun part, highlight all the cells copy them (ctrl+C, cmd+c, or right click>Copy)
    4) Open this link that Carlos provided in the thread i linked at the top: Conversor Excel(CSV) – XML Illustrator the page is in portugese but you don't need to read it so don't worry if you can't speak portugese.
    5) Paste (ctrl+v, cmd+v, right click>paste) the cells you copied from excel into the top box.
    6) Highlight the text in the bottom box, copy it, and paste it into Notepad, TextEdit, or whatever your favorite text editor is.
    7) Save the file as xml (in notepad you just type .xml at the end of the file name.
    8) In Illustrator, click the arrow in the variable window, then click "Load Variable Library"
    9) The variables should now show up in the list.
    Yay! Now you should be able to work with variables and data sets.

  • How can i keep a local backup copy of all our employees company email files in a single location. I believe this is called Journaling?

    We are legally required to store all communications between any employees' and their clients for a period of 7 years.   When we used Outlook 2010 this was not a problem with the PST file format.  However our recent change to Exchange
    server now leaves me with OST files which can only be opened by the original account.  Normally, this wold not present a problem but i can foresee possibilities where it might.
    Seven years is a long time and the original account in question could long since have been removed.  With PST files, it ewas a simple matter to open  them using the mail-admin account long enough to export any documents that were required
    but from what I have read this may not be possible with OST files.  
    Additionally, Exchange server OST files can reach sizes up to 50 GB and the conversion from OST to PST seems to add about 10% or more of size.  This could end up with a converted PST that would be over the size limit of any version of Outlook.
    What is the correct procedure to take in order to achieve this ability to keep backups in some format that they could be searched for specific criteria and exported for printing in order to meet these legal requirements.

    You are correct in that Journaling is probably the feature you want to use here.  Trying to PST and OST file gives you no guarantee that the messages are all there or have not been modified by the recipient.
    If you are using Exchange on-premises, you can configure journaling to a journal mailbox or a third-party appliance or cloud service.  If you are using Exchange Online, you cannot journal to a cloud mailbox and your options there are to configure journaling
    to an on-premises mailbox or third-party service.
    An alternative would be to keep all messages in the mailboxes themselves using something like Litigation Hold.  Even if a user deletes or modifies an item, it would be stored in the hidden "Recoverable Items" folder and would be accessible
    via the native eDiscovery tools.
    Joseph Palarchio http://www.itworkedinthelab.com

  • Passing local variable to subsequence

    I have a sequence that sets a local variable, Locals.LowPassFreqGhz = 1.800. 
    Then it runs 5 subsequences.
    The Local is set to a new value and then the same 5 subsequences are run again.
    Now I have new model numbers where the pair is different and soon will have models where there will be groups of 4 frequencies instead of two. Therefore I would like to put the 5 seqs into a subseq and pass the freq based on a select statement. In my limited understanding and knowledge of TestStand I think the subsequence would have its own Local.variables. How should I pass this local to a subsequence, convert to a File.global?
    thanx,
    jvh 
    Solved!
    Go to Solution.

    there is another way also to  
    Teststand give us an option of "Propagation" of a  variable to subseqeunce.
    we need to  create a local variable both in main and sub sequence with same name and use "Propogate to subsequence" in main seqeunce and " allowpropagation from caller" in sub seqeunce.
    This option of propagation one can see by right click of a variable in variables pane. This allows us to get the values of variables in main seqeuence to sub seqeunce.
    But need to remember that both variable names in main and sub sequence should be the same.
    Regards,
    Praveen.

  • How to create a local variable in bpel?

    Hi,
    In my bpel flow I need to call service based upon a pl/sql procedure multiple times. The procedure returns the results of a query in chunks and contains a boolean as an output parameter that tells me whether there are any more records that need to be fetched based upon which I will be calling the service again. I want to achieve this using a while loop. So for the while loop condition I am thinking of creating a local variable in the bpel process and assign it an initial value of false(). Then once the service is called I will set the value of this variable to the output boolean parameter returned by the procedure. So while the boolean is true the service will be called again.
    My question is how can I create a local variable in bpel and assign it an initial value of false. Or is there any other way that this can be achieved?
    Thanks!!

    Hello! thanks for yr response.
    I tried creating a new variable by defining a scope. But in the create variable window I cannot define a standalone variable of boolean type I need to pick up the type from an lov that brings up a list of all existing variable! so basically u are just mapping to an existing variable which in my case will not work because I will need to map to one of the elements of the output of the pl/sql procedure based service -- also this element itself is not exposed in the lov only the name "inputParameters" is displayed as the element --all the contents are not exposed.
    Any suggestions?
    Thanks!

Maybe you are looking for

  • Deploying JWS with Eclipse Tools Bundle

    Hi all, I'm trying to write a document describing the steps to follow in order to make and build an Hello World application, launchable from a JNLP template provided by the server. Here is a summary of the different steps I mentionned : - Install Ecl

  • Unable to Activate a DTP

    Hi Gurus, I have just activated a Datasource but while creating a DTP its giving me an error. Here is the screen shot:- Can anyone please help? Regards

  • CD drive no longer available after installing iTunes

    I have windows XP. Once iTunes has been installed, the CD-Rom drives cease to be available in the windows explorer. I'm not desperate to run iTunes, that wonderful software. X X X Nadine

  • Contact Picture Droid X

    How can I set a picture that I have downloaded from an email into the phone files to a contact pic?  I go through the same steps as setting one from the gallery except that I select "files".  Works fine when I select a gallery photo, but not when I c

  • Help to modiy few swf file

    hi, can anyone help me out pleaes? i have few slide show SWF file, what use embeded image to show the slide show.. what i want? i want some one who can modify that swf file so that it will .. load image file from file and make the necessary change to