#19 Demo bug

open-works-for-me
amr eladawy
None
5
2009-05-29
2009-05-29
Anonymous
No

ContentPage.jspx

<label id="j" style="color: blue; font-style: italic;">
${bundle.name}
</label>

${bundle.name} cause exception:

java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:61)

Discussion

  • amr eladawy
    amr eladawy
    2009-05-29

    can you please provide the stack trace,

    I tried this out and worked.

     
  • amr eladawy
    amr eladawy
    2009-05-29

    • status: open --> open-works-for-me
     
  • amr eladawy
    amr eladawy
    2009-05-29

    • assigned_to: nobody --> amreladawy
     
  • ratong huang
    ratong huang
    2009-06-02

    java.lang.NullPointerException
    at java.io.Reader.<init><Reader.java.61>
    at java.io.InputStreamReader.<init><InputStreamReader.java:80>
    at eg.java.net.web.jspx.engine.util.ResourceBundleUtility.loadProperties<ResourceBundleUtility.java:84>
    at eg.java.net.web.jspx.engine.util.ResourceBundleUtility.getBundle<ResourceBundleUtility.java:50>
    ........

     
  • ratong huang
    ratong huang
    2009-06-02

    I found that have no "<resourceBundle id="bundle" base="/res/messages.properties" charset="utf-8" />" in the demo source file : ContentPage.jspx

    but no effect and throw the same exception then i added it.

     
  • amr eladawy
    amr eladawy
    2009-06-05

    hello hema,

    the ContentPage.jspx is including this line

    <resourceBundle id="bundle" base="res.messages" charset="UTF-8"/>

    which is right before the form tag.

    please note that when declaring a resource bundle we follow the same exact standards for localization bundle.

    so if you have the bundle file in the path
    /WebRoot/res/messages.properites

    then the base path will be
    /res/messages

    regards,
    Amr

     
  • amr eladawy
    amr eladawy
    2009-06-05

    and also

    res.messages

     
  • Hi, I share the same problems.
    Neither the demo nor the framekwork itself won't run/compile.
    I have Tomcat 6 on VISTA64.

     
  • amr eladawy
    amr eladawy
    2009-06-23

    please download the latest demo from download section.

    you can download the war file first and run it. then download the source