JSP Dynpage and Bean

Hi there,
I have developed a portal application using JSP Dynpage which calls R/3 BAPI but I have a strange issue here.
This application calls BAPI and displays it using HTMLB table control.
When returned values from R/3 are small, it is OK. The problem is when large amount of data comes from R/3, data is correctly displayed but Bean seems to be cleared after displaying it. Therefore if one clicks any button on the applicaiton, NullPointerException occurs due to null bean.
Bean scope is "Application".
Do you have any experience like this? Any input is appreciated!
Regards,
Kazuya

At the moment there is a lot of ambigious information about this, and I've asked for some weblog tying it all together (see Bean scope storage confussion)
You problem is that beans in the application scope can be deleted at anytime if the SAP J2EE needs memory. Try the session scope (or search the forums, lots of people have had the same problem before)

Similar Messages

  • RE;Difference between webdynpro java and Jsp Dynpage and Dynpages

    hi all,
    What are the befinits of webdynpro when compared with other
    Jsp Dynpage and Dynpage.

    Hi Mahesh,
    Refer to the following links which gives you the good idea.
    Choosing between Webdynpro and JspDynpage/Dynpage
    JSPDynpage  Vs Web Dynpro Java
    /thread/65254 [original link is broken]
    JSPDynpage  Vs Web Dynpro Java
    Thanks n Regards,
    Jhansi Miryala

  • JSP DynPages and Image Map

    Hello,
    I've created JSPs with JSP DynPages. Now i vant to switch from one JSP to the other. How can I do this? This is my Code from the first JSP:
    <%-- DHLICenter.jsp --%>
    <%@ taglib uri= "tagLib" prefix="hbj" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
         <title>Ihre Auswahl</title>
         <head>
         </head>
         <body>
         <% String PublicURL = componentRequest.getWebResourcePath() ; %>
         <MAP NAME=map1>
              <AREA  HREF="page2.jsp" COORDS="350,270,460,330">
         </MAP>
              <img src='<%= PublicURL+ "/images/screen1.png" %>' usemap="#map1" border="0" />
         </body>
    </html>
    The Path for the Image works fine. But when i click the area i got an error message (iview not found). Can someone help me? Thanks in advance...

    Hi Alexander,
    If u are using the jspdynpages ,,then navigate from one jsp to other thru the controller..
    Its always best practice to change the jsp state in controller
    for instnace ,,u can change ur code this way nd try:
    Use an image Button using HTMLB
    for instance
    <htmlb:button id = "myButton14"
    text =
    "<img src='/sap/public/bsp/sap/public/bc/icons/s_s_okay.gif' border='0'>OK "
    onClick = "myButtonClick"
    encode = "FALSE" />
    Now in ur controller
    looks like this
    public static final int PAGE1 = 0;
    public static final int PAGE2 = 1;
    int PAGE_STATUS = PAGE1 ;
    public void doProcessBeforeOutput() throws PageException {
    switch (PAGE_STATUS) {
    case PAGE1  :
    this.setJspName("page1.jsp");
    break;
    case PAGE2  :
    this.setJspName("page2.jsp");
    break;
    public void onMyButtonClick(Event event) throws PageException {
    try {          
    PAGE_STATUS = PAGE2;
    } catch (Exception e) {
    PAGE_STATUS = ERROR_PAGE;
    Cheers
    Swathi
    Do offer pts nd ncourage:-)

  • Urgent : Data Passing Problem in JSP dynpage using bean in SP11

    Hi all
    I am trying to pass data from my jspdynpage to jsp using bean , which is not at all passing any values
    i am pasting code below which works in 6.0 sp09
    I dont know what is happening in sp11
    please suggest me in this situation
    public static class LeaderStatusOverviewDynPage extends JSPDynPage{
        private LeaderStatusBean myBean = null;
        public void doInitialization(){
            this.ensureBeanisSetup();
        public void doProcessAfterInput() throws PageException {
        public void doProcessBeforeOutput() throws PageException {
          this.setJspName("leaderstatus.jsp");
        public void ensureBeanisSetup(){
                IPortalComponentRequest request       = (IPortalComponentRequest)this.getRequest();
                            IPortalComponentContext myContext     = request.getComponentContext();
                //IPortalComponentProfile profile = myContext.getProfile();
                      Object o = myContext.getValue("myBean");
                      if(o==null || !(o instanceof LeaderStatusBean)){
                        myBean = new LeaderStatusBean();
                        myBean.setMessage("This String From Bean");
                        myContext.putValue("myBean",myBean);
                      } else {
                          myBean = (LeaderStatusBean) o;
    My jsp page
    <jsp:useBean id="myBean" scope="application" class="bean.LeaderStatusBean" />
    <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId" >
       <% Date today = new Date(); %>
       <h1> This is Test page for NOVA Chemicals </h1>
       <br><br>
       <font color = "blue" size = "4"><center>
       <%=today%>
       </center>
       <br><br> This is the message of Connection  :
       <%=myBean.getMessage()%>
       </font>

    Hallo Prakash,
    I am developing with EP SPS12 and am facing the exact same situation. Values passed to the bean from the dynPage do not get through to the jsp. When removing the respective lines in the portalapps.xml I get a portal runtime exception.
    I am posting my portalapps and the jsp where importing the beans. What am I missing here? Any help would be greatly appreaciated! Thank you in advance.
    BR
    Helga
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
      <components>
        <component name="AdminComponent">
          <component-config>
            <property name="ClassName" value="com.company.AdminComponent"/>
            <property name="SecurityZone" value="com.company.AdminComponent/low_safety"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/AdminComponentView.jsp"/>
          </component-config>
        </component>
      </components>
      <services/>
    </application>
    <jsp:useBean id="dropDownListBean" scope="application" class="com.company.bean.DropDownListBean" />

  • Where do I place JSP and Beans?

    Hello,
    I have just installed JDeveloper and have no idea where to place JSP pages and Bean class files so thet JDeveloper can access them when I run or debug a page.
    Any help would be appreciated.

    In JDeveloper, applications are grouped by one or more projects and a workspace containing projects. In your case, if you already have beans and JSPs built, here's what you need to do:
    1. Create a new workspace.
    2. Create a project using the 'create a project from existing source code' option.
    3. Optionally check the 'copy to project's source directory' to include your files in the project.
    Hope this helps,
    Lynn
    Java Tools Team

  • Custom loading image JSP dynpage

    Hello,
    Wa have created a jsp dynpage, and want to show a custom loading image. I other applications (appintegrator) we have succesfully changed the loading image by exporting the theme that we are currently using, change the loading_ani.gif image and re-importing the theme. This change has no effect on the loading image of the JSP dynpage, it is still the one supplied by SAP. I checked the url of this image and got the following https://host:port/htmlb/mimes/common/loading/loading_ani.gif, so I tried changing the loeding image that is stored in the htmlb par file, but there was no visible result when loading the application, or when loding the direct url of this image. Can anyone tell me where I can change the loading image of the JSP dynpages?
    Kind Regards
    Timon Van Soom

    Juhi Bhatnagar
    Greetings!!!
    May i know , what is the procedure need to be followed to replace the default Loading ICON with our custom image.
    2. Does our custome image should be a image file (like jpg, png) or its like a command
    Kindly share the procedure for this...
    Appreciate your response in advance'
    Thanks

  • External Jars in JSP Dynpage

    Hi,
    I have implemented reading an XML feed in a Java program using informa api.
    In NWDS, I created a Java Project. And as required added 3 externals jar files.
    I had to import the following:
    import de.nava.informa.core.ChannelIF;
    import de.nava.informa.core.ItemIF;
    import de.nava.informa.impl.basic.ChannelBuilder;
    import de.nava.informa.parsers.FeedParser;
    The program works on run.
    But when I creat a JSP DynPage and I add the follwoing lines:
    <%@ page import = "de.nava.informa.core.* "%>
    <%@ page import = "de.nava.informa.impl.basic.ChannelBuilder "%>
    <%@ page import = "de.nava.informa.parsers.FeedParser "%>
    I get an error: Error occurs during the rendering of jsp component. Even in this project I added external Jar files in the same way.
    Any particular stuff need to reside on the server or something?
    Because I one tried implementing JCO in JSPDynPage by adding the external jar in the project structure and it worked fine.

    Hi Prem,
    Probably the jars you must have added in your last project would be available on the server or they would have been some server related jar files.
    But in the case when you are inclusing some external jars, you need to inclusde it both as "<b>External Jar</b>" and also add it to the <b>lib</b> folder (ie: just copy and pate the jar files in the <b>lib</b> filder).
    <b><a href="http://img142.imageshack.us/img142/8168/solution4gy.jpg">Put the .jar file here</a></b>
    I hope this solves your problem.
    Regards
    Pravesh
    PS: Please consider rewarding points if helpful and solved.

  • JSP without JSP Dynpage

    Hi experts,
    I have one pretty straight forward question. Is it possible to create portal component using JSP but without JSP Dynpage and HTMLB tags? I know I can avoid HTMLB tags but is it possible to avoid JSP Dynpage also?
    Regards,
    Martin

    try using abstract portal component.
    As always you can use JSP dynpage and use simple jsp without HTMLB. try creating simple jsp file and use it.
    Cheers
    Yusuf

  • Difference between abstract portal component ,dynpages and jsp dynpage

    Hi All,
    I am new to the SAP world.Can you help me out in finding the difference between abstract portal component ,dynpages and jsp dynpage in Portal development.Please send me  any information.

    Hi,
    Welcome to SDN Community
    This blog will brief you the differences between them,
    Java development methodologies (Part II)
    Regards
    Srinivasan T

  • JSP Compile Error when using dynamic ID in logic:iterate and bean:size

    Hello,
    I try to create a dynamic table with logic:iterate and bean:size tag. Dynamic means the attributes are written by scriptlet. Eg.:
    <logic:iterate id="customerBean" name="<%= formName %>"  property="<%= propertyName%>" length="<%= sRowSize%>">When I replace the id Attribute with propertyName I get compile errors, such as
    the compiler doesn't know the value at runtime:
    Unable to compile class for JSP An error occurred at line: 179 in the jsp file: /pages/formContent.jsp Generated servlet error: _newCustomer.java:1046: Missing term. java.lang.Object <%= propertyName %> = null; ^
    Whats wrong ?
    Thanks for your help

    Solution: don't use a runtime expression for the id attribute.
    The id attribute is used to declare
    - an attribute in scope
    - a scriptlet variable on the page
    These are only available for the duration of the <logic:iterate> tag
    The "id" is only used in your programming. You don't need to make it dynamic.

  • Web Module Creation in j2ee perspective and jsp dynpage

    Hi all,
    Can someone tell me when to use jsp via creation of web module using suspend and resume plugs and jsp dynpage.  I am not clear with these two concepts.  Basically I want to work with jsp's and tht too want to be able to view it in portal iview.
    Regards,
    Preeti

    hi
    check this out
      /message/413811#413811 [original link is broken]
      /message/864533#864533 [original link is broken]
      /people/community.user/blog/2006/11/02/jspdynpage-with-client-side-eventing-and-database
      https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a08c287b-96a5-2a10-a691-b8b8bc40ea43

  • Passing values between JSP and Bean

    I am trying to validate a date entered by the user on a form. I need to do an "alert" when the user enters a date outside of the valid range depending on a value entered in a drop down.
    Am doing this in checkform function. Here is what I want to do:
    1. Send the the value from the drop down and the date to bean to do the calculations. Call the EJB function from checkform.
    2. Get a string values back into the jsp from the bean
    3. Blow an error to the user to enter a valid date.
    Any help in this case would be greatly appreciated.
    Thanks.

    I only see some design requirements.
    What's the exact coding question? Where are you stucking while coding those requirements accordingly?

  • Please recommend IDE for JSP and Beans

    Hi guys,
    I am looking for a decent IDE to work with JSP and Beans. I have tried JBuilder which has too much going on at the same time and I find it to be an overkill for what I am doing; I find NetBeans kind of irritating. I develop web applications, hence I dont need any GUI stuff for beans.
    Just looking for something that will enable me to rapidly develop beans as a support system for JSP pages and at the same time, it should provide good support for coding JSP pages. Little bit of management functions wont hurt either, but are not required. I dont mind if I have to pay for the IDE. Any recommendations?

    I like Eclipse for Java Development, and I use the MyEclipse plug-in for J2EE development.
    There is a free J2EE plug-in (Lomboz) but I'd much rather pay the $29.99/year for MyEclipse. It's been perfect for me.

  • How to have a popup in Jsp Dynpage

    Hi All,
    I am having a JSP dynpage project working fine.
    I now need a popup on click of a button in a iview (JSP).
    I created a complete new JSPDynpage component with Bean etc.
    I use the below code
    window.open('project.componentname') to have a popup.
    and in portal. xml I define the properties ComponentType & JSP.
    the window pops up but with error at all times even for a blank JSP,
    your help would be well apprictiated at this stage of my project situation.
    I need a popup window where that popup is not just a confirm message but a process with several events and DB access.
    Thanks in advice,
    blsaiue

    Hi
    Avaialable controls in JSP Dynpage technologies.
    http://help.sap.com/saphelp_nw04/helpdata/en/d0/55074155bcf26fe10000000a1550b0/frameset.htm
    Regards
    -SS

  • Custom Personalization Dialog for JSP Dynpage

    Hi,
    i have a JSP Dynpage Component with the bean. i want to allow the user to personalize the iView when they click the "Personalize" in the iView Tray. So i have implemented doEdit() in the JSP Dynpage class and setting a JSP in the doEdit(). But in the portal the iView is not bringing any custom personalization JSP when i click "Personalize" in the iVIew Tray Drop Down Menu.
    doEdit() method wont work for JSP Dynpage ? is it only for Abs Portal Component ?
    Thanks,
    Saravanan

    Hi Saravanan,
    Hi Saravanan,
    JSPDynPage is more elaborate version of the DynPag. It creates a JSP file and, optionally, a Bean class.
    This means that the doProcessBeforeOutput methods are slightly different and there is an additional JSP file and an optional Bean class file. There are obviously other differences (such as the differences in the portalapp.xml file).
    Just check with a sample Portalapp.xml file:
    Ensure all the entries are made.
    <application>
      <application-config>
        <property name="releasable" value="true"/>
      </application-config>
      <components>
        <component name="BeginEPDevelopment">
          <component-config>
            <property name="ClassName" value="com.yourcompany.BeginEPDevelopment"/>
          </component-config>
          <component-profile>
            <property name="diplayHistory" value="10">
              <property name="plainDescription" value="BlogEntries"/>
              <property name="personalization" value="dialog"/>
            </property>
            <property name="diplayStyle" value="list">
              <property name="type" value="select[list,entries]"/>
              <property name="personalization" value="dialog"/>
            </property>
          </component-profile>
        </component>
      </components>
      <services>
        <service name="BeginEPDevelopmentService">
          <service-config>
            <property name="startup" value="true"/>
            <property name="className" value="com.yourcompany.BeginEPDevelopmentService"/>
          </service-config>
          <service-profile>
            <property name="BlogComments" value="Display"/>
          </service-profile>
        </service>
      </services>
    </application>
    Hope it helps you.
    Regards,
    Ponneswari.

Maybe you are looking for

  • How do i find my music that is listed in itunes and is accompanied by a "!"?

    many song on my itunes are not playable and are accompanied by a "!". when i try to play them i get this message: The song  xxxxxxxx  could not be used because the original file could not be found. Would you like to locate it? how do i locate these s

  • BPM Config error

    Hi Experts I am doing the BPM Configuration.  I am getting the following error. Problem retrieving data from <SID>: RFC System Failure / Function module "/SSF/CALL_SUBROUTINE_RFC" not found.. Please help me to resolve the issue. Thanks & Regards

  • Log file audit script to search and collect

    Hi guys, I'm trying to figure out the best way to complete this log file audit, so I would like to scripted, but can't seem to get a grasp on it and how best to do it. I need to search for the log files (all log files OS and App logs) on a few dozen

  • How to synchronize audio track and video when transmitting by RTP

    since the audio stream and video stream are transmitted separately on the network even if in a merged data, how to synchronize the audio stream and video stream at the receiving end ?

  • Cannot change or delete local items keychain

    Hopefully someone here can help me. I forgot my main password to get into my MacBook Pro.  I'm running Mavericks.  I did the restart/holding down option key.  I used terminal to get in to change the password.  However, the Local Items keychain has re