Doubt with beans usage

Hi, I created a class MyClass. MyClass has a member of type MyObject.
MyObject has a member of type int and other of type ResultSet.
In the jsp file is used MyClass with scope=page with <jsp:jsp:useBean tag. If I try to access the int member of MyObject, through MyClass, there is no problem, but if I attempt to access the ResultSet member of MyObject through MyClass, it throws me the NullPointerException (I think that happens because the ResultSet member is null).
So, Java beans only "keep alive" the primitive and String members in the specified scope?

I tested your code on a simpler case, and it appears that one cannot access a property from a JavaBean if that property is not a primitive type.
Here's the simplified code:
TestJavaBean is the main JavaBean that contains a primitive type and an object type Rose.
package test10;
public class TestJavaBean {
   Rose rose;
   String someString;
    public TestJavaBean() {
    public Rose getRose() {
        return rose;
    public void setRose(Rose rose) {
        this.rose = rose;
    public String getSomeString() {
        return someString;
    public void setSomeString(String someString) {
        this.someString = someString;
}Here's the definition of the Rose JavaBean:
package test10;
public class Rose {
    int a;
    String b;
    public Rose() {
    public int getA() {
        return a;
    public void setA(int a) {
        this.a = a;
    public String getB() {
        return b;
    public void setB(String b) {
        this.b = b;
}Here's the JSP code that tries to refer to the embeded Rose object
  <jsp:useBean id="testJavaBean" class="test10.TestJavaBean"/>
  <%--
  <jsp:useBean id="rose" class="test10.Rose"/>
  <jsp:setProperty name="rose" property="a" value="123"/>
  <jsp:setProperty name="rose" property="b" value="'Value of b'"/>
  <jsp:setProperty name="testJavaBean" property="rose" value="roseObject"/>
  --%>
  <jsp:setProperty name="testJavaBean" property="someString" value="'Hello World!'"/>
  <%--
  <jsp:getProperty name="testJavaBean" property="rose"/>
  --%>
  <jsp:getProperty name="testJavaBean" property="someString"/>Some part of the above code in the JSP is commented out on purpose. When that code is uncommented I get:
org.apache.jasper.JasperException: jsp.error.beans.property.conversion
This means that one cannot access an object property from a JavaBean?
Or are JavaBeans not supposed to have object properties?
Or is it a bad practice to try to access a Java object from a JavaBean even though it is defined as a property of the bean?

Similar Messages

  • What's up with data usage on the iPad over LTE?

    I am using the new iPad. This is not my first as I have had an ipad since version 1 (at first with a VZ Mifi, though now I have the one with LTE). When I first set up this iPad i did it on a prepaid account and so I have a baseline of experience (both with the mifi and with built in cellular) that is nothing like what I have experienced recently.
    When I first activated, I averaged 1GB of data use. I activated on prepaid as I thought I might actually turn it off once in a while and I didnt want to have to go through VZ to do that - I don't have an hour+ to waste in store every time i want to do something with my devices. I later decided (silly me) I was not ever going to turn off the data, so why not put it on my regular plan.  The real rub here is my data usage still didnt change. I leave both radios (wifi and cell) on all the time. So when I am home, I am wifi, when i am out, I use cell.
    The odd thing here is, since LTE has come to town, my usage has tripled. Now, some of this is because I have once or twice watched a movie or streamed some audio. But as this has happened only once or twice in a month, it does not explain lump data charges of 500-1,000mb charges hitting my device 5-6 times in a month. Consider this timeline:
    On Saturday afternoon, I decided to use the NFL app to listen to an audio broadcast of the NE patriots game. I did so walking around town. I was easily streaming for 2 hours or more. According to VZW, the charge in data use for this (nearest to time) was at most 47mb.
    Roll forward 2 days during which the two largest charges are 23mb and 13mb - I can even relate these charges to a couple apps I upgraded in that time frame and some podcasts that auto downloaded.
    I see that at 3am on 9-18-12 I had data usage of 900mb. huh?
    My wifi is always connected when I am at home
    Even if, as some suggest on here, the wifi turns off when the device sleeps
    There were no updates to be found
    Movies don't download over Cell as they are over 50mb (though they will stream I think)
    IOS does not allow podcasts or software updates over 50mb anyway so if it was either of those, it would have had to be like 30 of them!
    I have a couple of theories:
    Verizon charges for data as far as timing are way off. They really don't know WHEN data is being used. The system posts involve lags in update of data from towers. (server to server transmission, whatever)
    There is a problem with LTE usage stats on Verizon. I am tempted to turn off LTE for a while to see if the usage goes down.
    I don't want to turn off my cellular all the time as that defeats the usability of the thing. I just want it back the way it was and for these phantom charges to stop. There is nooooo way my ipad used 900mb overnight by itself. There just isn't that much data to be had to bring into the thing when I am not using it.
    Please reply to this with answers only if you KNOW something. I know many will want to be helpful, but if you want to be really really helpful, you will differentiate speculation from fact.
    Has anyone else noticed that LTE data usage is higher? (and not just because having faster speeds makes you want to do more stuff)

    Sorry Tominique, great answer to the question I didnt ask. I know how to add data to my plan.
    My point is, my usage pattern has changed little. yet I am using at a rate 5 times what I was before. And I rarely stream content so I know thats not it. And the times I do, does not coincide with those ridiculous usage figures.
    I get that having more bandwidth will open a stream "wider" so to speak and cause more data usage in order to get better quality. However, in the case of Audio, that extra usage doesnt even come close to justifying these kinds of figures. Much less when posting at 4am when I am fast asleep.
    And forgive me for being a bit curt, but does my post read like I needed to be told that using wifi will save me cell data usage? I know it was pretty long, but at least read it carefully before proposing something so mundanely simplistic.
    And Brian68- Yup, I agree Spot on with you on song size. A 10mb song is a 10mb song. Doesn't matter how fast the stream is. I could see music being compressed, but it most definitely doesn't get any bits added just because the bandwidth opens up. lol What? VZW somehow upgraded my itunes match content from 256kb up to lossless? doubtful.

  • Doubt with creation of Model in the application Webdynpro Java

    Good Morning,
    I have the following doubts with the fields when i am creating a models in WebDynpro Java
    Model Package
    Source Fólder
    Default logical system name for model instances
    Default logical system name for RFC metadata
    Logical Dictionary
    Dictionary Type Package.
    Can Help me?
    Kind Regards

    Hi,
        Please check this link:
    [https://wiki.sdn.sap.com/wiki/display/WDJava/FAQ%20-%20Models%20-%20Adaptive%20Web%20Service]
    Thanks and Regards

  • MRP run for header material with bom usage-3

    Dear All,
    We have header material with bom usage-3.We maintain the stock at child components only ,not at header
    I have created the planned independent requirement for header material.I have created a sales order but sales order is not shown in md04.
    What can be the further setting  I am missing for mrp run of above scenario.
    with regards,
    pradeep

    Dear ,
    Couple of checks points for you :
    1.Check the material master Sales Org Veie-Item Categoery .As you have mentioned Item Categoery -TAQ which is not relevent for requirement planning throgh schedule line category -CT ( CT means there will not be any inventory or good movement and requirement will not be passed for MRP ) .Only CP -line item categoery does requirement passing through MRP and it will show u in MD04. So the summery is if you want to generate an MTO order for the same FG material , you should matian the Sales Line item categoery as MTO in sales Org View and it will pop up in VA01 whiel logging Sales Order .
    Generally , TAQ item categoery are used in Project Billing or Delivery .ok  and they will not be having any availabilit check so it KP ( no check ) .
    But for MTO order , you should have availablty chek 02/01 in MRP3 view and also MTO Sales Item categoery .
    Based on the above information logg an sales order , release credit chek in VKM3, SAVE and check in MD04.
    Create PIR in MD61 and Run MRP on the both cases .I have tested its working .but noit with TAQ item categoery ok
    2.Why do you need to create Sales Order for dependent Item-Y because it will be in X-BOM item  ? Make sure that Y- should have Sales Item categoery in material master -MM02-Sales Org View as NORM item .If you really want to create sale sorder for this item , it should TAN or NORM .
    3.Other PIR detail is fine .
    Try and revert back
    Regards
    JH

  • How to upload a file into server using j2ee jsp and servlet with bean?

    How to upload a file into server using j2ee jsp and servlet with bean? Please give me the reference or url about how to do that. If related to struts is more suitable.
    Anyone help me please!

    u don't need j2ee and struts to do file uploading. An example is as such
    in JSP. u use the <input> file tag like
    <input type="file"....>You need a bean to capture the file contents like
    class FileUploadObj {
        private FormFile srcFile;
        private byte[] fileContent;
        // all the getter and setter methods
    }Then in the servlet, you process the file for uploading
        * The following loads the uploaded binary data into a byte Array.
        FileUploadObj form = new FileUploadObj();
        byte[] byteArr = null;
        if (form.signFile != null) {
            int filesize = form.srcFile.getFileSize();
            byteArr = new byte[filesize];
            ByteArrayInputStream bytein = new ByteArrayInputStream (form.srcFile.getFileData());
            bytein.read(byteArr);
            bytein.close();
            form.setFileContent(byteArr);
        // Write file content using Writer class into the destination file in the server.
        ...

  • Doubt with a Insert query!

    hi friends i have a doubt with a query in sql here is the following code.
    INSERT INTO
                         (SELECT employee_id, last_name,
                                      email, hire_date, job_id, salary,
                                      department_id
                           FROM employees
                          WHERE department_id = 50)
               VALUES (99999, 'Taylor', 'DTAYLOR',
                            TO_DATE('07-JUN-99', 'DD-MON-RR'),
                             'ST_CLERK', 5000, 50);The same insert statement can be achieved with
    INSERT INTO EMPLOYEES (employee_id, last_name,
                                      email, hire_date, job_id, salary,
                                      department_id)
                        VALUES (99999, 'Taylor', 'DTAYLOR',
                            TO_DATE('07-JUN-99', 'DD-MON-RR'),
                             'ST_CLERK', 5000, 50);What advantage does the first query have over the second one.
    Thanks in advance to everyone.
    Regards,
    Manoj

    Those two statements are identical.
    However this one would be different:
    INSERT INTO
      (SELECT employee_id, last_name,
            email, hire_date, job_id, salary,
            department_id
       FROM employees
       WHERE department_id = 50
       with check option )
    VALUES (99999, 'Taylor', 'DTAYLOR', TO_DATE('07-JUN-99', 'DD-MON-RR'), 'ST_CLERK', 5000, 50);The "WITH CHECK OPTION" would guarantee that only employees for department 50 are inserted.
    see also:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/statements_10002.htm#i2066598
    Edited by: Sven W. on Mar 17, 2011 7:22 PM - typo correction

  • Doubts with working in BI

    Dear Experts,
    I am sure SAP follows the same concepts in BI as just recently i have worked in JasperSoft Talend Open studio.
    But i have some doubts with BI.
    I created a RFC in ABAP. Used that RFC to bring data for a single day as parameter  on to ingres database table .The ingres table is of same schema as of structure output.Finally i find that ingres table is populated after running relevant job.
    Now i thought to work twoards report and that worked as well.But still i have doubts.
    As i am new to BI ,i dont know what advantage i got by doing this breathless activity.
    (1) I would have simply used sap itself to generate report.What was the need to bring to mysql.Load to my server remain same because definitely RFC will be executed nowhere but on server itself.
    (2)If daily i have to run the same job ,obviously i could have done same with sap.Same amount of data will be retrieved with
    same overheads.
    As i said that i am new to BI.Plz explain me about power of BI  and what i am missing to conceptualize ?

    Aditya,
    You can definitely use SAP R/3 to generate these issues - the only issues are :
    SAP R/3 is an OLTP system
    by OLTP system the system is optimized / tuned to be able to do inserts and updates to tables but then the default indices are not tuned for reads ... this might cause report performance issues...
    SAPR/3 is not supposed to hold more than 2 years of data at best ( unless your system is small enough ) whereas a BI system can hold and should hold much more information.
    Getting the master data descriptions for the data you are reporting upon and that too across languages can be a challenge - whereas it can be better handled in a BI system...
    As for extracting large volumes of data you should use the Service API that comes with SAP Bi for better extraction performance ...
    some points why you need a BI system.....

  • Doubt with Implicit Enhacement in SAP ABAP

    Dear.
    I have the following doubt with the Implicit Enhacement in SAP ABAP created by me in several applications standard-
    If I Create an Implicit Enhacement in SAP ABAP for a function module or program standard , when the team basis is doing an upgrade the code abap created in the Implicit Enhacement not is deleted?
    I have created several Implicit Enhacement for Applications WD ABAP and FM, but I have this doubt.
    http://wiki.sdn.sap.com/wiki/display/ABAP/HowToDoImplicitEnhancement
    Thanks a lot in advance.
    Carmen G.

    Hi,
    you code will be retain after upgrade. If you have done implicit enhancements doesnt mean your code would get deleted after upgrades.
    In some cases you might have to activate your enhancments using SPAU.
    Thanks

  • Invoke reports with Beans

    Hi, every one:
    Can I invoke reports with Beans? How to do it?
    Which JARs must I use? Where can I find materials of it?
    Best regards.
    Leslie Chen

    HI Jorge,
    I'm afraid that out of the box you can only see reports in your default currency. However, if you would like to have mixed currencies in the same report you can try to manipulate the data based on the opty currency.
    To do this, add the opty currency field to the column layout. Then add any other column and use a 'Case'/'When' function for the currency that is NOT your default and have the function multiply/divide the revenue by a constant coefficient that is the exchange rate. Should look something like this:
    case when Opportunity."Opportunity Currency"='USD' then Opportunity."Closed Revenue"*(the exchange rate) else Opportunity."Closed Revenue" end

  • URL filtering replacing with web usage control

    I come to know the URL filtering in ironport is replacing with the advanced web usage control. May i know from which version its introducing? Any upgradation procedure?
    What are the changes will take place after the upgradation & what kind of functionality will be available with Web Usage Control.
    Please clarify in detail.
    Thanks in advance
    Siva

    I don't remember when the web Usage controls was introduced... I'm going to guess 7.0?
    To upgrade your box to the the current version, click on System Administration>System Upgrade.  Click on the Available Upgrades and see what's available for your hardware.  If nothing is there, contact your reseller.
    Review the release notes for the version you want to upgrade to.  http://www.cisco.com/en/US/products/ps10164/prod_release_notes_list.html
    Select the version you want, check the box to save the config, you can also have it email you the config.  Make sure to uncheck the "Mask passwords..." so that if you have to reload this config on something, it works properly.
    There are a huge number of changes in how web usage control works, and the visibility it gives you into what apps users are using and how those applications work.  Far to many to go into here.  Look at this document:
    Chapter 18. http://www.cisco.com/en/US/docs/security/wsa/wsa7.5/user_guide/WSA_7.5.0_UserGuide.pdfhttp://www.cisco.com/en/US/docs/security/wsa/wsa7.1/user_guide/Cisco_IronPort_AsyncOS_7.1.0_User_Guide_for_Web_Security_Appliances.pdf

  • [5800xm] Problem with rSAP usage in Skoda nav-syst...

    Hello,
    like in the topic: I have a problem with rSAP usage in Skoda nav-system Columbus: it stays ON searching for the car nav-system & eats battery level (just being standby): within 24 hrs completely empty. With bluetooth turned on, without previously connecting to my Skoda nav-system, the phone can run for about 10 days standby.
    I tried every setting without improvement, I run the latest firmware/software on my 5800 XM.
    Only if I turn off manually the bluetooth subsystem (not just the nav-system connection, but completely turn off bluetooth), then the phone doesn't eat through my battery-level. I dont want that, because it's not neccessary (I have to turn it back on again later & forget to do that), sometimes I forget and find out people can't reach me coz my phone is battery-empty.
    Anyways, this situation is already since the beginning when I bought the phone from Nokia store. No improvement since.
    Please can anybody help out?
    Thnx
    Solved!
    Go to Solution.

    Well, since a few days we're testing the default setting from  aspergerguy  and now it seems the battery problem doesn't occur no more. Amazing how such a small change of unexpected / undocumented setting can give a device real purpose instead of almost uselessness.
    For clarity, again the problem: I am able to use the phone with the carkit-nav system, but after using (ergo: getting out of the car, into our home), the phone eats through the battery within 24hrs.
    This now no longer happens with   Wireless car kit   set as default.
    Thanks aspergerguy for your help!
    Less thanks Nokia for creating this problem in the first place.
    Regards,
    Quan

  • Let us discussion "non recursive with clause" usage

    I think there are 3 "non recursive with clause" usage.
    My question is do you know more "non recursive with clause" usage ?

    Another option is to use it to materialize remote data on the fly. Especially in combination with the materialize hint.
    I think I used this tecnique once, but can't find the proper example anymore. Very simplified it could looked like this:
    with fetchData as (Select /*+materialize */ * from myremoteTable@databaselink where status = 'CURRENT')
    select *
    from fetchdata r
    full outer join localData l on r.id = r.id
    where l.status = 'CURRENT'
    ;From 11g onwards: use the with clause to create better column names in larger select from dual combinations.
    Not sure with that results in a suitable use case.
    So instead of
    with orders as
    (select 1 id , 173 order#, 'John' customer, 'America' region from dual union all
      select 2 id , 170 order#, 'Paul' customer, 'UK' region from dual union all
      select 3 id , 240 order#, 'Hans' customer, 'Europe' region from dual union all
      select 4 id , 241 order#, 'Francois' customer, 'Europe' region from dual )
    select * from orders;you can now write
    with
    orders (id, order#, customer,region) as
    (select 1 , 173 , 'John' , 'America' from dual union all
      select 2 , 170 , 'Paul' , 'UK' from dual union all
      select 3 , 240 , 'Hans' , 'Europe' from dual union all
      select 4 , 241 , 'Francois' , 'Europe' from dual )
    select * from orders;THis makes it a little easier to create tase data useing some excel sheet I guess.

  • Please help with bean package problem - serlvet can't find package

    Hi,
    I'm fairly new to java web development, and I can't make any good learning progress due to an error I just can't seen to fix. It seems humiliatingly trivial, but I can't get past it.
    Explanation:
    I'm experimenting with beans, and I've created a very simple servlet called AppSetup to create a LinkBean instance and store it in the servlet context for later retrieval. My problem is that the servlet wont compile because it's telling me the package in which the LinkBean class file is in doesn't exist.
    The servlet is in package org, and the bean is in package org.bean. This is the import statement in the servlet:
    Code:
    import org.bean.*;I've also tried:
    Code:
    import org.bean.LinkBean;and
    Code:
    import bean.*;I've tried all sorts of different package structures, but I get the same following error for all of them:
    Quote:
    C:\tomcat\webapps\chub\WEB-INF\classes\org>javac AppSetup.java
    AppSetup.java:14: package org.bean does not exist
    import org.bean.*;
    ^
    AppSetup.java:19: cannot find symbol
    symbol : class LinkBean
    location: class org.AppSetup
    LinkBean lb;
    ^
    AppSetup.java:23: cannot find symbol
    symbol : class LinkBean
    location: class org.AppSetup
    lb = new LinkBean();
    ^
    3 errors
    edit
    Server is Tomcat 5.5
    Any help would be greatly appriciated. Thanks.

    The bean class has to be in the classpath. The classpath variable informs the compiler\jvm where to find the .class files that are being referred.
    To set a classpath,
    javac -classpath C:\tomcat\webapps\chub\WEB-INF\classes;C:\tomcat\webapps\chub\WEB-INF\lib;C:\tomcat\common\lib;.; AppSetup.javaThere are 3 paths in the classpath variable above.
    1.\WEB-INF\classes => Your class files
    2. \WEB-INF\lib => Your app library files (.jar files)
    3. \common\lib => common library .jar files
    4 The dot (.) => current directory.
    Read about classpaths [url http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javac.html]here
    ram.

  • Doubt with alter system

    I have the doubt with the statement like :
    SQL> alter system set OPTIMIZER_FEATURES_ENABLE=8.1.7 scope=both;
    is going to permanently alter the system or for that particular instance or session. I mean is it done once or everytime in a new session. Also, how to see the currect value of this parameter, I mean how to query it?
    I hope, my question is clear.
    Please, help in solving the doubt.
    regards

    user574290 wrote:
    I have the doubt with the statement like :
    SQL> alter system set OPTIMIZER_FEATURES_ENABLE=8.1.7 scope=both;
    is going to permanently alter the system or for that particular instance or session. I mean is it done once or everytime in a new session. Also, how to see the currect value of this parameter, I mean how to query it?
    I hope, my question is clear. Well, here is what alter system about SPFILE is
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/create.htm#sthref445
    From it,
    >
    SCOPE = BOTH     The change is applied in both the server parameter file and memory. The effect is as follows:
    For dynamic parameters, the effect is immediate and persistent.
    For static parameters, this specification is not allowed.>
    So this setting will persist across the session logon and log off.
    Suggestion, its good to check oracle docs, choke full of useful info.
    HTH
    Aman....

  • Doubt with set_item_property

    Hi all,
    I am trying to use set_item_property in when-validate item trigger,but whenever i am trying to write the below code i am getting an error too many declarations of set_item_property match this  call
    Can someone kindly guide me how to overcome the error
    BEGIN
    IF :RHCCUSTDET.range_type = 'Bill To'
         THEN
         SET_ITEM_PROPERTY(:RHCCUSTDET.range_from,LOV_NAME,'BILL_FROM_LOV');
    ELSE     
         SET_ITEM_PROPERTY(:RHCCUSTDET.range_from,LOV_NAME,'DELIVERY_FROM_LOV');
    END IF;
    END;     Btw,my form builder version is 10.1.2.0.2
    Any help is appreciated,
    Thanks in advance!!
    Edited by: sandy on Jan 27, 2012 10:16 AM

    sandy wrote:
    Thanks for the reply.
    I do have some doubts with your explanation..Generally we keep a database item as a bind variable in Forms.But,here you are giving a single quote over here *'RHCCUSTDET.range_from'*It's not my opinion. It's from forms syntax. Here it is
    SET_ITEM_PROPERTY
      (item_name  VARCHAR2, property   NUMBER, value      VARCHAR2);So, what u'r putting for value field ? In a single quote or without ? Hope understand.. If you wish you can use Item_id in place of item_name data type of number.
    So,i have put the below code for two text items in when validate item trigger..but now i am getting error as unable to resolve reference RHCCUSTDET.customer_number.Some other reason. I don't see the RHCCUSTDET.customer_number in your code.
    The logic behind behind the dynamic LOV is..there are 6 list of values for a column Range Type..So,if one selects Bill to the corresponding details should pop up in range_from and range_to fieldsHere i have question. Does it comes from same sql ? just difference in where condition ?
    If yes. No need to create two different lov just create two record group(same sql, without where condition and with condition) and dynamically assign them to LOV.
    Hope you understand...
    If someone's response is helpful or correct, please mark it accordingly.

Maybe you are looking for

  • GR against production order accounting entry

    Looking for help regarding offset account hit at the time of GR of Finished production Let see the entries When GI Against production order for  material code x000000091   by 261 6110010 CONSUMPTION - XXX     10,000.00 Dr. 3430020 Stock account    10

  • Crashing when i try to open any file in pages (also keynote and numbers)

    I just buy and install iWork 09. Everything about the installation seems to be ok but when i try to open any file, new or created, i get a crash program with the legend "Pages quit unexpectedly". I tried to reinstall 2 or 3 times but it doesn't work.

  • My Bis is not working with my Curve 9360

    I bought my phone week back, and subscribed for it. And the network provider notified me that my sim have been activated for BIS. But ever since I subscribed, I can't seem to make use of blackberry services. Can't create an email account or even use

  • Upgrade from Photoshop Elements 4.0 to 12.0

    I purchased Elements 4.0 many years ago, and I am considering using this again.  Unfortunately, I can't use this version on OS 10.9 so I know I need to upgrade which I am prepared to do.  But can I qualify for an upgrade based on this old software? K

  • Sending photos for editing in elements

    How can I transfer photos from lightroom 5 after editing to elements 12 for final editing?