In tag body how to access variable defined outside?

Suppose the following jsp fragement: <% String x = "wwlhp"; %>
<c:mytag>
  want to use variable x defined above
</c:mytag>  anyone have ideas about which approach should i take? Thx a lot!

Sorry, I have made a terrible mistakes:).

Similar Messages

  • How to Access Variables defined in the PopUpWindow

    Hi Friends
    I am building a flex site using flex builder 2.....
    Here I need your help.....
    My Problem is how to store a variable from a popup window
    I have this problem while in the login window comes as popup
    while clicking login button in the page a popup where user
    can enter username and password...
    after submitting if the login is successufl the popup
    vanish...
    After a successful login I need to store the logged user name
    in the main index page but I am not able to store
    At first I created a variable 'loggedUsername' in the popup
    panel and after success log i assigned the username to it ... after
    it i am not able to get the loggedUsername..
    doubting I defined the variable in the main index.mxml page
    but this variable is not accessible from the loginwidow.mxml page
    where the popup will function...
    Heip me
    how to store the name if the user login is success..
    thanks
    Chintu...

    Lets say you have a public property in your application like
    public var name:String = "John Smith";
    to access this using an inline item renderer:
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox>
    <mx:TextInput text={outerDocument.name} />
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    To access variables of the applicaton you can use
    Application.application.name (for example) to reference "global"
    variables, so you might also use this technique. With an inline
    item renderer, the outerDocument property will refer to the
    component which contains the renderer.

  • How to access variables outside user exit

    Hi,
    I'm working with a user exit and my problem is that in a particular moment I have to access variables located outside the scope of the user exit (they are in a standard program)
    How can I reach these variables?
    thanks in advance

    Hi,
    If they are global variables then you can access them using Global assign technique,
    For example,
    FIELD-SYMBOLS: <fs_value> TYPE ANY.
    ASSIGN ('(SAPMV45A)XVBAK') TO <fs_value>.
    It is basically,
    ASSIGN ('(<Std. Program Name>)<Variable name>') TO <field symbol>.
    NOTE: To make sure they are accessible in your user exit, just put a break-point in the user exit and once you are there in debugging, type in,
    (<Std. Program Name>)<Variable name> in the Field names section and if it does not show it in RED then it is accessible..
    Hope this helps.. 
    Sri
    Message was edited by: Srikanth Pinnamaneni

  • How to access variables declared in main mxml in itemrenderer files

    Hi,
    I have a main mxml which has a cutomRenderer that defines two
    mxml components
    namely raidobutton and textinput.
    Now in this TextInput.as i need to access variable defined in
    main mxml.
    Please suggest a way.
    Thanks,
    Lucky

    Lets say you have a public property in your application like
    public var name:String = "John Smith";
    to access this using an inline item renderer:
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox>
    <mx:TextInput text={outerDocument.name} />
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    To access variables of the applicaton you can use
    Application.application.name (for example) to reference "global"
    variables, so you might also use this technique. With an inline
    item renderer, the outerDocument property will refer to the
    component which contains the renderer.

  • How to access variables declared in java class file from jsp

    i have a java package which reads values from property file. i have imported the package.classname in jsp file and also i have created an object for the class file like
    classname object=new classname();
    now iam able to access only the methods defined in the class but not the variables. i have defined connection properties in class file.
    in jsp i need to use
    statement=con.createstatement(); but it shows variable not declared.
    con is declared in java class file.
    how to access the variables?
    thanks

    here is the code
    * testbean.java
    * Created on October 31, 2006, 12:14 PM
    package property;
    import java.beans.*;
    import java.io.Serializable;
    public class testbean extends Object implements Serializable {
    public String sampleProperty="test2";
        public String getSampleProperty() {
            return sampleProperty;
    }jsp file
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="java.sql.*,java.util.*"%>
    <html>
    <head>
    <title>Schedule Details</title>
    </head>
    <jsp:useBean id="ConProp" class="property.testbean"/>
    <body>
    Messge is : <jsp:getProperty name="msg" property="sampleProperty"/>
    <%
      out.println(ConProp.sampleProperty);
    %>
    </body>
    </html>out.println(ConProp.sampleProperty) prints null value.
    is this the right procedure to access bean variables
    thanks

  • How to access variables from other class

        public boolean inIn(Person p)
            if  (name == p.name && natInsceNo == p.natInsceNo && dateOfBirth == p.dateOfBirth)
                 return true;
            else
                 return false;
        }//returns true if Person with same name/natInsceNo/dateOfBirth as phello,
    here am trying to compare the existing object with another object.
    could you please tell me how to access the variables of other class because i meet this error?
    name cannot be resolved!
    thank you!

    public class Person
        protected String name; 
        protected char gender;      //protected attributes are visible in the subclass
        protected int dateOfBirth;
        protected String address;
        protected String natInsceNo;
        protected String phoneNo;
        protected static int counter;//class variable
    //Constractor Starts, (returns a new object, may set an object's initial state)
    public Person(String nme,String addr, char sex, int howOld, String ins,String phone)
        dateOfBirth = howOld;
        gender = sex;
        name = nme;
        address = addr;
        natInsceNo = ins;
        phoneNo = phone;
        counter++;
    public class Store
        //Declaration of variables
        private Person[] list;
        private int count;
        private int maxSize;
    //constructor starts
        public Store(int max)
             list = new Person[max];//size array with parameters
             maxSize = max;
             count = 0;
        }//end of store
    //constructor ends
    //accessor starts  
        public boolean inIn(Person p)
           return (name == p.name && address == p.address && natInsceNo == p.natInsceNo);
        }//returns true if Person with same name/natInsceNo/dateOfBirth as phope it helps now!

  • How to access variables??

    how to access public variables of any other class??
    suppose i have a file temp.java file ..& i know all the public variables. and
    i want to access the variable of those temp.class file which extends JApplet or Applet..
    and as u know it will declare public void init() .. & in this function only all declaration will be there.
    so now how to invoke this init() function from any mymethod()..to access public variables...

    its not working. for me..
    the variable which i m trying to access is non static.. its displays the error :
    Exception in thread "AWT-EventQueue-1" java.lang.Error: Cannot call invokeAndWait from the event dispatcher thread
    and by one method i have connected database also.. and it has been called from init()..
    i have collected the data from the database..and i m storing the data in one ArrayList ..
    and i want to access that ArrayList..

  • How to access icloud from outside computer

    I want to access my icloud mail from devices NOT my own such as work computer, travel in hotel, other persons computer.  I keep getting this message that tells me to LEARN more and gives all sorts of DOWNLOADING instructions to that computer. ENDLESS loop.   I am not downloading or configuring a public or work computer nor is it my device.   I JUST WANT TO ACCESS MY EMAIL REMOTELY LIKE I DID FOR YEARS ON MAC.MAIL AND CAN DO FROM ANYWHERE ANYTIME WITH OTHER WEB MAILS.  THIS IS SO FRUSTRATING.

    Thanks Roger,   Today I signed up to the apple support communities specifically so I could thank you.   And to publically complain about what Apple did and did not do when then terminated "mobile me" in June 2012.   My short story.... prior to June 2012 I had access to my personal MAC G4 computer, a family member's old IPAD and my work PC.  I tired to migrate to I-Cloud but that was not possible without buying a new home computer.  So next best option would be to use a browser on either my G4, or the IPAD or the PC at work to access this new  "icloud" server, or whatever it is.  I've been a mac user since the very first macs came to the market so I'm not a novice.  I spent many hours googling and searching Mac support to find out how to access my email after they turned off mobile me.  I did not find a way, so I recently bought a mac mini to hopefully get all my new and historical email back and working again.   Yes, I did get back on email again using the  mac mini I had to buy, so apple did OK there. 
    But I find it negelent, perhaps deceptive, that Apple did not provide simple instructions like you did to the mobile me users that Apple effectively kicked off their email service, which I paid  for, for many years.  That's very much like stealing in my opinion....Apple couldn't send me an email to the Icloud link like you provided, with instruction on how to get to my email?  Rather they kept insisting that I migrate to icloud, and insisting that I had to meet computer operating system requirements that my old G4 could not meet.  In my opinion they were not honest.  They effectively created the preception that anyone using an older mac had to buy a new one and I think they knew what they were doing.  I heard someone say that ethics cannot be taught, I agree.  Thanks again Roger, I can now access my Mac Mail from alternative locations.

  • How to access Portal URL outside of the LAN

    Hi Experts,
    Our J2EE engine is hosted on one machine and R/3 is installed on other machine (IP address is different). We have configured Web Dynpro ABAP iVIEW's and Transaction iViews in my portal. To be able to access these two iViews I have to maintain the IP addresses of both EP server and R/3 server IP's in every client host file.
    Hence my client system is in LAN it is working with no issues, but we want to access the URL form out of LAN which is not possible at the moment.
    Could anyone please advise me how to access the URL without maintaining the IP address in host file
    and
    able to access the URL out side of the LAN.
    Thanks
    Murthy

    Hi Murthy,
    Directly its not possible at all, For this you need to publish the Portal Server on Internet.
    Once its published on internet  then you can access the URL without maintaining the
    IP address in host file.
    In this your Basis Team and Network team will help you.
    Regards,
    Piyush

  • How to access variables passed in custom tag body

    I am developing custom tags in my application. I need to pass some variables from the .jsp file into tag file. I want these to be passed as body of the tag rather than as tag parameter. It seems the correct syntax for this is:
    <myTags:display> someVariable </myTags:display>
    Question 1: Can I not use this as: <myTags:display someVariable /> Since this tag will be used at many places in the jsp, I dont want to write myTags:display twice for every usage.
    Question 2:
    I want to call the tags from main.jsp like:
    <% String var1 = "Display Me Please"; %>
    <myTags:display var1 />I want the tag file to do some processing on the value stored in var1. I've written the following code in tag file, display.tag:
    <jsp:doBody var="theBody" />
    <% Object obj = (Object) request.getAttribute ("theBody"); %>This code snippet gives me access to obj which has the value "var1". Now how do I access the value that is contained in "var1".
    Edited by: coolkomal on Jun 3, 2009 7:45 AM

    coolkomal wrote:
    I am developing custom tags in my application. I need to pass some variables from the .jsp file into tag file. I want these to be passed as body of the tag rather than as tag parameter. It seems the correct syntax for this is:
    <myTags:display> someVariable </myTags:display>
    Question 1: Can I not use this as: <myTags:display someVariable /> Since this tag will be used at many places in the jsp, I dont want to write myTags:display twice for every usage.
    <myTags:display var="<%=someVariable>"/> is a valid syntax for performing respective action of that variable. You can also use EL to pass the variable ${someVariable} provided the custom tag provide support for EL.
    >
    Question 2:
    I want to call the tags from main.jsp like:
    <% String var1 = "Display Me Please"; %>
    <myTags:display var1 />
    Just ensure that you declare all the related variables in Main.jsp and statically include Main.jsp in your jsp such that you do the checking
    [http://java.sun.com/products/jsp/tags/11/syntaxref117.html]
    >
    I want the tag file to do some processing on the value stored in var1. I've written the following code in tag file, display.tag:
    <jsp:doBody var="theBody" />
    <% Object obj = (Object) request.getAttribute ("theBody"); %>This code snippet gives me access to obj which has the value "var1". Now how do I access the value that is contained in "var1".Can be done provided you code it the right way. Start learning basics of how to create custom taglibraries to gain more knowledge on how things can be managed.
    [http://java.sun.com/javaee/5/docs/tutorial/doc/bnalj.html]

  • How to access variables across JSP and JavaScript?

    Hi,
    I have some .js files and in those files, some of the methods need to access to the variables that I'd declare in the jsp files. How do I do it?
    Anne

    You can do it this way, but I'm not sure if this is what you had in mind.
    Say you had a java variable called XString. And you wanted to display
    the value of XString in a javascript Alert. Here's how:
    <html>
    <body>
    <% String XString = "Hi There!"; %>
    </body>
    <script language="javascript">
    alert("<%=XString%>");
    </html>Hope This Help,
    P.

  • How to access variables in windows

    Hi,
    I am new on windows platform. I did work on linux.
    on linux we makes 2 entries in bash_Profile as ORA_dbENV and ORA_appsENV to set the variables which can be accessed using
    linux> . $ORA_dbENV
    linux> cd $ORACLE_HOME\appsutil\scripts\PROD_ltm
    linux PROD_ltm> ./adautocfg.sh
    how can we do this on windows?
    do we have to navigate to the directory manaully like
    cmd> cd d:\oracle\PROD\db\tech_st\10.2.0\appsutil\scripts\PROD_ltm
    d:\oracle\PROD\db\tech_st\10.2.0\appsutil\scripts\PROD_ltm>adautocfg.cmd

    Hi,
    how can we do this on windows?
    do we have to navigate to the directory manaully like
    cmd> cd d:\oracle\PROD\db\tech_st\10.2.0\appsutil\scripts\PROD_ltm
    d:\oracle\PROD\db\tech_st\10.2.0\appsutil\scripts\PROD_ltm>adautocfg.cmdYou will have to source the application/database env file (.cmd) manually before running AutoConfig script, then run adautocfg.cmd script as you have mentioned above.
    Regards,
    Hussein

  • How to access variables in webservice

    Hai,
    I am using SAP Netweaver Developer Studio. I want to handle the error codes by using a variable in the session bean. but i am not able to access the variable . please help me asap.

    ok, the answer is here
    http://blog.flexexamples.com/2008/08/28/creating-a-component-instance-by-class-name-in-act ionscript-30/

  • How to access variables in dynamically created custom components? (Flex 4.5)

    Hi i have another riddle here.
    i have few custom MXML components in my library and i am adding them to the stage by script, after that i want to fill some data, lets say Label.text, inside this component.
    The question is how to acces / reference variables or other components inside the main custom component which was added to the stage by script???
    thx M.

    ok, the answer is here
    http://blog.flexexamples.com/2008/08/28/creating-a-component-instance-by-class-name-in-act ionscript-30/

  • How to access variables indirectly using JSTL

    Hi,
    I have a variable called titleInsert pointing to a session variable someSessionVariable. The jsp has access to titleInsert but would like to output the value of someSessionVariable which is pointed to by tilesInsert.
    If I have something like
    <c:out value="${titleInsert}"/>
    the name of the session variable is being displayed but not the value.
    I tried something like
    <c:out value="$${titleInsert}"/> and
    <c:out value="${${titleInsert}}"/> and both resulted in JSP exceptions.
    Is there a way to display the value of someSessionVariable?
    Help appreicated,
    Kumar

    You use the implicit variable sessionScope, and the square brackets notation.
    <c:out value="${sessionScope[titleInsert]}"/>Cheers,
    evnafets

Maybe you are looking for

  • Urgent Please help me... How to access BAPIs from abstract portal component

    I am developing an application in Abstract Portal Component (in PDK). In that application I can able to acess BAPIs from my Componets using the code like inputPopSearchBapi = new Zad_Bapi_Pop_Search_Form_Input(); outputPopSearchBapi = new Zad_Bapi_Po

  • Synchronizing DB/Config between two standalone ACS, v5.4

    Hello. I'm in process of migrating a clients' ACS from 4.2 to 5.4. With 4.2, they have it set up so that two standalone ACS servers (one in US, one in UK) will replicate database and configuration information. They are not configured as a primary/sec

  • Best way to upload form into WDA

    I am working on WDA containing Adobe Interactive form with Vendor Payment request. WDA will be called by workflow every time an approver has to approve the request. The form will reside at URL. What is the best way to upload an Adobe form into WDA? I

  • ACR 3.6 Leica M8 camera profile

    Hi, I have CS2 premium suite on Windows XP. This included ACR3.6 that I can access either via PS or Bridge. I have installed ACR 3.7 update. Bridge recognises the new Raw plug-in when I opened it. I have imported DNG files from Leica M8. I think that

  • Java Exception during we click the item short description in search result

    Hi Experts, We are in SRM-MDM Catalog 3.0. When we click a item's short description in catalog search result list to open the item detail, the new screen opened with a internal server error. And the error summary is "java.lang.NullPointerException: T