Topic
31 replies Latest Post - ‏2014-01-24T13:55:54Z by VeljkoC
mpemma
mpemma
20 Posts
ACCEPTED ANSWER

Pinned topic Automatic Start Center Refreshing for 2mins.

‏2011-04-15T10:12:02Z |
Hi All,
I have a requirement for refreshing the start center automatically for every 2 mins.
I have added java script code in Control.jsp in residing in Maximo folder.

<script type=text/javascript>
// The time out value is set to be 20,000 milli-seconds (or 20
seconds)
setTimeout(' document.location=document.location' ,20000);
</script>

This is not working for me. I am working in Maximo 7 Version. Any help would be aprreciated.

Thanks in Advance
Manasa.
Updated on 2012-12-18T06:30:44Z at 2012-12-18T06:30:44Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    5842 Posts
    ACCEPTED ANSWER

    Re: Automatic Start Center Refreshing for 2mins.

    ‏2011-04-15T10:26:09Z  in response to mpemma
    Even we have the same requirement in our project.

    Instead of document.location=document.location try with window.location=window.location.

    This is working fine with our environemnt.
    • mpemma
      mpemma
      20 Posts
      ACCEPTED ANSWER

      Re: Automatic Start Center Refreshing for 2mins.

      ‏2011-04-15T14:33:43Z  in response to SystemAdmin
      Hi Valavan,
      Client came up with new req, screen refresh for a particular group, Can we do it ?
      Please help me. I found some code in Maximokb forums. Will this code be helpful ?

      http://www.maximokb.com/kb/index.php?View=entry&EntryID=161

      By the way, have you worked with TCS earlier ? if yes? i have heard about you from VijayaBanu and Grace Raj. I was with them for last two projects.

      Thanks
      Manasa.
      • SystemAdmin
        SystemAdmin
        5842 Posts
        ACCEPTED ANSWER

        Re: Automatic Start Center Refreshing for 2mins.

        ‏2011-04-16T07:23:52Z  in response to mpemma
        Hi Manasa,

        Yes, I was working with TCS earlier. I know them very well.

        Could you please send me your requirement. You can use the same code which you have found in the maximo KB if your requirement is related to particular group.

        Thanks
        Valavan.
        • mpemma
          mpemma
          20 Posts
          ACCEPTED ANSWER

          Re: Automatic Start Center Refreshing for 2mins.

          ‏2011-04-16T17:17:03Z  in response to SystemAdmin
          Hi Valavan,
          The requirement is Maximo screen will be connected to a projector and the details have to be refreshed automatically for every two minutes.
          This will be used only by a particular group.
          I have got the code in Maximokb forum, but not sure where to write this code in Control.jsp because earlier code also didn't work for me when I changed the code to window.location in the java script.
          If you could let me know where to write the code whether in the beginning or at the end in Control.Jsp file that would be of great help. Was wondering because my control.jsp file is not residing in the same folder structure that is mentioned in the forum.(Maximo\applications\maximo\maximouiweb\webmodule\webclient\controls\startcenter\control.jsp)
          My control.jsp is in components folder. Does this effect the refresh part in any way?
          Any help would be appreciated !!

          Thanks and regards,
          Manasa.
          • SystemAdmin
            SystemAdmin
            5842 Posts
            ACCEPTED ANSWER

            Re: Automatic Start Center Refreshing for 2mins.

            ‏2011-04-18T07:00:19Z  in response to mpemma
            What is maximo version 7 or 6. Id it is maximo 7 then you have to do this in startcenter-options.jsp
            • mpemma
              mpemma
              20 Posts
              ACCEPTED ANSWER

              Re: Automatic Start Center Refreshing for 2mins.

              ‏2011-04-19T07:58:04Z  in response to SystemAdmin
              Hi Valavan,
              Thanks alot for your help.After adding code to the startcenter-options.jsp.Automatic screen refresh.But when I added the code for a particular group, this is not working.It throws error at
              this line.

              <mro:handleevent eventtype="pageinit">
              <mro:instantiatebean beanclass="psdi.webclient.system.beans.DataBean"/>

              When I checked the bean folder, there is no StartCenterAppBean class. It resides in classes\psdi\webclient\beans\startcntr in maximo7.
              This particular class is not being called. Is there any way to resolve this issue.

              Thanks
              Manasa.
              • SystemAdmin
                SystemAdmin
                5842 Posts
                ACCEPTED ANSWER

                Re: Automatic Start Center Refreshing for 2mins.

                ‏2011-04-19T10:34:32Z  in response to mpemma
                Could you please attach the log file for more details.
                • mpemma
                  mpemma
                  20 Posts
                  ACCEPTED ANSWER

                  Re: Automatic Start Center Refreshing for 2mins.

                  ‏2011-04-19T11:29:20Z  in response to SystemAdmin
                  Hi Valavan,
                  This error comes on the Start center page. JSP processing error.

                  HTTP Error Code: 500
                  Error Message:
                  com.ibm.ws.jsp.JspCoreException: JSPG0049E: /webclient/components/startcenter-options.jsp failed to compile :
                  JSPG0091E: An error occurred at line: 21 in the file: /webclient/components/startcenter-options.jsp
                  JSPG0093E: Generated servlet error from file: /webclient/components/startcenter-options.jsp
                  -----**\maximouiweb.war\webclient\components\_startcenter_2D_options.java : 128 : StartCenterAppBean cannot be resolved to a type
                  JSPG0091E: An error occurred at line: 21 in the file: /webclient/components/startcenter-options.jsp
                  JSPG0093E: Generated servlet error from file: /webclient/components/startcenter-options.jsp
                  -----**\maximouiweb.war\webclient\components\_startcenter_2D_options.java : 128 : StartCenterAppBean cannot be resolved to a type
                  JSPG0091E: An error occurred at line: 21 in the file: /webclient/components/startcenter-options.jsp

                  I hope this information is will be helpful to track the error.
                  StartAppBean is residing in *\maximouiweb\webmodule\WEB-INF\classes\psdi\webclient\beans\startcntr, not in DataBean.This is the difference I could see in Maximo 6 and Maximo7.

                  At the bottom of the start center all the result sets that I created are appearing fine.
                  This error is coming on the same page. I changed the code to the security group I created and then added to the start center-options.jsp. Not sure where I am going wrong.

                  Please let me know if you need some more information about the error.

                  Thanks
                  Manasa.
                  • mpemma
                    mpemma
                    20 Posts
                    ACCEPTED ANSWER

                    Re: Automatic Start Center Refreshing for 2mins.

                    ‏2011-04-19T14:24:16Z  in response to mpemma
                    Hi,

                    I got the problem resolved. It was not pointing to the correct bean class folder in Maximo7.

                    Thanks Valavan.

                    Regards
                    Manasa.
                    • pmarie
                      pmarie
                      13 Posts
                      ACCEPTED ANSWER

                      Re: Automatic Start Center Refreshing for 2mins.

                      ‏2011-06-28T17:05:25Z  in response to mpemma
                      Hello,
                      I'm having the same issue. The code I included to startcenter-options.jsp is the following :

                      
                      <mro:handleevent eventtype=
                      "pageinit"> <mro:instantiatebean beanclass=
                      "*psdi.webclient.beans.startcntr.StartCenterAppBean*"/>   <% 
                      
                      try 
                      { StartCenterAppBean startcenter = (StartCenterAppBean)sessionContext.getCurrentApp().getAppBean(); psdi.mbo.MboRemote mbo = startcenter.getMbo(); String where = 
                      "groupname = 'MAXADMIN' and userid in (select userid from maxuser where personid = '" + mbo.getUserInfo().getPersonId() + 
                      "')"; psdi.mbo.MboSetRemote groups = mbo.getMboSet(
                      "$GROUPUSER", 
                      "GROUPUSER", where); groups.moveFirst(); 
                      
                      if ( !groups.isEmpty() ) 
                      { %> <script type=text/javascript> setTimeout(
                      ' window.location=window.location' ,10000); </script> <% 
                      } 
                      } 
                      
                      catch (Exception e) 
                      { e.printStackTrace(); 
                      } %>
                      


                      Can you please let me know what bean class folder you are calling?

                      Thanks in advance
                      Philippe
                      • mpemma
                        mpemma
                        20 Posts
                        ACCEPTED ANSWER

                        Re: Automatic Start Center Refreshing for 2mins.

                        ‏2011-06-29T08:45:14Z  in response to pmarie
                        Hi,
                        Actually in the code given for particular security group in maximokb does not work for maximo 7.
                        this is because : mro instatiation is not being recognized in maximo 7. New code needs to be appended for maximo7. Remove the instantiation line code. We tried Getting the app bean associated with the current start centre by adding path to the existing code and it worked.

                        Thanks
                        Manasa.
                        • pmarie
                          pmarie
                          13 Posts
                          ACCEPTED ANSWER

                          Re: Automatic Start Center Refreshing for 2mins.

                          ‏2011-07-01T13:39:07Z  in response to mpemma
                          Hello,
                          I've made some progress but I still get a last error.

                          Code :
                          
                          <%@ page import=
                          "psdi.webclient.beans.startcntr.*" %>   <% 
                          
                          try 
                          { StartCenterAppBean startcenter = (StartCenterAppBean)sessionContext.getCurrentApp().getAppBean(); psdi.mbo.MboRemote mbo = startcenter.getMbo(); String where = 
                          "groupname = 'MAXADMIN' and userid in (select userid from maxuser where personid = '" + mbo.getUserInfo().getPersonId() + 
                          "')"; psdi.mbo.MboSetRemote groups = mbo.getMboSet(
                          "$GROUPUSER", 
                          "GROUPUSER", where); groups.moveFirst(); 
                          
                          if ( !groups.isEmpty() ) 
                          { %> <script type=text/javascript> setTimeout(
                          ' window.location=window.location' ,10000); </script> <% 
                          } 
                          } 
                          
                          catch (Exception e) 
                          { e.printStackTrace(); 
                          } %>
                          


                          Error :
                          
                          JSPG0049E: /webclient/components/startcenter-options.jsp n
                          'a pas r?ussi ? compiler :  JSPG0091E: Une erreur est survenue ? la ligne : 56 du fichier : /webclient/components/startcenter-options.jsp JSPG0093E: Erreur de servlet g?n?r?e ? partir du fichier : /webclient/components/startcenter-options.jsp C:\Program Files\IBM\WebSphere\AppServer\profiles\ctgAppSrv01\temp\ctgNode01\MXServer\MAXIMO\maximouiweb.war\webclient\components\_startcenter_2D_options.java : 352 : sessionContext cannot be resolved
                          


                          Do you have any idea??
                          • mpemma
                            mpemma
                            20 Posts
                            ACCEPTED ANSWER

                            Re: Automatic Start Center Refreshing for 2mins.

                            ‏2011-07-04T13:15:39Z  in response to pmarie
                            Hi ,
                            try adding this: <mro:handleevent eventtype="pageinit"> I didnt remove it.
                            I have added the same line of code which you have written.
                            • pmarie
                              pmarie
                              13 Posts
                              ACCEPTED ANSWER

                              Re: Automatic Start Center Refreshing for 2mins.

                              ‏2011-07-04T13:42:32Z  in response to mpemma
                              Hello,
                              Thank you for your answer, unfortunately, even with this statement, sessionContext still cannot be resolved :( I don't understand why...

                              I don't see its initialisation in the code so I guess the code assume it already exists but that doesn't seem to be the case...
                    • ec3
                      ec3
                      27 Posts
                      ACCEPTED ANSWER

                      Re: Automatic Start Center Refreshing for 2mins.

                      ‏2011-07-20T20:28:24Z  in response to mpemma
                      could you provide me with the syntax of the path used to instantiate the bean. I am also using Maximo 7 and getting the same error. In addition, I noticed the use of the namespace MRO. What did you use in the tags or do you not need to use MRO?
  • pmarie
    pmarie
    13 Posts
    ACCEPTED ANSWER

    Re: Automatic Start Center Refreshing for 2mins.

    ‏2011-09-12T08:18:18Z  in response to mpemma
    Hello,
    I was wondering if anyone had made some progress to make this code works in Maximo 7.

    Thanks in advance
    • crozwise
      crozwise
      63 Posts
      ACCEPTED ANSWER

      Re: Automatic Start Center Refreshing for 2mins.

      ‏2011-09-12T08:22:12Z  in response to pmarie
      it works well on TSRM 7.2
      • pmarie
        pmarie
        13 Posts
        ACCEPTED ANSWER

        Re: Automatic Start Center Refreshing for 2mins.

        ‏2011-09-12T08:28:22Z  in response to crozwise
        Hello crozwise,
        I tested it in TSRM 7.2.1 also and I still get the same error (cf my previous posts). The Javascript part that make the page refresh works pretty well indeed but I can't make it work with the JSP part that would activate it only for specific security groups.

        Could you please copy/paste here the code or send me the JSP file by mail or Sametime (Philippe MARIE in France).

        Thanks in advance
        • crozwise
          crozwise
          63 Posts
          ACCEPTED ANSWER

          Re: Automatic Start Center Refreshing for 2mins.

          ‏2011-09-12T08:34:18Z  in response to pmarie
          Oh i am sorry i didnt try with specific security groups, just refreshes the start center fo everyone as you did.
          i hope somebody will help you with that,

          Regards
          • pmarie
            pmarie
            13 Posts
            ACCEPTED ANSWER

            Re: Automatic Start Center Refreshing for 2mins.

            ‏2011-09-12T14:46:00Z  in response to crozwise
            With the help of a colleague, i finally found what was missing! Here is the working code :

            
            <%@ page import=
            "psdi.webclient.beans.startcntr.*" %> <% 
            
            try 
            { SessionContext sessionContext = 
            
            new SessionContext(wcs); StartCenterAppBean startcenter = (StartCenterAppBean)sessionContext.getCurrentApp().getAppBean(); psdi.mbo.MboRemote mbo = startcenter.getMbo(); String where = 
            "groupname = 'ZEQUIPETECHNIQUE' and userid in (select userid from maxuser where personid = '" + mbo.getUserInfo().getPersonId() + 
            "')"; psdi.mbo.MboSetRemote groups = mbo.getMboSet(
            "$GROUPUSER", 
            "GROUPUSER", where); groups.moveFirst(); 
            
            if ( !groups.isEmpty() ) 
            { %> <script type=text/javascript> setTimeout(
            'window.location=window.location' ,10000); </script> <% 
            } 
            } 
            
            catch (Exception e) 
            { e.printStackTrace(); 
            } %>
            
            • taslima.vora
              taslima.vora
              39 Posts
              ACCEPTED ANSWER

              Re: Automatic Start Center Refreshing for 2mins.

              ‏2011-09-14T14:06:51Z  in response to pmarie
              Hello Philippe Marie,

              Is this problem resolved?

              Thanks
              • pmarie
                pmarie
                13 Posts
                ACCEPTED ANSWER

                Re: Automatic Start Center Refreshing for 2mins.

                ‏2011-09-14T14:19:14Z  in response to taslima.vora
                Hello,
                Yes i solved my problem with the code I posted earlier.
                • crozwise
                  crozwise
                  63 Posts
                  ACCEPTED ANSWER

                  Re: Automatic Start Center Refreshing for 2mins.

                  ‏2011-09-20T13:10:41Z  in response to pmarie
                  Hi pmarie,

                  COuld you tell me how did you define wcs?

                  I think it is a defined name for WebClientSession class but i wonder how you assigned class reference to wcs.

                  Thanks
                  • pmarie
                    pmarie
                    13 Posts
                    ACCEPTED ANSWER

                    Re: Automatic Start Center Refreshing for 2mins.

                    ‏2011-09-20T14:37:04Z  in response to crozwise
                    wcs variable was already existent :)
                    • crozwise
                      crozwise
                      63 Posts
                      ACCEPTED ANSWER

                      Re: Automatic Start Center Refreshing for 2mins.

                      ‏2011-09-22T06:02:49Z  in response to pmarie
                      i used your code and i got error wcs is undefined name.

                      can you attach your startcenter-options.jsp page, i think i am missing something.

                      thank you
                      • pmarie
                        pmarie
                        13 Posts
                        ACCEPTED ANSWER

                        Re: Automatic Start Center Refreshing for 2mins.

                        ‏2011-09-22T07:56:56Z  in response to crozwise
                        Hello,
                        Please find attached my startcenter-options.jsp file
                        • crozwise
                          crozwise
                          63 Posts
                          ACCEPTED ANSWER

                          Re: Automatic Start Center Refreshing for 2mins.

                          ‏2011-09-22T08:01:48Z  in response to pmarie
                          i couldnt see your code inside startcenter-options.jsp, the page you attached seems to be a 404 response page.

                          can you re-check and attach it again,

                          thanks
  • SystemAdmin
    SystemAdmin
    5842 Posts
    ACCEPTED ANSWER

    Re: Automatic Start Center Refreshing for 2mins.

    ‏2012-12-18T06:30:44Z  in response to mpemma
    Hi All,

    I have made changes to the 'startcenter-options.jsp' to automatically refresh the start center every 1 minute. I am working on Maximo 7 version.
    If I remain on the start center page in maximo, the page refreshes every minute but after a number of successful refreshes I get the following error displayed:

    'Error 503: You have reached the maximum number of sessions allowed for a user.'

    Has anyone else experienced this error when they implemented the automatic refresh?
    Any help would be much appreciated.

    Thanks,
    Deirdre.
    • MartinEH
      MartinEH
      3 Posts
      ACCEPTED ANSWER

      Re: Automatic Start Center Refreshing for 2mins.

      ‏2013-05-03T09:47:45Z  in response to SystemAdmin

      Hi,

      I had the same problem with the Startcenter refresh. I opened a PMR but there is no solution.

      The Refresh action will send a full request to the Maximo application server which given that the URL has a full path for the application being accessed and the username/password tokens are still valid, the browser will in fact make a new page request which will translate into a new user session being created to access a specific page rather than going via the login page then navigating to the desired application.

      In the SystemOut.log of the Server you can see the number of UISessions increasing.

      You can change the value of mxe.webclient.maxuisessions so the error does not accur anymore.

      https://www-304.ibm.com/support/docview.wss?uid=swg21412767 

       

      But the UISessions will still be created. I don´t know if your server will then run out of memory....

       

      Regards

       

       

       

      • VeljkoC
        VeljkoC
        82 Posts
        ACCEPTED ANSWER

        Re: Automatic Start Center Refreshing for 2mins.

        ‏2014-01-24T13:55:54Z  in response to MartinEH

        Hi,

         

        I also expereinced this error with refresh script.

        Is it only solution to  to increase uisession system property to 0? Currently mxe.webclient.maxuisessions is set to 0 and mxe.webclient.maxUISessionsPerHttpSession is set to 10. Refresh is done on every 3 minutes.

        What is the final solution?

        Is it really final solution from IBM to disable refresh of start center or to set both parameters to 0 (unlimited)?

         

        Thank you in advance