JSP Dyn Page want to display "Loading..." img + message

Hi, we have EP6 SP2 environment. I have a JSPDynPage component that does a lot of preprocessing then loads the jsp page. Most of the time it spends in doProcessBeforeOutput() (has to connect to 2 backends and pull some data out). it is very slow loading. Can anybody tell me how we can show a nice loading image and a message WHILE the preprocessing is done? Thank you in advance.

Well, was messing with it for a few hours last night since I got no replies - and that is what I did: I am writing out a <span><loading image> Loading...</span> in my doInitialization() function in Java (before it is doing all the backend connect). Then in a .jsp file I am hiding it with ...display ="none" call. It is a hack, but will do for now till I figure out how to display it sooner.
After deploying this to our dev Portal (which is not slow, the prod is), I realized that most of the "loading" time it spends pregenerating "other" html that is dumped on the page before my code. So will try to figure out how to speed that up. Will keep you posted.

Similar Messages

  • JSP error page does not displayed on its own, includes in the original JSP

    Problem Description: - Exceptions in a Condition cause pages to fail to render.
    The actual issue is, the JSP error page does not displayed on its own, included in the original JSP Page when exception occurs.
    Problem Cause: As per the JSP specification when jsp content reached the buffer size (default 8KB) the page being flushed (Part of condent displays). The default �autoFlush� value is true.
    When the page buffer value is default size (8KB), and if any exception occurs after flushing the part of the content, instead of redirecting into error page, the error page content included in the original page.
    If i specify autoFlush="false" and with default buffer size, at the runtime if the buffer size is reached, i am getting stackoverflow error.
    To solve the above problem we can make it autoFlush=�false� and buffer=�100KB�. But we can�t predict the actual size of the page.
    I found in one of the weblogic forum as no solution for this issue. Ref.
    http://support.bea.com/application?namespace=askbea&origin=ask_bea_answer.jsp&event=link.view_answer_page_clfydoc&answerpage=solution&page=wls/S-10309.htm
    Please provide me any solution to resolve the problem.

    Error-Page tags work best with an error.html pages. If you have an error.jsp page what I would do, and I have, is wrap my classes and jsp pages in a try catch block where you forward to the error jsp page and display anything you want. YOu can also do this with if else statements. I have used the tomcat error pages before but when I've implemented them I used java.lang.Exception as the error to catch not Throwable. I don't know if this would make a difference or have anything to do with your problem.

  • Where to mention the IP address in a  JSP dyn page

    Hi ,
    I am creating a mail sending system with Javamail.
    Created the JSP dyn page,
    wrote the event handler in the java file. and all.
    now I have to mention the IP address of the SMTP server.
    where should I do this....
    inside the event handler itself?
    Thanks in advance.

    Hi
    The button tag in the jsp looks like this
    <hbj:button
            id="sendEmail"
            text="sendEmail"
            width="125px"
            tooltip="Click here to send mail"
            onClick="sendEmail"
            disabled="false"
            design="STANDARD"
            />
    The function to handle the button eventing occurs in the dynpage  . The function looks like
    public void sendEmail (Event event) { ..coding.. }
    Now when the button is clicked, the control is transferred to this event handler sendEmail and the code with init starts executed.
    Hope it is clear...
    Regards,
    Ganesh N

  • Error in sql server with a trigger (I want to display a customize message, when the user left a blank field or null) How can I do?

    How I display a customize message(with a trigger)when a user left a blank field? I want to the stop the insert statament if the user left  the status field in blank. I create a trigger but now I can't enter a row, i used an instead trigger
    too but doesn't work. I want to display a customize message when the user left the
    status field in blank or null. 
     I have the following code:
    CREATE TRIGGER [dbo].[BLANKFIELD] 
    ON [dbo].[Status] 
    FOR INSERT 
    AS 
    BEGIN 
    IF (SELECT COUNT(*) FROM inserted WHERE Status IS NULL) =1
     PRINT 'Please Fill the Status  field is required'
    Rollback;
    END 

    I agree with other comments that you should do this with specifying that the column is NOT NULL to prevent it from being NULL and a constraint if you don't want it to be blank (spaces or the empty string - note that the empty string is not the same thing
    as NULL).
    But for completeness, the reason your trigger does not ever allow you to enter a row is the code
    IF (SELECT COUNT(*) FROM inserted WHERE Status IS NULL) =1
    PRINT 'Please Fill the Status field is required'
    Rollback;
    Since you don't have a begin/end block after IF, the only conditionally executed statement is the one immediately following the IF (that is the PRINT).  So the Rollback is always executed whether or not the IF is true and so all updates are rejected.
    So if you were to do this in a trigger you could do something like the following
    CREATE TRIGGER [dbo].[BLANKFIELD]
    ON [dbo].[Status]
    FOR INSERT
    AS
    BEGIN
    IF EXISTS(SELECT * FROM inserted WHERE Status IS NULL)
    BEGIN
    PRINT 'Please Fill the Status field is required';
    Rollback;
    END
    END
    (As José noted, there can be more than one row in the inserted pseudo table, so you don't want to test whether the COUNT = 1, instead just whether one or more rows exist where the Status  is null.  If you want to prevent Status is NULL, or all
    spaces, or the empty string, then your IF statement would be
    IF EXISTS(SELECT * FROM inserted WHERE ISNULL(Status, '') = '')
    Tom

  • Jsp dyn page open form results in new window

    Hi everybody,
    I have a problem dispaying results in new window.
    My portal component is a dyn page that dispay several jsp pages based on a integer switch parameter checked in the
    doProcessBeforeOutput method.
    One page is a form with a button that call onSearch custom method inside my component; this method process the request,
    fill the bean and set the integer switch that doProcessBeforeOutput check then get the right jsp.
    All works fine but I want to display the onSearch method results in a new window.
    What I have to do?
    Thanks,
    Andrea

    Hi Andrea,
         I am also facing the same issue.
    Were you able to call the component method from the JavaScript code.
    I have to display the results in a new page.
    Will all the methods like doProcessBeforeOutput() be executed when we traverse after the search button is clicked ?
    Thanks in advance,
    Brian.
    Edited by: Brian Fernandes on Mar 30, 2010 12:34 PM

  • While Consuming a WebService in JSP Dyn Page - There is an Error

    Hi Friends,
    I have a web service created in ASP.NET web Service.
    And I have Consumed the Web Service using WSDL URL.
    I need to write a code to refer that class in the JSP DynPage
    I have created like this in DoIntialization
    MyServiceName obj=(MyServiceName) PortalRuntime.getRuntimeResources().getService(MyServiceName.KEY);
    int a = 10;
    int b = 20;
    obj.Add1(a,b);
    but it shows an error
    "The method Add1 Method(Add1 Method) is the type. MySErviceName is not Applicable for the arguements(int,int)"
    Please Help me in this regard.
    Thanks in Advance
    Thanks & Regards,
    Palani

    Hi Andy,
    I will let u know the sequence which i followed to consume the Webservice.
    NWDS --> File --> New --> Project --> Portal Application --> Create New Portal App Project.
    The Project is created.....
    After that i want to consume the Webservice for the same project...
    for that...
    NWDS --> File --> New --> Other --> Portal Application --> Create New Portal Application Object --> Selecting My Project?(intended prjct) --> Portal Webservice --> Portal Service from WSDL file - Client Side --> My WSDL URL --> Selecting the methods which i need to expose from the Webservice --> I gave unique name for my 1) Service 2) Alias 3) Package....and that was done....(other way is to add from portalapp.xml ??)
    After that i created a new JSPDyn page for my application in DoInitialization() method i tried to access the method from that webservice using the following code...
    MyServiceName obj=(MyServiceName) PortalRuntime.getRuntimeResources().getService(MyServiceName.KEY);
    I am successfully able to access the method from the webservice using the object which i have created but i am not able to pass arguments to that method...???
    I tried consuming same webservice created in .NET in .NET itself and i am able to pass arguments successfully.
    I tried to consume webservice created in ABAP in .NET and able to implement successfully...
    but the same ABAP webservice when  i tried to consume its not working with this NWDS.
    Is there any thing else i need to follow while consuming a webservice in the EP Perspectice of NWDS ???
    Deployable Proxy is required for that ?? if required how to create and use that ??
    Thanks in Advance,
    Palani

  • Response object in JSP Dyn page

    Hi SAP EP Gurus,
    I want to use response.setStatus() mehtod in jspdynpage but it is not working as expected. I am able to use other methods of response object like response.write().
    As per my knowledge if i set response.setStatus(200) is should send error to client but it is not seding error.
    It is working as same for both response.setStatus(200) and response.setStatus(500).
    Is there any special way to use response.setStatus() in portal? It is working as expected in normal jsp application.

    I tried but had no luck. Below is my JSPDYNPAGE code...
    <%@ page import="javax.servlet.http.HttpServletResponse" %>
    <%@ page import="com.sapportals.portal.prt.component.IPortalComponentRequest,com.sapportals.portal.prt.component.IPortalComponentResponse"%>
    <HTML>
         <head>
         </head>
         <body>
    <%
    IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
    HttpServletResponse servletResponse = request.getServletResponse(true);esss
    servletResponse.setStatus(500);
    %>
              </body>
         </HTML>
    It is not working showing portal run time error

  • Firefox start up page will not display/load correctly. I have removed and reinstalled with no luck.

    When I click on Firefox, the icon will appear as if the page has loaded. When I rest my curser over the icon it will display an un-interactive, small window, but will not load an active, full size window. I am unable to find "Troubleshooting Information" as listed below.

    Can you start Firefox in <u>[[Safe Mode|Safe Mode]]</u> by holding down the Shift/Options key?
    You can use one of these to start Firefox in <u>[[Safe Mode|Safe Mode]]</u>:
    *On Windows, hold down the Shift key while starting Firefox with a double-click on the Firefox desktop shortcut
    *On Mac, hold down the Options key while starting Firefox
    *Help > Restart with Add-ons Disabled
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    It is possible that your security software (firewall, anti-virus) blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox and the plugin-container from the permissions list in the firewall and let your firewall ask again for permission to get full, unrestricted, access to internet for Firefox and the plugin-container process and the updater process.
    See:
    *https://support.mozilla.org/kb/Server+not+found
    *https://support.mozilla.org/kb/Firewalls
    *https://support.mozilla.org/kb/fix-problems-connecting-websites-after-updating

  • Sytax highlighiting for Jsp Dyn Pages for portal development.

    Hey,
    I am doing JSP with the htmlb taglib for portals. When I edit a jsp page in the Developer Studio, I expect syntax highlighting. This is what I see in the documentation for jsp editing as well - you know where the keywords are highlighted.
    Sytax highlighiting for jsp in Developer Studio for portal development.
    http://help.sap.com/saphelp_nw04s/helpdata/en/ce/e0a341354ca309e10000000a155106/content.htm
    OutputSuccess.jsp, OutputSuccessText.jsp are the two jsp's that are syntax highlighted on this page.
    In my Developer Studio this is not the case. Is a JSP editor and its highlighting not part of the Developer Studio. If it is, how do I get it to work.
    I also know that given the right taglib's, the editor also gives autocomplete for taglibs with its settings. I am hoping to speed up my development with this.
    Right now I am using a text editor for this. There are a couple of jsp plugin's such as Exadel or Lomboz which I can integrate if a jsp syntax editor is not there in the Developer Studio. I just wanted to know the right way to go about this.
    Thank you for your help.
    Sumit.

    Never mind. I was in the preview mode.

  • Reading R3 table in JSP Dyn Page...URGENT

    Hi All,
    I have created an JSP Dynpage Application after reading this thread:
    <a href="https://www.sdn.sap.com/irj/sdn/thread?messageID=3417619#3417619">https://www.sdn.sap.com/irj/sdn/thread?messageID=3417619#3417619</a>
    <b>My PortalApp.xml file is:</b>
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
      <components>
        <component name="InteractiveList">
          <component-config>
            <property name="ClassName" value="com.abb.InteractiveList"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/InteractiveList.jsp"/>
          </component-config>
          <component-profile>
                <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
      </components>
      <services/>
    </application>
    My InteractiveList.java file contains:
    package com.amit;
    import java.util.Vector;
    import com.sap.engine.lib.xml.signature.Data;
    import com.sap.mw.jco.IFunctionTemplate;
    import com.sap.mw.jco.JCO;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.htmlb.table.DefaultTableViewModel;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.prt.component.IPortalComponentProfile;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    public class InteractiveList extends PageProcessorComponent {
      public DynPage getPage(){
        return new InteractiveListDynPage();
      public static class InteractiveListDynPage extends JSPDynPage{
        private DataBean DataBean = null;
        public void doInitialization(){
          IPortalComponentProfile profile = ((IPortalComponentRequest)getRequest()).getComponentContext().getProfile();
          Object o = profile.getValue("DataBean");
          if(o==null || !(o instanceof DataBean)){
               System.out.println("In the IF ");
            DataBean = new DataBean();
            profile.putValue("DataBean",DataBean);
          } else {
              DataBean = (DataBean) o;
           String name = "Amit ";
           DataBean.setname(name);
          // fill your bean with data here...
           //InteractiveList interactive_list = new InteractiveList();     
        public void doProcessAfterInput() throws PageException {
        public void doProcessBeforeOutput() throws PageException {
          this.setJspName("InteractiveList.jsp");
      public DefaultTableViewModel getData(String USER, String PWD,String R3ip) {
                     com.sap.mw.jco.IRepository repository;
                     JCO.Pool pool = JCO.getClientPoolManager().getPool("R3");
                     if (pool == null) {
                          //JCO.removeClientPool("R3");
                          JCO.addClientPool(
                               "R3",
                               10,
                               "120",
                               USER,
                               PWD,
                               "EN",
                               "138.223.4.106",
                               "00");
                     repository = JCO.createRepository("TTL", "R3");
                     JCO.Client client = null;
                     //               Get a function template from the repository
                     IFunctionTemplate ftemplate =
                          repository.getFunctionTemplate("BAPI_SALESORDER_GETSTATUS");
                     //           Create a function from the template
                     JCO.Function function = ftemplate.getFunction();
                                    client = JCO.getClient("R3");
                                    JCO.ParameterList input = function.getImportParameterList();
                     input.setValue("0053100700", "SALESDOCUMENT");
                                    client.execute(function);
                     JCO.Table sales_orders =
                          function.getTableParameterList().getTable("STATUSINFO");
                     Vector row = new Vector();
                     Vector tbl = new Vector();
                     Vector colNames = new Vector();
                     //     Loop over all rows
                     do {
                          //     Loop over all columns in the current row
                          for (JCO.FieldIterator e = sales_orders.fields();
                               e.hasMoreElements();
                               JCO.Field field = e.nextField();
                               row.add(field.getString());
                               //System.out.println(field.getName() + ":\t" + field.getString());
                          } //for
                          tbl.add(row);
                     } while (sales_orders.nextRow());
                     sales_orders = null;
                     sales_orders =
                          function.getTableParameterList().getTable("STATUSINFO");
                     sales_orders.nextRow();
                     for (JCO.FieldIterator e = sales_orders.fields();
                          e.hasMoreElements();
                          JCO.Field field = e.nextField();
                          colNames.add(field.getName().toString());
                     DefaultTableViewModel dtvModel =
                          new DefaultTableViewModel(tbl, colNames);
                     JCO.releaseClient(client);
                     return dtvModel;
    And my Bean Class contains following code:
    package com.amit;
    import java.io.Serializable;
    import com.sapportals.htmlb.table.DefaultTableViewModel;
    public class DataBean implements Serializable {
         public DefaultTableViewModel model;
         public String name;
         public DefaultTableViewModel getModel() {
              System.out.println("Hi There ");
              return model;
         public void setModel(DefaultTableViewModel model) {
              this.model = model;
         public String getname(){
              return name;
         public void setname(String name){
              this.name = name;
    When I try  to Run the par file I am getting the Static Text in TextView but Text from myBean.getname() is not coming.
    Can you tell me the reason. Is there any problem in the code.
    Thanks in Advance,
    Amit
    Message was edited by:
            Amit

    Double post http://forum.java.sun.com/thread.jspa?threadID=647550&tstart=0

  • Pass parameters from JSP Dyn Page to WDJ Application

    Hi,
    I am trying to pass parameters from my JSPDyn Page to WDJ Application.
    I am using NWDS 7.1 EHP1
    My code is :
    function to_WEBDYNHK()
          EPCM.relaxDocumentDomain();
          EPCM.doNavigate
        ('ROLES://pcd:portal_content/Himanshu.Himanshu/TestDynUIApp?DynamicParameter="hkparam%3Dqwertyuio"');
    This method is being called on click of a button.
    hkparam is the parameter in question.
    The JSPDyn page is an iView and the WDJ application is a page and both have been assigned to a role.
    In the properties of the WDJ Page, I have removed DymanicParameter from "Do not Forward These Parameters To Web Dynpro" property.
    However I am getting null as the value of hkparam in my WDJ application.
    The code used is :
    IWDRequest request = WDProtocolAdapter.getProtocolAdapter().getRequestObject();
           String param1= request.getParameter("hkparam");
    What seems to be missing here.
    Please help.
    I went through the documentation on SDN but it does not seem to help.
    TIA,
    Himanshu

    Hi Himanshu,
    Try this code.
    EPCM.doNavigate("ROLES:portal_content/Himanshu.Himanshu/TestDynUIApp?hkparam=Dmypass1123")
    if the parameter is hkparam and the value to be passed is Dmypass1123. You need not change any design time property of the WD page, and WDProtocolAdapter should retrive the parameter.
    Regards,
    Vishweshwara P.K.M.

  • Modify MSS with version 60.1.18  ( JSP Dyn Page Concept)

    Hi All,
    We are working with MSS Business package.Our requirement is to display the custom fields data(infotype P0006) in Emergency contact details in the employee profile details.We were able to track the par file from the business package.
    It is com.sap.pct.hcm.eeprofileemergencycontact
    Also SAP has not given Source code to modify, can we use de compilers to get the code and modify it as per the requirement.
    What needs to be done by us to achieve this.
    It is using JCO to connect to SAP.
    It is calling the bapi HRWPC_RFC_ADDRESS_GETLIST.
    Now if we require those custom fields I think I need to copy the code of the SAP FM and need to change it.And also observed that Class names , data stucture names are hardcoded in the code.
    For example Hrwpc_S_AddressType is one of the class used.
    How is SAP creating these class files. What I guess there must be standard way to generate the required class files when I need to call a FM in SAP.
    Can any one let me know the way to achieve this requirement.
    Regards,
    ND.

    Hello Roy,
    Did you create two aliases for the R3 system named "SAP_R3_HumanResources" and "SAP_R3_Finanacials".
    Just confirm the names (case sensitive)
    Hope this helps..
    Pradeep

  • Handle exception on server side and display a customized jsp error page

    Hi,
    I am developing a java/j2EE web application using servlet, jsp, ejb3 with JBOSS and ECLIPSE.
    Two cases can occur on the server side :
    1) either I have not an expected result in a method and in this case I want to display an error page (a JSP page I suppose) with a personnalized error message
    2) or I have an exception thrown and I want to display the exception message in the former JSP page
    I don't know how to cope with this problem of personnalized error message (or the message of a thrown exception) with a JSP page.
    Does anybody can help me ? Thank you
    Edited by: xflamant on Jun 20, 2009 10:51 AM

    For the case of an unknown Error, simply use a default error page.
    The redirection to this page can be accomplished by inserting folowing code into your web.xml:
         <error-page>
            <exception-type>java.lang.Throwable</exception-type>
            <location>/WEB-INF/jsp/error.jsp</location>       
        </error-page>Known exception can be caught via a try-catch block.
    Then simply dispatch to the page you want displayed an add an attribute containing the error message to the response object.
    This attribute can then be used in the target page to diplay the error.

  • Web-based BEx: How to display a customized message on the variable screen??

    Hi All,
    I'm now using the web-based BEx. Recently I want to display a customized message (e.g. the usage of the report) on the first page (i.e. the variable entry screen) of the query. Is it possible?
    Thanks.
    BR,
    M. Ng

    Hi marco,
          Check here. itmay help you.
    Custom Messages WAD
    Thanks,
    Vijay.

  • How to display a confirmation message before deletion

    Hi,
    I have an application and I want to display a confirmation message before people delete a record.
    The button on page 42 is number 90     "Supprimer cette fiche". It is a Submit as "DELETE_ALL". I have seen that the delete buttons are redirections to the url javascript:confirmDelete(htmldb_delete_message,'DELETE');, but I cannot use this as my button is not a redirection, but a submit.
    http://apex.oracle.com/pls/otn/f?p=4550
    Workaspace : ESPACE2008
    User : guest
    password : acdc2009
    Name of application is Activites
    Thank you for your kind answers.
    Christian

    Hi Christian.
    You can use the same logic for your own processing logic.
    the syntax is...
    javascript:confirmDelete(htmldb_delete_message,'YOUR_PROCESS_NAME');Replace 'YOUR_PROCESS_NAME' with the name of your page process that handles the bulk delete. Don't for get the single-quotes either side of your process name.
    Hope this helps.
    Simon

Maybe you are looking for