Simple Servlet Example - Using Tuxedo JOLT

Hi
I am trying to run the sample Tuxedo provided application which uses Servlets. I had configured JSL & JSH properly and had booted the Tuxedo Service and they are all running properly.
I have WebLogic Server installed and had created the JoltSessionPool with name "samplejoltpool" and had also defined the StartupClass & ShutdonClass. While defining the JoltSessionPool i had given min services as 5 and max services as 10 becasue I used the following definition for JSL in UBBCONFIG.
CLOPT="-A -- -n //172.20.34.17:7777 -m5 -M10 -x5"
No as per the guide they are asking me to Restart WebLogic Server when I did so. I got an error I went into WebLogic Log and found out the following in the Log. It states
CRITICAL [06:52:35] (JDKLog4jAdapter.java:log:80) - Failed to invoke startup class "TuxedoStartupClass", java.lang.Exception: Errors in starting the following connection pools :
com.bea:Name=demojoltpool,Type=JoltConnectionPool : Cannot create 5 connections
The Entire Trace from the Log file is:
NOTICE [06:52:34] (JDKLog4jAdapter.java:log:80) - The server initialized the domain log broadcaster successfully. Log messages will now be broadcasted to the domain log.
INFO [06:52:34] (JDKLog4jAdapter.java:log:80) - Initialized the Diagnostic Accessor Service.
INFO [06:52:34] (JDKLog4jAdapter.java:log:80) - Invoking bea.jolt.pool.servlet.weblogic.PoolManagerStartUp.main(null)
CRITICAL [06:52:35] (JDKLog4jAdapter.java:log:80) - Failed to invoke startup class "TuxedoStartupClass", java.lang.Exception: Errors in starting the following connection pools :
com.bea:Name=demojoltpool,Type=JoltConnectionPool : Cannot create 5 connections
java.lang.Exception: Errors in starting the following connection pools :
com.bea:Name=demojoltpool,Type=JoltConnectionPool : Cannot create 5 connections
     at bea.jolt.pool.servlet.weblogic.impl.PoolManagerStartUpJMX.startup(PoolManagerStartUpJMX.java:216)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:615)
     at bea.jolt.pool.servlet.weblogic.PoolManagerStartUp.main(PoolManagerStartUp.java:38)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:615)
     at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeMain(ClassDeploymentManager.java:353)
     at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:263)
     at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54)
     at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(Unknown Source)
     at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClassDeployment(ClassDeploymentManager.java:198)
     at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClassDeployments(ClassDeploymentManager.java:177)
     at weblogic.management.deploy.classdeployment.ClassDeploymentManager.runStartupsAfterAppActivation(ClassDeploymentManager.java:158)
     at weblogic.management.deploy.classdeployment.StartupClassPrelistenService.start(StartupClassPrelistenService.java:13)
     at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Can someone help me out to overcome this error. The JooltSessionPool entry properties are as below.
Name : demojoltpool
Min Pool Size : 5
Max Pool Size : 10
Recv Timeout : 30
Prim Addr : //172.20.34.17:7777
With Regards
Venkat
Tata Consultancy Services
India

The problem was with JVM total memroy available when I try to create 5 Session Pools the JVM memeory goes to 97% that is the main reason why it is failling. I restarted all the processes in the server now it seems to be working fine without any issues.

Similar Messages

  • Looking for simple search example using SELECT

    Can anyone link me to an example of how to create a basic search page where the search criteria is selected in a drop-down list (<SELECT> in HTML)?
    Here's where I'm coming from so you have a better idea of what I'm trying to do. I've created a search page by creating a method in my App Module java class using setWhereClause(), then dropped my view onto my web page as a read-only table, and finally dropped the method and parameter as a command button and input text field, respectively. This works fine, but I'd like to replace the input text field with a select box so that the users will not have to type in their search criteria. I'd like to populate the drop-down with data from a table, which will then be sent as the argument for the method.
    I can create a ViewObject that contains the data I need, but I'm not sure where to go from there. I don't know how to create the drop-down list or connect the command button to the list. (Ultimately, I'd like to have the search text submitted when the drop-down changes, but I'll settle for pressing the button for now). I've fooled with using the LOV component, but without any luck.
    Step-by-step would be great, but if you can point me to an example, some documentation, etc., that would be great too.
    Thanks,
    Andy

    Excellent - Thanks for the link to the sample code page. I thought I had seen all the tutorials, etc. but for some reason never came across this page. The example you cited looks like it's just what I'm looking for.
    (Edit - For anyone who's interested, here's a step-by-step for creating a databound drop down list:
    http://www.oracle.com/technology/products/jdev/tips/mills/databound_lists.html )
    Andy

  • Where can find a simple BPEL example using Jdeveloper

    Hi, I'm a beginner of BPEL. I searched about BPEL developing documents on OTN, but I cannot find an example for Jdeveloper. Who can tell me how Jdeveloper create a BPEL project, then call the BPEL in JSP/JSF.
    Thanks.
    Stone

    Hi,
    take a look at this document:
    http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28983/toc.htm
    or more detailed at
    http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/toc.htm

  • Unable to deploy a simple servlet using WAR file on Oracle9iAS v9.0.3

    Hi All,
    I am facing problem while deploying a simple servlet using WAR file on Oracle 9i App Server.
    I have installed Oracle9iAS J2EE and Web Cache v9.0.3 on Windows 2000 server.
    It includes:
         - Oracle HTTP Server
         - Oracle9iAS Containers for J2EE
         - Oracle9iAS Web Cache
         - Oracle Enterprise Manager
    The release of installed Oracle9iAS is Release 2 (9.0.3)      
    I referred following link to Deploy Applications Using WAR file:
         http://otn.oracle.com/products/ias/daily/sept12.html
    As mentioned in this documentation I have followed following steps to deploy WAR file:
    1] I have created a war file by name SimpleServlet.war. In SimpleServlet.war, there is a servlet by name Simple which prints time at which servlet was accessed.
    2] I have modified <ora9ias_home>\j2ee\home\config\application.xml and added following web module entry:
         <web-module id="SimpleServlet" path="../../home/applications/SimpleServlet.war" />
    3] To make this module accessible from over the web, I have modified file
         <ora9ias_home>\j2ee\home\config\default-web-site.xml and added following entry:
         <web-app application="SimpleServlet" name="SimpleServlet" root="/SimpleServlet"/>
    4] I saved both the files and started Oracle HTTP Server and accessed page as below:
              http://<server>:7777/SimpleServlet/Simple
    where Simple is servlet in SimpleServlet.war file.          
    In the browser, The page cannot be found is shown to user. I have verified that SimpleServlet.war is extracted to SimpleServlet folder under <ora9ias_home>\j2ee\home\applications folder. I found that Simple.class is stored under WEB-INF/classes folder and web.xml contains correct entry for url pattern for servlet Simple.
    What else could be the problem? Am I placing the war file in wrong place or modifying application.xml or default-web-site.xml in a wrong directory?
    This is very urgent. Please help me with your valuable comments on this.
    Thanks in advance.
    Regards,
    Sandesh

    Hi All,
    I am facing problem while deploying a simple servlet
    using WAR file on Oracle 9i App Server.
    I have installed Oracle9iAS J2EE and Web Cache v9.0.3
    on Windows 2000 server.
    It includes:
         - Oracle HTTP Server
         - Oracle9iAS Containers for J2EE
         - Oracle9iAS Web Cache
         - Oracle Enterprise Manager
    The release of installed Oracle9iAS is Release 2
    (9.0.3)      
    I referred following link to Deploy Applications
    Using WAR file:
         http://otn.oracle.com/products/ias/daily/sept12.html
    As mentioned in this documentation I have followed
    following steps to deploy WAR file:
    1] I have created a war file by name
    SimpleServlet.war. In SimpleServlet.war, there is a
    servlet by name Simple which prints time at which
    servlet was accessed.
    2] I have modified
    <ora9ias_home>\j2ee\home\config\application.xml and
    added following web module entry:
    <web-module id="SimpleServlet"
    path="../../home/applications/SimpleServlet.war" />
    3] To make this module accessible from over the web,
    I have modified file
    <ora9ias_home>\j2ee\home\config\default-web-site.xml
    and added following entry:
    <web-app application="SimpleServlet"
    name="SimpleServlet" root="/SimpleServlet"/>
    4] I saved both the files and started Oracle HTTP
    Server and accessed page as below:
              http://<server>:7777/SimpleServlet/Simple
    where Simple is servlet in SimpleServlet.war file.          
    In the browser, The page cannot be found is shown to
    user. I have verified that SimpleServlet.war is
    extracted to SimpleServlet folder under
    <ora9ias_home>\j2ee\home\applications folder. I found
    that Simple.class is stored under WEB-INF/classes
    folder and web.xml contains correct entry for url
    pattern for servlet Simple.
    What else could be the problem? Am I placing the war
    file in wrong place or modifying application.xml or
    default-web-site.xml in a wrong directory?
    This is very urgent. Please help me with your
    valuable comments on this.
    Thanks in advance.
    Regards,
    SandeshHave you restarted you http server and then tried to load it again? Are you using the right port; maybe you have to use port 7778? Check you server settings in the http server instance. Also check your url binding of you application at Farm > Application Server: infrastructurehost > OC4J_instance > Application: appname > Web Module: modulename
    Good luck!
    rgds Thomas

  • Unable to deploy a simple servlet using WAR file

    Hi All,
    I am facing problem while deploying a simple servlet using WAR file on Oracle 9i App Server.
    I have installed Oracle 9i App Server. I referred following link to Deploy Applications Using WAR file:
         http://otn.oracle.com/products/ias/daily/sept12.html
    As mentioned in this documentation I have followed following steps to deploy WAR file:
    1] I have created a war file by name SimpleServlet.war. In SimpleServlet.war, there is a servlet by name Simple which prints time at which servlet was accessed.
    2] I have modified <ora9ias_home>\j2ee\home\config\application.xml and added following web module entry:
         <web-module id="SimpleServlet" path="../../home/applications/SimpleServlet.war" />
    3] To make this module accessible from over the web, I have modified file
         <ora9ias_home>\j2ee\home\config\default-web-site.xml and added following entry:
         <web-app application="SimpleServlet" name="SimpleServlet" root="/SimpleServlet"/>
    4] I saved both the files and started Oracle HTTP Server and accessed page as below:
              http://<server>:7777/SimpleServlet/Simple
    where Simple is servlet in SimpleServlet.war file.          
    In the browser, The page cannot be found is shown to user. I have verified that SimpleServlet.war is extracted to SimpleServlet folder under <ora9ias_home>\j2ee\home\applications folder. I found that Simple.class is stored under WEB-INF/classes folder and web.xml contains correct entry for url pattern for servlet Simple.
    What else could be the problem? Am I placing the war file in wrong place or modfiying application.xml or default-web-site.xml in a wrong directory?
    This is very urgent. Please help me with your valuable comments on this.
    Thanks in advance.
    Regards,
    Sandesh

    Hi Juliana,
    Thanks a lot for your suggestion.
    I am sorry if I have posted this message to a wrong forum. This is first time I am posting a message to OTN. I will resend message to J2EE forum as per you suggestion.
    Meanwhile, please note information you asked for is as below:
    I installed Oracle9iAS J2EE and Web Cache v9.0.3 on Windows 2000 server.
    It includes:
         - Oracle HTTP Server
         - Oracle9iAS Containers for J2EE
         - Oracle9iAS Web Cache
         - Oracle Enterprise Manager
    The release of installed Oracle9iAS is Release 2 (9.0.3)      
    Please do reply at the earliest.
    Once again thanks and look forward to hear from you.
    Regards,
    Sandesh

  • Example of  a Simple ALV Report using Function Modules (not OO)

    Hi,
    I am new to ABAP. Where can I get a proper Example of  a Simple ALV Report using Function Modules?  I searched the forum but did not find a proper solution. Kindly help.
    Smruthi.
    Edited by: Smruthi Acharya on Jan 29, 2009 7:13 PM

    Hi,
    Use this demo code:-
    REPORT  z_alv01 MESSAGE-ID zmsg.
    *          TABLES
    TABLES : ekpo.
    *          TYPE POOLS
    TYPE-POOLS : slis.
    *          TYPE DECLARATION
    TYPES : BEGIN OF t_ekpo,
              ebeln TYPE ekpo-ebeln,
              ebelp TYPE ekpo-ebelp,
              matnr TYPE ekpo-matnr,
              werks TYPE ekpo-werks,
              menge TYPE ekpo-menge,
            END OF t_ekpo.
    *          PARAMETERS
    PARAMETERS : s_var TYPE disvariant-variant.
    *          DATA DECLARATION
    *VARIABLES
    DATA : check(1),
           rep_id TYPE sy-repid.
    *INTERNAL TABLE TYPE OF ZEKPO
    DATA : it_ekpo TYPE STANDARD TABLE OF t_ekpo WITH HEADER LINE.
    *FIELD CATALOG
    DATA : it_field TYPE slis_t_fieldcat_alv,
           wa_field TYPE slis_fieldcat_alv.
    *SORTING
    DATA : it_sort TYPE slis_t_sortinfo_alv,
           wa_sort TYPE slis_sortinfo_alv.
    *FOR TOP OF THE PAGE
    DATA : it_top TYPE slis_t_listheader,
           wa_top TYPE slis_listheader.
    *FOR END OF THE PAGE
    DATA : it_end TYPE slis_t_listheader,
           wa_end TYPE slis_listheader.
    *TO CAPTURE EVENTS AND HANDLE
    DATA : it_event TYPE slis_t_event,
           wa_event TYPE slis_alv_event.
    *FOR GRID TITLE
    DATA : wa_title TYPE lvc_title.
    *FOR LAYOUT
    DATA : wa_layout TYPE slis_layout_alv.
    *FOR EXCLUDING STANDARD BUTTON FROM ALV TOOLBAR
    DATA : it_exclude TYPE slis_t_extab,
           wa_exclude TYPE slis_extab.
    *FOR VARIANT
    DATA : wa_variant TYPE disvariant.
    *          INITIALIZATION
    INITIALIZATION.
      check = 'X'.
      rep_id = sy-repid.
      wa_variant-report = sy-repid.
    *GET DEFUALT ON THE SELECTION SCREEN FOR DEFAULT DISPLAY
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save        = 'A'
        CHANGING
          cs_variant    = wa_variant
        EXCEPTIONS
          wrong_input   = 1
          not_found     = 2
          program_error = 3
          OTHERS        = 4.
      IF sy-subrc = 0.               " IF DEFAULT VARIANT FOUND
        s_var = wa_variant-variant.  " PASS THE DEFAULT VARIANT TO THE SELECTION SCREEN FIELD
      ENDIF.
    *          AT-SELECTION SCREEN ON VALUE REQUEST
    *          TO GET THE F4 HELP FOR VARIANT
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_var.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant                = wa_variant
    *   I_TABNAME_HEADER          =
    *   I_TABNAME_ITEM            =
    *   IT_DEFAULT_FIELDCAT       =
         i_save                    = 'A'
    *   I_DISPLAY_VIA_GRID        = ' '
       IMPORTING
    *   E_EXIT                    =
         es_variant                = wa_variant
       EXCEPTIONS
         not_found                 = 1
         program_error             = 2
         OTHERS                    = 3.
      IF sy-subrc = 0.
        s_var = wa_variant-variant. " PASS THE SELECTED VARIANT TO THE SELECTION SCREEN FIELD
      ENDIF.
    *          AT-SELECTION SCREEN
    *          TO CHECK THE EXISTENCE FOR VARIANT
    AT SELECTION-SCREEN.
      wa_variant-variant = s_var.
      CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
        EXPORTING
          i_save        = 'A'
        CHANGING
          cs_variant    = wa_variant
        EXCEPTIONS
          wrong_input   = 1
          not_found     = 2
          program_error = 3
          OTHERS        = 4.
      IF sy-subrc <> 0.
        MESSAGE w001.
      ENDIF.
    *          START OF SELECTION
    START-OF-SELECTION.
      SELECT ebeln
             ebelp
             matnr
             werks
             menge
             FROM ekpo
             INTO TABLE it_ekpo.
    *          FIELD CATALOG
      wa_field-fieldname = 'EBELN'.
      wa_field-tabname = 'IT_TAB'.
      wa_field-outputlen = 10.
      wa_field-seltext_l = 'PO #'.
      APPEND wa_field TO it_field.
      CLEAR wa_field.
      wa_field-fieldname = 'EBELP'.
      wa_field-tabname = 'IT_TAB'.
      wa_field-outputlen = 10.
      wa_field-seltext_l = 'Line Item'.
      APPEND wa_field TO it_field.
      CLEAR wa_field.
      wa_field-fieldname = 'MATNR'.
      wa_field-tabname = 'IT_TAB'.
      wa_field-outputlen = 15.
      wa_field-seltext_l = 'Material'.
    *  wa_field-input = check.
    *  wa_field-edit = check.
      APPEND wa_field TO it_field.
      CLEAR wa_field.
      wa_field-fieldname = 'WERKS'.
      wa_field-tabname = 'IT_TAB'.
      wa_field-outputlen = 6.
      wa_field-seltext_l = 'Plant'.
    *  wa_field-input = check.
    *  wa_field-edit = check.
      APPEND wa_field TO it_field.
      CLEAR wa_field.
      wa_field-fieldname = 'MENGE'.
      wa_field-tabname = 'IT_TAB'.
      wa_field-outputlen = 10.
      wa_field-seltext_l = 'Qty.'.
    *  wa_field-input = check.
    *  wa_field-edit = check.
      wa_field-do_sum = check.
      APPEND wa_field TO it_field.
      CLEAR wa_field.
    *          SORT W.R.T. PURCHASE ORDER NUMBER
      wa_sort-spos = 1.
      wa_sort-fieldname = 'EBELN'.
      wa_sort-tabname = 'IT_EKPO'.
      wa_sort-up = check.
      wa_sort-subtot = check.
      APPEND wa_sort TO it_sort.
      CLEAR wa_sort.
    *          FOR GRID TITLE
      wa_title = 'Hello'.
    *          FOR LAYOUT
      wa_layout-zebra = check.
    *          FOR EXCLUDING STANDARD BUTTONS FROM ALV TOOLBAR
      wa_exclude-fcode = '&OUP'.
      APPEND wa_exclude TO it_exclude.
      CLEAR wa_exclude.
      wa_exclude-fcode = '&ODN'.
      APPEND wa_exclude TO it_exclude.
      CLEAR wa_exclude.
      wa_exclude-fcode = '&OAD'.
      APPEND wa_exclude TO it_exclude.
      CLEAR wa_exclude.
    *  wa_exclude-fcode = '&AVE'.
    *  APPEND wa_exclude TO it_exclude.
    *  CLEAR wa_exclude.
      wa_exclude-fcode = '&INFO'.
      APPEND wa_exclude TO it_exclude.
      CLEAR wa_exclude.
    *          POPULATE ALL EVENTS INTO INTERNAL TABLE
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 0
        IMPORTING
          et_events       = it_event
        EXCEPTIONS
          list_type_wrong = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE it_event INTO wa_event WITH KEY name = 'END_OF_LIST'.
      wa_event-form = 'END'.
      MODIFY it_event FROM wa_event INDEX sy-tabix.
      CLEAR wa_event.
    *          DISPLAY RECORDS IN ALV GRID
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
       i_callback_program                = rep_id
    *   i_callback_pf_status_set          = 'PF'
       i_callback_user_command           = 'COMMAND'
       i_callback_top_of_page            = 'TOP'
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
    *   I_BACKGROUND_ID                   = ' '
       i_grid_title                      = wa_title
    *   I_GRID_SETTINGS                   =
       is_layout                         = wa_layout
       it_fieldcat                       = it_field
       it_excluding                      = it_exclude
    *   IT_SPECIAL_GROUPS                 =
       it_sort                           = it_sort
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         = 'X'
       i_save                            = 'A'
       is_variant                        = wa_variant
       it_events                         = it_event
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   I_HTML_HEIGHT_TOP                 = 0
    *   I_HTML_HEIGHT_END                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   IR_SALV_FULLSCREEN_ADAPTER        =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = it_ekpo
    EXCEPTIONS
       program_error                     = 1
       OTHERS                            = 2.
      IF sy-subrc <> 0.
      ENDIF.
    *&      Form  top
    *       TO WRITE THE HEADER
    FORM top.
      REFRESH it_top.
      wa_top-typ = 'S'.
      wa_top-key = text-001.
      wa_top-info = rep_id.
      APPEND wa_top TO it_top.
      CLEAR wa_top.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary       = it_top
    *   I_LOGO                   =
    *   I_END_OF_LIST_GRID       =
    *   I_ALV_FORM               =
    ENDFORM.                    "top
    *&      Form  end
    *       TO WRITE THE FOOTER
    FORM end.
      REFRESH it_end.
      wa_end-typ = 'S'.
      wa_end-key = text-001.
      wa_end-info = rep_id.
      APPEND wa_end TO it_end.
      CLEAR wa_end.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary       = it_end
    *   I_LOGO                   =
    *   I_END_OF_LIST_GRID       =
    *   I_ALV_FORM               =
    ENDFORM.                    "end
    *&      Form  pf
    *       FOR PF-STATUS WITH USER DEFINED BUTTONS
    *      -->RT_EXTAB   text
    FORM pf USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZTG_PF_ALV'.
    ENDFORM.                    "pf
    *&      Form  command
    *       TO HANDLE USER ACTIONS AGAINST PF-STATUS
    *      -->UCOMM      text
    *      -->SELFIELD   text
    FORM command USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
      DATA : ok_code TYPE sy-ucomm.
      ok_code = ucomm.
      CASE ok_code.
        WHEN 'T_DOWN'.
          CALL FUNCTION 'POPUP_TO_INFORM'
            EXPORTING
              titel = 'HELLO'
              txt1  = 'USER COMMAND'
              txt2  = 'TOTAL DOWN'.
        WHEN 'DOWN'.
          CALL FUNCTION 'POPUP_TO_INFORM'
            EXPORTING
              titel = 'HELLO'
              txt1  = 'USER COMMAND'
              txt2  = 'DOWN'.
        WHEN 'UP'.
          CALL FUNCTION 'POPUP_TO_INFORM'
            EXPORTING
              titel = 'HELLO'
              txt1  = 'USER COMMAND'
              txt2  = 'UP'.
        WHEN 'T_UP'.
          CALL FUNCTION 'POPUP_TO_INFORM'
            EXPORTING
              titel = 'HELLO'
              txt1  = 'USER COMMAND'
              txt2  = 'TOTAL UP'.
      ENDCASE.
    ENDFORM.                    "command
    Hope this helps you.
    Thanks & Regards,
    Tarun Gambhir

  • Simple jsp example of using BI Bean in Myeclipse

    hi
    anyone can show me a simple jsp example of using BI Bean in Myeclipse
    or how to import BI Bean into Myeclipse
    I would so thankful for who can answer me.. please its urgent
    thanks

    Sorry, I was not very clear in my last message.
    I need all my webservices to share the same bean during one user session.
    Then, if a page calls 2 different web services, only 1 database connection is made instead of 2. And if the user opens other pages which call other webservices, they will use the connection kept into the session bean.
    Anyway, I tried to do like it is said in your website but I can not build my project. I have an error : java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/.../build/web/WEB-INF/lib/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. I do not understand because I have downloaded the jax-ws 2.1.1 api and no other libraries are imported in my project. :-(
    I wonder if it is not related to netbeans...

  • Calling Tuxedo Service using BEA Jolt.

    I'm trying to call Tuxedo service from java stored procedure using BEA JOLT.My normal java client works fine but when i use the same client as java stored procedure i get following error message :
    can not connect to any //lucy:9021(host:port)
    Reason:Nwhdlr:can not open socket
    I've successfully loaded all required JOLT jar files using loadjava and created the procedure successfully .Java code is given below :
    import bea.jolt.*;
    import java.sql.*;
    public class JoltToTux
         public static void callTuxService() throws Exception
              JoltSession session;
              JoltSessionAttributes sattr;
              JoltRemoteService toupper;
              JoltTransaction trans;
              String userName=null;
              String userPassword=null;
              String appPassword=null;
              String userRole=null;
              String outstr;
              try {
              sattr = new JoltSessionAttributes();
              sattr.setString(sattr.APPADDRESS, "//lucy:9021");
              sattr.setInt(sattr.IDLETIMEOUT, 300);
              session = new JoltSession(sattr, userName, userRole,userPassword, appPassword);
                        toupper = new JoltRemoteService ("CB_EXESUB", session);
              toupper.setString("CLFY_SUB", "PingSrvr");
              toupper.call(null);
              System.out.println( "Call to Tuxedo complete" );
              outstr = toupper.getStringDef("WF_MESSAGE","" );
              System.out.println("return string : " + outstr);
                        session.endSession();
              System.exit(0);
              } //end of try
              catch (Exception e) {
                   // System.err.println(e.getMessage());}
                   e.printStackTrace();
         } // end main
         public static void main( String args[] ) {
              try {
                   JoltToTux jt = new JoltToTux();
                   jt.callTuxService();
              catch ( Exception e0 ) {
                   e0.printStackTrace();
    } // end ToUpper
    thanks
    anurag

    Ams,
    You can't do that with JOLT. You will need to use the WTC product,
    currently in beta - see WTC Questions and Answers
    Regards,
    Peter.
    Got a Question? Ask BEA at http://askbea.bea.com
    The views expressed in this posting are solely those of the author, and
    BEA
    Systems, Inc. does not endorse any of these views.
    BEA Systems, Inc. is not responsible for the accuracy or completeness of
    the
    information provided
    and assumes no duty to correct, expand upon, delete or update any of the
    information contained in this posting.
    Ams wrote:
    Hi Manoj,
    I want to call a tuxedo service and also want to update
    database (using entity beabs) in same transaction so I
    can't use AUTOTRAN , Am I right ?
    I am using bea.jolt.pool.SessionPool's startTransaction
    method to start a transaction and passing this
    to SessionPool's call method.
    Ams.
    "Manoj SASIDHARAN" <[email protected]> wrote:
    Hello Ams,
    Could u plz give more information abt the usage scenario. Another way
    to test
    would be to put AUTOTRAN=Y for the service in question.
    HTH
    regards
    MS
    "Ams" <[email protected]> wrote:
    Hi,
    I am calling Tuxedo service from ejb using jolt.
    I want the service call in transaction started in ejb.
    I am getting following error.
    LIBTUX_CAT:481: ERROR: Service xa_start returned -7
    Does jolt support transaction ?
    Ams
    [att1.html]

  • Example using TPINIT with vb and tuxedo

    Hello
    Does anybody has an example, using the TPINIT, for security password in a ws client,
    with tuxedo.
    Thanks a lot for any help,
    Ramiro Arraya A.
    Dpto. Desarrollo
    Sintesis S.A.
    Santa Cruz - Bolivia
    [email protected]

    Hi,
    What version of Visual Basic are you using? If it is Visual Basic.Net then you should be using the Tuxedo .Net workstation client libraries and not the workstation libraries. More information can be found at:
    http://docs.oracle.com/cd/E26665_01/tuxedo/docs11gr1/dotnet/dotnet_chapter.html
    You should only attempt to use the standard workstation libraries if you are using Visual Basic 6 or earlier, i.e., non-.Net versions of VB.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • How to use Tuxedo's services from an EJB: Jolt x JET ?

    Hi.
    Can anyone tell me if an EJB MUST use JET (instead Jolt) to access Tuxedo services
    Suppose the following case:
    We have a client using JNDI service to obtain an EJB.
    In my client i invoke the appropriate methods to create a jolt session and to
    start a jolt transaction. My EJB Bean only call Tuxedo services (using Jolt).
    Will this application work ? Will EJB code use the transaction created by the
    client code ? Will a transaction context exist ?
    Thanks in advance.

    Hi Daniel,
    If you mean WebLogic Server 5.1 by WL 5.1 (instead of WebLogic Enterprise), then
    yes, you need to use Jolt until you upgrade to a later release of WebLogic Server.
    WTC wasn't fully supported until WebLogic Server 6.1 and later.
    The transaction context of the container Jolt is being used in is not extended
    to the Tuxedo system. Jolt can be used to start a new and separate transaction
    in Tuxedo, but that transaction and the containers current transaction will not
    be coordinated.
    I'm not sure what you mean when you say:
    The transaction management when using Jolt is realized for Jolt API.
    There is no relantionship between Jolt transactions and Tuxedo transactions.
    Is this rightThe transaction management when using Jolt is transaction management of
    the Tuxedo system you are talking to. Jolt is a client side API that uses a
    delegated model for transactions. So a transaction started with Jolt starts
    a transaction in Tuxedo, but does not affect the transaction context of the
    environment the client, i.e., the place where the Jolt call was made. So if
    you are using Jolt inside an EJB hosted in the EJB container of WebLogic
    Server, the Jolt calls will have no impact or effect on the transaction state
    of the EJB.
    Regards,
    Todd
    "Daniel" <[email protected]> wrote:
    >
    Ok.
    We have EJBs running in Weblogic and they are using Tuxedo services.
    We have used Jolt instead WTC because we are running WL 5.1. Can i
    use WTC with WL 5.1 ?
    The transaction management when using Jolt is realized for Jolt API.
    There is
    no
    relantionship between Jolt transactions and Tuxedo transactions. Is this
    right
    Thanks in advance.
    "Todd Little" <[email protected]> wrote:
    "Daniel" <[email protected]> wrote:
    Hi.
    Can anyone tell me if an EJB MUST use JET (instead Jolt) to access
    Tuxedo
    services
    ? You can use either Jolt or preferably use WTC and JATMI.
    Suppose the following case:
    We have a client using JNDI service to obtain an EJB.
    In my client i invoke the appropriate methods to create a jolt session
    and to
    start a jolt transaction. My EJB Bean only call Tuxedo services (using
    Jolt).Why is the client creating a Jolt session and transaction? They will
    not be associated
    with the EJB's execution. The client's Jolt context is not propogated
    to the
    EJB. Can you explain what it is you want to do? What do you want included
    in
    the transaction?
    Will this application work ? Will EJB code use the transaction created
    by the
    client code ? Will a transaction context exist ?Well I suppose it depends upon what you mean by work. It comes down
    to what are
    you trying to accomplish. The client is a WLS client? Is the EJB a
    client of
    some Tuxedo service? If those are both true, then you would be best
    served by
    controlling the transaction with the EJB's deployment descriptor and
    having the
    EJB use WTC to access Tuxedo. WTC will take of propagating any required
    transaction
    state to Tuxedo.
    Regards,
    Todd

  • Example Servlets that use JAXM?

    OK, maybe I missed a chapter in the JWSDP tutorial but I'm trying to develop a servlet that uses JAXM to process a soap request, and I can't find any examples of how to do this. There are a number of client code examples, but nothing for the server side. There is no source code for the "ReceivingServlet.class", which I believe does what I am loooking for.
    BTW, I know that I can do it easily using JAX-RPC, but I specifically want to do it using JAXM.
    Any ideas or suggestions?
    Thanks,
    Frank

    Example Sending Servlet with out messaging provider
    /* The following program is a servlet, which when run in the browser, constructs a soap message
    and sends the soap message to receiving end, i.e ReceivingServlet in this case*/
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import javax.servlet.http.*;
    import javax.servlet.*;
    import javax.xml.soap.*;
    import javax.activation.*;
    import javax.naming.*;
    public class SendingServlet extends HttpServlet {
    String to = null;
    String data = null;
    ServletContext servletContext;
    // Connection to send messages.
    private SOAPConnection con;
    public void init(ServletConfig servletConfig) throws ServletException {
    super.init( servletConfig );
    servletContext = servletConfig.getServletContext();
    try {
         SOAPConnectionFactory scf = SOAPConnectionFactory.newInstance();
    con = scf.createConnection();
    } catch(Exception e) {
              System.out.println("Error in init(): ");
    e.printStackTrace();
    public void doGet(HttpServletRequest req, HttpServletResponse resp)
    throws ServletException {
    String retval ="<html> <H4>";
    try {
    // Create a message factory.
    MessageFactory mf = MessageFactory.newInstance();
    // Create a message from the message factory.
    SOAPMessage msg = mf.createMessage();
    // Message creation takes care of creating the SOAPPart - a
    // required part of the message as per the SOAP 1.1
    // specification.
    SOAPPart sp = msg.getSOAPPart();
    // Retrieve the envelope from the soap part to start building
    // the soap message.
    SOAPEnvelope envelope = sp.getEnvelope();
    // Create a soap header from the envelope.
    SOAPHeader hdr = envelope.getHeader();
    // Create a soap body from the envelope.
    SOAPBody bdy = envelope.getBody();
    // Add a soap body element to the soap body
    SOAPBodyElement gltp
    = bdy.addBodyElement(envelope.createName("GetLastTradePrice",
    "ztrade",
    "http://wombat.ztrade.com"));
    gltp.addChildElement(envelope.createName("symbol","ztrade",
    "http://wombat.ztrade.com")).addTextNode("SUNW");
    URL urlEndpoint = new URL("http://localhost:8080/servlet/ReceivingServlet");
    retval += " Sent message (check \"sent.msg\") and ";
    FileOutputStream sentFile = new FileOutputStream("sent.msg");
    msg.writeTo(sentFile);
    sentFile.close();
    // Send the message to the provider using the connection.
    SOAPMessage reply = con.call(msg, urlEndpoint);
    if (reply != null) {
    FileOutputStream replyFile = new FileOutputStream("reply.msg");
    reply.writeTo(replyFile);
    replyFile.close();
    System.err.println("Reply logged in \"reply.msg\"");
    retval += " received reply (check \"reply.msg\"). </H4> </html>";
    } else {
    System.err.println("No reply");
    retval += " no reply was received. </H4> </html>";
    } catch(Throwable e) {
    e.printStackTrace();
    retval += " There was an error " +
    "in constructing or sending message. </H4> </html>"+ e.toString();
    try {
    OutputStream os = resp.getOutputStream();
    os.write(retval.getBytes());
    os.flush();
    os.close();
    } catch (IOException e) {
    e.printStackTrace();
    Example Receiving Servlet without messaging provider
    /* The following code is a servlet which receives the message sent by client servlet,i.e SendingServlet in this case,
    and constructs a response soap message and sends the response message back to the SendingServlet */
    import javax.xml.soap.*;
    import javax.xml.messaging.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.xml.transform.*;
    import javax.naming.*;
    public class ReceivingServlet
    extends JAXMServlet
    implements ReqRespListener
    static MessageFactory fac = null;
    static {
    try {
    fac = MessageFactory.newInstance();
    } catch (Exception ex) {
    ex.printStackTrace();
    public void init(ServletConfig servletConfig) throws ServletException {
    super.init(servletConfig);
    // Not much there to do here.
    // This is the application code for handling the message.. Once the
    // message is received the application can retrieve the soap part, the
    // attachment part if there are any, or any other information from the
    // message.
    public SOAPMessage onMessage(SOAPMessage message) {
    try {
    message.writeTo(System.out);
    SOAPMessage msg = fac.createMessage();
    SOAPEnvelope env = msg.getSOAPPart().getEnvelope();
    env.getBody()
    .addChildElement(env.createName("Response"))
    .addTextNode("This is a response");
    return msg;
    } catch(Exception e) {
    return null;
    /* How to compile: javac ReceivingServlet.java
    How to run: simply place the ReceivingServlet.class in WEB-INF/classes directory, and
    run "http://localhost:8080/servlet/SendingServlet" in the browser. the ReceivingServlet
    constructs a file reply.msg in the tomcat/bin directory */
    Hope these examples help you

  • Passing data from jsp/servlet to a Tuxedo Service thru VIEW

    Hi..
    We are using Tuxedo10g R3 on AIX 5.3..
    We have a Tuxedo Service running which takes values from the VIEW and converts that to upper case.. From the jsp page v r passing values to the VIEW fields which will be accepted by the service..
    For testing v checked the service with a tuxedo client and it is working fine..
    We have defined a jolt repository file for this service and finished bulkloading and coded the servlet also.. After passing the datas from the jsp, the Tuxedo service is called and it is ended.. but in the service only blank values are passed or the datas are not passed to VIEW fields.. It is not showing any error..
    The repository file for this service:
    service=NSIMPSRV
    export=true
    inbuf=VIEW
    inview=sample
    outbuf=STRING
    param=FIRSTSTR
    type=string
    access=in
    param=SECONDSTR
    type=string
    access=in
    param=THIRDSTR
    type=string
    access=in
    param=S-FIRST
    type=string
    access=out
    param=S-SECOND
    type=string
    access=out
    param=S-THIRD
    type=string
    access=out
    and the servlet code for this service:
    Result result1;
    ServletSessionPool servletsession = (ServletSessionPool) joltsession.getSessionPool("demojoltpool");
    ServletDataSet joltdataset = new ServletDataSet();
    joltdataset.setValue("FIRSTSTR","Testing");
    joltdataset.setValue("SECONDSTR","Tuxedo");
    joltdataset.setValue("THIRDSTR","Views");
    result1 = servletsession.call("NSIMPSRV", joltdataset, null);
    System.out.println("FIRSTSTR:"+result1.getValue("S-FIRST",""));
    System.out.println("SECONDSTR:"+result1.getValue("S-SECOND",""));
    System.out.println("THIRDSTR:"+result1.getValue("S-THIRD",""));
    we are not sure why the datas have not been passed.. do anyone have any idea regarding this??
    Thanks..

    Hi Wayne,
    This is my view definition:
    VIEW sample
    # type cname fbna count flag size null
    string firststr - 1 - 10 -
    string secondstr - 1 - 10 -
    string thirdstr - 1 - 10 -
    ENDJolt repository file:
    service=NSIMPSRV
    export=true
    inbuf=VIEW
    inview=sample
    outbuf=VIEW
    outview=sample
    param=FIRSTSTR
    type=string
    access=inout
    param=SECONDSTR
    type=string
    access=inout
    param=THIRDSTR
    type=string
    access=inoutThe Servlet code is:
    package Servlet;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import bea.jolt.pool.servlet.weblogic.PoolManagerStartUp;
    import bea.jolt.pool.servlet.*;
    import bea.jolt.pool.ApplicationException;
    import bea.jolt.pool.SessionPoolException;
    import bea.jolt.pool.ServiceException;
    import bea.jolt.pool.SessionPoolManager;
    import bea.jolt.pool.*;
    * Servlet implementation class ZC00582Servlet
    public class VIEWServlet extends HttpServlet {
         private ServletSessionPoolManager joltsession = (ServletSessionPoolManager) SessionPoolManager.poolmgr;
    public VIEWServlet() {
    super();
    // TODO Auto-generated constructor stub
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              // TODO Auto-generated method stub
         response.setContentType("text/html");
         ServletResult result;
         Result result1;     
         String String1 = request.getParameter("FIRSTSTR");
         String String2 = request.getParameter("SECONDSTR");
         String String3 = request.getParameter("THIRDSTR");
         System.out.println("THE VALUES BEFORE CONVERSION");
         System.out.println("FIRSTSTR:"+String1);
         System.out.println("SECONDSTR:"+String2);
         System.out.println("THIRDSTR:"+String3);
         System.out.println("1..");     
         //ServletResult message;
         ServletSessionPool servletsession = (ServletSessionPool) joltsession.getSessionPool("demojoltpool");
         System.out.println("2..");
         ServletDataSet joltdataset = new ServletDataSet();
         //joltdataset.importRequest(request);
         System.out.println("3..");
         //joltdataset.setValue("firststr","Hi");
         joltdataset.setValue("firststr",String1);
         System.out.println("4..");
         //joltdataset.setValue("secondstr","hello");
         joltdataset.setValue("secondstr",String2);
         System.out.println("5..");
         //joltdataset.setValue("thridstr","fine");
         joltdataset.setValue("thirdstr",String3);
         System.out.println("6..");
         //result = (ServletResult) servletsession.call("NSIMPSRV", joltdataset, null);
         result1 = servletsession.call("NSIMPSRV", joltdataset, null);
         result = (ServletResult) result1;
         System.out.println("THE VALUES AFTER CONVERSION");
         System.out.println("FIRSTSTR:"+result.getStringValue("firststr",""));
         System.out.println("SECONDSTR:"+result.getStringValue("secondstr",""));
         System.out.println("THIRDSTR:"+result.getStringValue("thirdstr",""));     
         protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              // TODO Auto-generated method stub
    and my server program :
    IDENTIFICATION DIVISION.
    PROGRAM-ID. NSIMPSRV.
    AUTHOR. TUXEDO DEVELOPMENT.
    ENVIRONMENT DIVISION.
    CONFIGURATION SECTION.
    DATA DIVISION.
    WORKING-STORAGE SECTION.
    * Tuxedo definitions
    01 TPSVCRET-REC.
    COPY TPSVCRET.
    01 TPTYPE-REC.
    COPY TPTYPE.
    01 TPSTATUS-REC.
    COPY TPSTATUS.
    01 TPSVCDEF-REC.
    COPY TPSVCDEF.
    * Log message definitions
    01 LOGMSG.
    05 FILLER PIC X(10) VALUE
    "NSIMPSRV :".
    05 LOGMSG-TEXT PIC X(50).
    01 LOGMSG-LEN PIC S9(9) COMP-5.
    * User defined data records
    01 STRING-DATA.
    COPY SAMPLE.
    LINKAGE SECTION.
    PROCEDURE DIVISION.
    START-FUNDUPSR.
    MOVE LENGTH OF LOGMSG TO LOGMSG-LEN.
    MOVE "Started" TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    * Get the data that was sent by the client
    MOVE LENGTH OF STRING-DATA TO LEN.
    CALL "TPSVCSTART" USING TPSVCDEF-REC
    TPTYPE-REC
    STRING-DATA
    TPSTATUS-REC.
    IF NOT TPOK
    MOVE "TPSVCSTART Failed" TO LOGMSG-TEXT
    PERFORM DO-USERLOG
    PERFORM EXIT-PROGRAM
    END-IF.
    IF TPTRUNCATE
    MOVE "Data was truncated" TO LOGMSG-TEXT
    PERFORM DO-USERLOG
    PERFORM EXIT-PROGRAM
    END-IF.
    MOVE FIRSTSTR TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    MOVE SECONDSTR TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    MOVE THIRDSTR TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    INSPECT FIRSTSTR CONVERTING
    "abcdefghijklmnopqrstuvwxyz" TO
    "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
    INSPECT SECONDSTR CONVERTING
    "abcdefghijklmnopqrstuvwxyz" TO
    "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
    INSPECT THIRDSTR CONVERTING
    "abcdefghijklmnopqrstuvwxyz" TO
    "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
    MOVE "Success" TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    MOVE STRING-DATA TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    SET TPSUCCESS TO TRUE.
    COPY TPRETURN REPLACING
    DATA-REC BY STRING-DATA.
    * Write out a log err messages
    DO-USERLOG.
    CALL "USERLOG" USING LOGMSG
    LOGMSG-LEN
    TPSTATUS-REC.
    * EXIT PROGRAM
    EXIT-PROGRAM.
    MOVE "Failed" TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    SET TPFAIL TO TRUE.
    COPY TPRETURN REPLACING
    DATA-REC BY STRING-DATA.
    Thanks & Regards,
    Janani.

  • How to run servlet by using main?

    How can I use main to run servlet?
    I cannot put request and response object into doGet(request, response) method
    I want this because I want to run this servlet daily and I plan to put it in cron job
    Calvin

    Hi
    Perhaps you cannot run servlet without using browser. But you can make that program as an application in order to run in Dos or Unix shell.
    But still you can run servlet without using browser How?
    You can debug servlets with the same jdb commands you use to debug an applet or an application. The JavaTM Servlet Development Kit (JSDK) provides a standalone program
    called servletrunner that lets you run a servlet without a web browser. On most systems, this program simply runs the java sun.servlet.http.HttpServer command. You
    can, therefore, start a jdb session with the HttpServer class.
    A key point to remember when debugging servlets is that Java Web server and servletrunner achieve servlet loading and unloading by not including the servlets directory on
    the CLASSPATH. This means the servlets are loaded using a custom classloader and not the default system classloader.
    Running servletrunner in Debug Mode
    Running Java Web ServerTM in Debug Mode
    Running servletrunner in Debug Mode
    In this example, the servlets examples directory is included on the CLASSPATH. You can configure the CLASSPATH for debug mode as follows:
    Unix
    $ export CLASSPATH=./lib/jsdk.jar:./examples:$CLASSPATH
    Windows
    $ set CLASSPATH=lib\jsdk.jar;examples;%classpath%
    To start the servletrunner program you can either run the supplied startup script called servletrunner or just supply the servletrunner classes as a parameter to jdb. This
    example uses the parameter to servletrunner.
    $ jdb sun.servlet.http.HttpServer
    Initializing jdb...
    0xee2fa2f8:class(sun.servlet.http.HttpServer)
    > stop in SnoopServlet.doGet
    Breakpoint set in SnoopServlet.doGet
    > run
    run sun.servlet.http.HttpServer
    running ...
    main[1] servletrunner starting with settings:
    port = 8080
    backlog = 50
    max handlers = 100
    timeout = 5000
    servlet dir = ./examples
    document dir = ./examples
    servlet propfile = ./examples/servlet.properties
    To run SnoopServlet in debug mode, enter the following URL in a browser where yourmachine is the machine where you started servlet runner and 8080 is the port number
    displayed in the settings output.
    http://yourmachine:8080/servlet/SnoopServlet
    In this example jdb stops at the first line of the servlet's doGet method. The browser will wait for a response from your servlet until a timeout is reached.
    main[1] SnoopServlet: init
    Breakpoint hit: SnoopServlet.doGet (SnoopServlet:45)
    Thread-105[1]
    We can use the list command to work out where jdb has stopped in the source.
    Thread-105[1] list
    41 throws ServletException, IOException
    42 {
    43 PrintWriter out;
    44
    45 => res.setContentType("text/html");
    46 out = res.getWriter ();
    47
    48 out.println("<html>");
    49 out.println("<head>
    <title>Snoop Servlet
    </title></head>");
    Thread-105[1]
    The servlet can continue using the cont command.
    Thread-105[1] cont
    Running Java Web Server in Debug Mode
    The JSDK release does not contain classes available in the Java Web server and it also has its own special servlet configuration. If you cannot run your servlet from
    servletrunner, then the other option is to run the Java Web server in debug mode.
    To do this add the -debug flag for the first parameter after the java program. For example in the script bin/js change the JAVA line to look like the following. In releases prior
    to the Java 2 platform release, you will also need to change the program pointed to by the variable $JAVA to java_g instead of java.
    Before:
    exec $JAVA $THREADS $JITCOMPILER $COMPILER $MS $MX \
    After:
    exec $JAVA -debug $THREADS $JITCOMPILER
    $COMPILER $MS $MX \
    Here is how to remotely connect to the Java Web Server. The agent password is generated on the standard output from the Java Web Server so it can be redirected into a file
    somewhere. You can find out where by checking the Java Web Server startup scripts.
    jdb -host localhost -password <the agent password>
    The servlets are loaded by a separate classloader if they are contained in the servlets directory, which is not on the CLASSPATH used when starting the Java Web server.
    Unfortunately, when debugging remotely with jdb, you cannot control the custom classloader and request it to load the servlet, so you have to either include the servlets
    directory on the CLASSPATH for debugging or load the servlet by requesting it through a web browser and then placing a breakpoint once the servlet has run.
    In this next example, the jdc.WebServer.PasswordServlet is included on the CLASSPATH when Java Web server starts. The example sets a breakpoint to stop in the service
    method of this servlet, which is the main processing method of this servlet.
    The Java Web Server standard output produces this message, which lets you proceed with the remote jdb session:
    Agent password=3yg23k
    $ jdb -host localhost -password 3yg23k
    Initializing jdb...
    > stop in jdc.WebServer.PasswordServlet:service
    Breakpoint set in jdc.WebServer.PasswordServlet.service
    > stop
    Current breakpoints set:
    jdc.WebServer.PasswordServlet:111
    The second stop lists the current breakpoints in this session and shows the line number where the breakpoint is set. You can now call the servlet through your HTML page. In
    this example, the servlet is run as a POST operation
    <FORM METHOD="post" action="/servlet/PasswordServlet">
    <INPUT TYPE=TEXT SIZE=15 Name="user" Value="">
    <INPUT TYPE=SUBMIT Name="Submit" Value="Submit">
    </FORM>
    You get control of the Java Web Server thread when the breakpoint is reached, and you can continue debugging using the same techniques as used in the Remote Debugging
    section.
    Breakpoint hit: jdc.WebServer.PasswordServlet.service
    (PasswordServlet:111) webpageservice Handler[1] where
    [1] jdc.WebServer.PasswordServlet.service
    (PasswordServlet:111)
    [2] javax.servlet.http.HttpServlet.service
    (HttpServlet:588)
    [3] com.sun.server.ServletState.callService
    (ServletState:204)
    [4] com.sun.server.ServletManager.callServletService
    (ServletManager:940)
    [5] com.sun.server.http.InvokerServlet.service
    (InvokerServlet:101)
    A common problem when using the Java WebServer and other servlet environments is that Exceptions are thrown but are caught and handled outside the scope of your servlet.
    The catch command allows you to trap all these exceptions.
    webpageservice Handler[1] catch java.io.IOException
    webpageservice Handler[1]
    Exception: java.io.FileNotFoundException
    at com.sun.server.http.FileServlet.sendResponse(
    FileServlet.java:153)
    at com.sun.server.http.FileServlet.service(
    FileServlet.java:114)
    at com.sun.server.webserver.FileServlet.service(
    FileServlet.java:202)
    at javax.servlet.http.HttpServlet.service(
    HttpServlet.java:588)
    at com.sun.server.ServletManager.callServletService(
    ServletManager.java:936)
    at com.sun.server.webserver.HttpServiceHandler
    .handleRequest(HttpServiceHandler.java:416)
    at com.sun.server.webserver.HttpServiceHandler
    .handleRequest(HttpServiceHandler.java:246)
    at com.sun.server.HandlerThread.run(
    HandlerThread.java:154)
    This simple example was generated when the file was not found, but this technique can be used for problems with posted data. Remember to use cont to allow the web server
    to proceed. To clear this trap use the ignore command.
    webpageservice Handler[1] ignore java.io.IOException
    webpageservice Handler[1] catch
    webpageservice Handler[1]
    I hope this will help you.
    Thanks
    Bakrudeen

  • Simple struts example but it doesn't work

    Hello everybody,
    I'm new in struts technology and I wanted try a simple struts example, but it didn't work. Here are listings of code:
    *** struts-config .xml (is located in WEB-INF/) :
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
    <struts-config>
    <form-beans>
    <form-bean name="registerForm" type="app.RegisterForm"/>
    </form-beans>
    <action-mappings>
    <action path="/register"
    type="app.RegisterAction"
    name="registerForm">
    <forward name="success" path="/success.html"/>
    <forward name="failure" path="/failure.html"/>
    </action>
    </action-mappings>
    </struts-config>
    *** RegisterAction.java (located in WEB-INF/classes/app):
    package app;
    import org.apache.struts.action.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class RegisterAction extends Action {
         public ActionForward perform(ActionMapping mapping, ActionForm form,
                   HttpServletRequest req, HttpServletResponse res) {
              // b Cast the form to the RegisterForm
              RegisterForm rf = (RegisterForm) form;
              String username = rf.getUsername();
              String password1 = rf.getPassword1();
              String password2 = rf.getPassword2();
              // c Apply business logic
              if (password1.equals(password2)) {
                   return mapping.findForward("success");
              // E Return ActionForward for failure
              return mapping.findForward("failure");
    *** RegisterForm.java (located in WEB-INF/classes/app):
    package app;
    import org.apache.struts.action.*;
    public class RegisterForm extends ActionForm {
    protected String username;
    protected String password1;
    protected String password2;
    public String getUsername() {return this.username;};
    public String getPassword1() {return this.password1;};
    public String getPassword2() {return this.password2;};
    public void setUsername(String username) {this.username = username;};
    public void setPassword1(String password) {this.password1 = password;};
    public void setPassword2(String password) {this.password2 = password;};
    *** faulire.html ( located webapps/NAME_APPLICATION/ )
    <HTML>
    <HEAD>
    <TITLE>FAILURE</TITLE>
    </HEAD>
    <BODY>
    Registration failed!
    <P>try again?</P>
    </BODY>
    </HTML>
    *** success.html ( located webapps/NAME_APPLICATION/ )
    <HTML>
    <HEAD>
    <TITLE>SUCCESS</TITLE>
    </HEAD>
    <BODY>
    Registration succeeded!
    <P>try another?</P>
    </BODY>
    </HTML>
    *** register.jsp ( located webapps/NAME_APPLICATION/ )
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:form action="register.do">
    UserName:<html:text property="username"/><br>
    enter password:<html:password property="password1"/><br>
    re-enter password:<html:password property="password2"/><br>
    <html:submit value="Register"/>
    </html:form>
    *** web.xml (located in WEB-INF/)
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
    <!-- Standard Action Servlet Configuration (with debugging) -->
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>
         org.apache.struts.action.ActionServlet
         </servlet-class>
    <init-param>
    <param-name>application</param-name>
    <param-value>ApplicationResources</param-value>
    </init-param>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>validate</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <!-- Standard Action Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!-- Struts Tag Library Descriptors -->
    <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
    </web-app>
    After start of NAME_APPLICATION it show register form (register.jsp) but when I fill out all information and submit those information it show empty window in internet browser and in url box is something like this:
    http://localhost:8084/StrutsTest/register.do;jsessionid=2304C0A9820E7FCC23106C16564D51A8
    where is a problem? Thank you

    Employing a descendent of the Action class that does not implement the perform() method while using the Struts 1.0 libraries. Struts 1.1 Action child classes started using execute() rather than perform(), but is backwards compatible and supports the perform() method. However, if you write an Action-descended class for Struts 1.1 with an execute() method and try to run it in Struts 1.0, you will get this "Document contained no data" error message in Netscape or a completely empty (no HTML whatsoever) page rendered in Microsoft Internet Explorer.
    Also check this URL http://www.geocities.com/Colosseum/Field/7217/SW/struts/errors.html

  • Compiled Tomcat Servlet Example & got JAR, not WAR?

    Is there a basic reference on how to create a simple servlet with NetBeans 4.1 and deploy it to Tomcat?
    When I created the project I chose Samples->Web->Tomcat Servlet Example, and yet it does not create a WAR file on compilation.
    And of course once I'm past that I have to figure out how to edit the XML file, I gather.
    I need a reference that will hold me by the hand and walk me through it once to kick start me.
    After that I think I can make it without having to ask such newbie questions.

    Hi,
    not sure to what extent you are clear in build.xml file (done thru ant).
    what i can tell you is, ant creates any archive file (be it .jar, .war, .ear) with the tasks named "jar" (<jar jarfile="yourfilename.jar"..>), "war" and "ear". But both war and ear are the extensions of the jar only.
    You can achieve creation of any archive file with the jar task itself.
    you need to take care of the following...
    (1) you can /should edit the extension of the files at every stage.. first .jar and then .war and then .ear (if necessary) => basic flow
    (2) at every step, you have to have a file inclusion inside the corresponding archive file..
    say for example, for a .jar file you should include all the compiled .class files, and ejb-jar.xml (incase you use ejbs) and other built-in jar files....
    In case of .war files (web archive) you should include the web.xml file, any static files (html, jsp etc), any tld files - it goes with your application's nature and requirement.....
    fyi, i m including a sample build.xml file which i use for a webapplication, so it deals with war...
    <?xml version="1.0" encoding="UTF-8"?>
    <project name="ServletsReqDispFwd" default="deploy">
         <property name="top" value="."/>
         <property name="webinf" value="${top}/WEB-INF"/>
         <property name="lib" value="${webinf}/lib"></property>
         <property name="classes" value="WEB-INF/classes"/>
         <property name="jboss.dir" value="D:\jboss-3.2.2RC3\server\default\deploy"></property>
         <property name="tomcat.dir" value="D:\jakarta-tomcat-4.1.27\webapps"></property>
         <property name="warfile" value="ServletsReqDispFwd.war"></property>
         <property name="src" value="${top}/src"/>
         <property name="web.xml" value="WEB-INF/web.xml"/>
         <target name="package">
              <javac srcdir="${src}" destdir="${classes}"
                     listfiles="true" debug="true"  verbose="true"
                          classpath="${lib}/*.jar"/>
              <war warfile="${warfile}" webxml="${web.xml}">
                   <webinf dir="${top}">
                        <include name="**/*web*.xml"/>
                        <include name="**/*application*.xml"/>
                        <exclude name="src/**/*.xml"/>
                   </webinf>
                   <lib dir="${lib}">
                        <include name="*.jar"/>
                   </lib>
                   <fileset dir="." includes="**/*.html"/>                    
                   <classes dir="${classes}" includes="**/*.class"></classes>                         
              </war>
         </target>
         <target name="deploy" depends="clean,package">
              <copy file="${warfile}" todir="${tomcat.dir}" overwrite="true"></copy>
         </target>
         <target name="clean">
                <delete dir="${classes}">
                     <filename name="*.class"/>
              </delete>
              <delete>
                   <fileset dir="${top}" includes="${warfile}"/>
              </delete>
              <delete>
                   <fileset dir="${tomcat.dir}" includes="${warfile}"/>
              </delete>
         </target>
    </project>hope this contribues to a certain extent to help you edit the buildfile (xml file as you go) to meet your requirement.....

Maybe you are looking for

  • Exchange 2007 SP3 default quota issue

    This is an odd one. We use Exchange 2007 SP3 running on Server 2003 R2, the domain is 2008 R2. We have a default mailbox size limit of 900MB (issue warning) 1GB (stop sending) 1.25GB (stop send and receive). This has been in place since before I star

  • Tabstrip of report SAPMF02D translate only in English

    Dear All, i have a SAP ECC6.0 EHP4 netweaver here my component: SAP_ABA 701 0007 SAPKA70107 Cross-Application Component SAP_BASIS 701 0007 SAPKB70107 SAP Basis Component PI_BASIS 701 0007 SAPK-70107INPIBASIS Basis Plug-In ST-PI 2008_1_700 0004 SAPKIT

  • Filtering R/3 Material Groups and Material Types

    Hi, I am trying to filter the Material groups and material types during master data upload from R/3 to SRM 4.0 I am tried doing the following: 1. In Txn R2AR2, i set up the request for DNL_CUST_PROD1 for MARA-MATKL(Material Group) & MARA-MTART(Materi

  • OS X Lion gets kernel panic when connecting via CIFS

    A customer of ours has problems with OS X Lion clients that get kernel panic when connecting via CIFS (Novell OES server). Any new on this issue? Tycho Sjgren Apoio AB

  • Is it bad to leave isight on?

    I have looked everywhere for this answer all over the boards, couldn't find it, so I'm asking. Does anyone know if it is a bad thing to leave your isight camera on? Like I mean for extended periods of time, like ever time the screen saver goes up or