Strut's Action Classes Called Twice

I have been looking in every forum, but nothing yet. I am running a struts app in JBoss. And my Action Classes get called twice. Has anyone seen this behavior?
Thanks!

Well, I can tell you that playing with it, I discovered that if my action mappings use tile definition for the forwards, the actions get call twiced. If I use the jsp uri instead, it works like it is supposed to.
WIith these settings, the action RegisterUserAction gets called twice!!!!!!
<action path="/registerUser"
         type="com.cr.ct.ui.user.RegisterUserAction"
            name="registerUserForm"
            validate="false">
      <forward name="sellerHomePage" path=".homeDef" />
      <forward name="failedRegistration" path=".registrationDef" />
    </action>
This will work as supposed to , but I lose the abilitiy to use tiles.
<action path="/registerUser"
         type="com.cr.ct.ui.user.RegisterUserAction"
            name="registerUserForm"
            validate="false">
      <forward name="sellerHomePage" path="/common/home.jsp" />
      <forward name="failedRegistration" path="/common/registration.jsp" />
    </action>

Similar Messages

  • Method CreateChildren in ApplicationControllBar class called twice after setting dock=true

    Hi during creating of a custom ApplicationControllBar
    component in ActionScript I probably found a (nasty) bug?!
    package net.neijman.julia.jaContainers
    import mx.containers.ApplicationControlBar;
    public class JAApplicationControlBar2 extends
    ApplicationControlBar
    public function JAApplicationControlBar2(): void
    this.dock = true;
    super();
    override protected function createChildren(): void
    trace("CREATECHILDREN EXECUTED");
    When I am using my simple custom component in my application:
    <jaContainer:JAApplicationControlBar2 />
    The trace message trace("CREATECHILDREN EXECUTED"); is
    executed twice (meaning CreateChildren is called twice BUT ONLY
    AFTER SETTING dock = true (see constructor). When setting dock =
    false CreateChildren is executed once. I want to build a framework
    on the standard components (depending heavily on the
    CreateChildren-method).
    In other words, creating dynamic components in the docked
    ApplicationControlBar in the method CreateChildren results in a
    double placement in the DisplayList.
    Has anyone has a clue what's going wrong here? (my
    workarround for now is to start the createChildren method with
    removeAllChildren();)
    Thanks Tom Neijman

    Interesting. I would file it as a bug here:
    http://bugs.adobe.com/jira/secure/Dashboard.jspa
    And then see what happens. If it's not a bug, you'll probably
    get a decent reason why this occurs in the bug notes.
    matt horn
    flex docs

  • Page flow actions are called twice from each UI's action=...

    Odd observation: my nothing fancy login / pw change / logged in / jsps and pageflow are having the actions in the .jpf called twice for each jsp form action=.
    What can cause this?
    For example: the login jsp form action=loginAction, the corresponding method in the .jpf is called twice when the user clicks the login button on the login UI. The same behavior is observed for all the other actions in this page flow too.
    This has been a real problem for the pw change UI. Until I figured this out, pw change always returned invalid pw due to the second call to the action. :))
    tnx curt

    I have narrowed it down even more. What is happening is that you select the first item in the list it throws a validation error. I found this by adding and inline message. The weird thing is that if you select any other item in the list but the first everything flows as normal.
    This is a list of dates bound to a date type column in a database.
    Any Idea's why selecting the first item in a list would throw the validation message?

  • Landing page  Action is called twice for single submit

    I am having submit action in Anonymous page,while iam clicking that button it calls the action only once.
    but in the same thing is act different in Landing page,here it's calling the action twice.iam using portal server 6.1 and also iam doing custom Authentication.Plz solve my problem

    Any idea whats the issue here ?

  • How to call a method of an Action class from JSP on load?

    Hi guys
    Due to bad design pattern, i am forced to do something which i have not tried before.
    I need to call a method of a struts action class which invalidated the user session FROM the JSP itself on load. Which means it would not require user input.
    We have a subclass of a DispatchAction that handles all the incoming .dos.
    So http://blarblarblar:7001/blar/blar/doSomething.do?method=logout will dispatch to an Action class called DoSomething, into a method called logout().
    So when the webapp throws an exception, the ActionMapping actually displays an error.jsp and i have to invalidate the user at this stage.
    I can't change the most top level code in the base action class so i got to do it this way.
    Any help is much appreciated.
    Thanks.

    hi :-) DispatchAction is quite cool ;-)
    dont get much of your question but hope
    the suggestion below could help.
    A. use redirect?
    or
    B. autosubmit the form
    1. create your form in a jsp
       <html:form action="/doSomething" />
         <html:hidden name="method" value="logout" />
       </html:form>2. auto submit the form with method = logout
    put the function autosubmit in the "onLoad" event of the body
       <script>
         function autosubmit(){
         var form = document.yourformname;
         form.submit();
       <script>regards,

  • Can we call the pure java variable into the struts action class?

    Hi Everybody,
    I have created the binary tree data structure in java,Could I use the value of the variable called value in the struts action class?,pls help me thro ur reply.I have attached the java code here.Thanks in Advance
    package com.recipes.wizard.common;
    public class BinaryTreeTest {
      public static void main(String[] args) {
        new BinaryTreeTest().run();
      static class Node {
        Node left;
        Node right;
        int value;
        public Node(int value) {
          this.value = value;
      public void run() {
        Node root = new Node(5);
        System.out.println("Binary Tree Example");
        System.out.println("Building tree with root value " + root.value);
        insert(root, 1);
        insert(root, 8);
        insert(root, 6);
        insert(root, 3);
        insert(root, 9);
      public void insert(Node node, int value) {
        if (value < node.value) {
          if (node.left != null) {
            insert(node.left, value);
          } else {
            System.out.println("  Inserted " + *value* + " to left of "
                + node.value);
            node.left = new Node(value);
        else if (value > node.value) {
          if (node.right != null) {
            insert(node.right, value);
          } else {
            System.out.println("  Inserted " + *value* + " to right of "
                + node.value);
            node.right = new Node(value);
          if(node.value==1)
               System.out.println("The value is one");
             int output=node.value;
               System.out.println(output);
    }

    Hi,
    You can change the filter with the new cost element variable,Or you can assign the value of the new variable(if of same type)to old cost element ,but for that assignment again u have to change  planning function which you don't want.
    Regards,
    Indu

  • Values from JSP to Struts Action Class

    Dear All,
    Am working on a small struts project, i want to get values from JSP in the Action class, i tried with sending variables using request through URL, it works fine, any other way is there to send the values from JSP to action class. Am not having any input fields in the JSP.I have links.
    Thanks,
    vyrav.

    I have a dispatch action for that am calling the action like this viewfiles.do?parameter=edit, and i have to send a variable ID from the same page, so am doing like this through java script, viewfiles.do?parameter=edit&id=10. Am able to get the id in the dispatch action edit, but when i start tomcat with security manager its not calling the action itself and its giving accesscontrol exception, but when i directly type viewfiles.do in URL its calling the action.
    I dont know wats the problem, tomcat security manager not allowing this. Please help me.
    Thanks,
    vyrav.

  • How to log exception from a struts action class

    Hi guys,
    I am recoding my application to use the strut framework. There's one small thing i wonder is that how i can log an exception arrise in an action class. In my original servlet, wherever an exception arise, i use:
    catch(Exception e)
             getServletContext().log("User enter an invalid date");
             throw e;
          }However, when i move this servlet into a action class, the getServletContext method doesnt work anymore. I thought action is a child of httpServlet but since getServletContext is not available in action, then how can i log the error?
    Hope to get some help
    Message was edited by:
    lnthai2002

    Hi guys,
    I am recoding my application to use the strut
    framework. There's one small thing i wonder is that
    how i can log an exception arrise in an action class.
    In my original servlet, wherever an exception arise,
    i use:
    catch(Exception e)
    getServletContext().log("User enter an invalid
    valid date");
             throw e;
          }However, when i move this servlet into a action
    class, the getServletContext method doesnt work
    anymore. I thought action is a child of httpServlet
    but since getServletContext is not available in
    action, then how can i log the error?
    Hope to get some help
    Message was edited by:
    lnthai2002Action class is just a POJO and works a handler of your request. ActionServlet invoke your Action class based on the action you call in your URL. When you are usign the Struts why do you need your Original Servel, use the ActionServlet and if required you can extend it and create your own servlet

  • How to call another action from Struts dispatch action?

    Hi all,
    there is a method in dispatch action that needs data from another chained action. How should other action determine which method in dispatch action will receive response and how should these data be returned from called action? Called action does not have associated form bean
    thanks,

    Not sure, why are there then "chained actions" is struts practice? Struts allows action without form bean to be configured and the action is a class?

  • POWL-Feeder-Class is called twice by class CL_POWL_MODEL

    Hi all,
    we are running sap erecruiting and there's an application called "dashboard" that uses the POWL-Technologie.
    Now we noticed, that our feeder class is called twice when one particular "query" is called via dashboard:
    once within method "handle_refresh_async" and twice within method "refresh_current" (methods of class "CL_POWL_MODEL").
    As we don't want to have double runtime, does anyone know why the feeder class is called twice and how to prevent it?
    Thanks in advance
    Regards
    CHRIS

    Hi Kris,
    thanks for your reply.
    I think the forum message you suggested does not apply to me. They talk about a refresh after an action.
    In my case once the dashboard-query is requested by the user the feeder-class is called twice before the result is displayed.
    Regards
    CHRIS

  • Urgent: unable to call a plsql stored procedure with a struts data action

    Hello ALL,
    I'm trying to call a plsql stored procedure within a struts DataAction,
    The scenario is:
    When a user a click on a button, then it should call a specific stored procedure,,
    I create struts data action a class to handle the event which is to call the procedure
    Here is my code:
    public class RequestAction extends DataForwardAction
    public void onCall(DataActionContext ctx)
    String amDef = "model.AppModule";
    String config = "AppModuleLocal";
    ApplicationModule am =
    Configuration.createRootApplicationModule(amDef, config);
    try{
    AppModuleImpl myAm = (AppModuleImpl)am;
    DBTransaction tr = (DBTransaction) myAm.getTransaction();
    CallableStatement stmt = tr.createCallableStatement
    ("begin pkg_test.test; end;", DBTransaction.DEFAULT);
    stmt.execute();
    stmt.close();
    tr.commit();
    catch(Exception e){System.out.println(e.getMessage());}
    Configuration.releaseRootApplicationModule(am,true);
    but when I ran the application and click on the button, I got the following Exception:
    04/07/08 00:45:50 ORA-06550: line 1, column 7:
    PLS-00201: identifier 'PKG_TEST.TEST' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    It seems that the DBTransaction object unable to see the stored procedure,
    Am I do something wrong or miss something???
    I've checked the examples on the OTN HOW TO, and searched in the JDeveloper Forum but unable to find an answer,
    Please anyone can help???
    Thanks a lot
    With Regards,
    Hayat

    Here's an example application that illustrates how to do this. I haven't had a chance to writeup a little paper to go with it yet, but will as soon as I have a chance.
    http://otn.oracle.com/products/jdev/tips/muench/storedproc/CallStoredProc.zip
    See the "callStoredProcedure" method in the application module in the Model project.
    See the "callStoredProcedure" method binding in the binding container of the "CallStoredProcedure" data page.
    Notice the name "event_callStoredProcedure" of the (Call Stored Procedure) button on the CallStoredProcedure.jsp page which triggers the declaratively invocation of the method.
    You could also call the method from code in a custom data action.
    The code example illustrates how to create your own JDBC prepared statement for invoking the stored procedure, and doing it in a way that is efficient by keeping the prepared statement around across invocations.

  • How to call a custom action class present in one DC from a different DC

    Hi Experts,
    I have to implement one email functionality in my project.This functionality works fine if I use the Standard EmailAction class present in com.sap.isa.cic.customer package,but we need to change the email IDs in some cases so,we need to create a custom class.But if I create a custom Action class in Another DC(shext) and try to call this class from the config file present in the other DC(From where the Standard class was called),I am getting no Action Instance found for the declared Action(This Happens when the class is not present ).
    From the error I interpreted that the presence of the Custom Action class is not recognised by the The DC.
    Please confirm If my understanding is correct.
    I also tried adding a a new public part in shrext and tried adding the same in the used dc for the DC from where I am trying to call the class.But the activity fails and it gives me the error that the DCs are Broken.Do I need to build the DCs after adding a public part or a used DC?
    Please answer If anybody has faced the same issue or has a solution to it.
    Thanks
    Arpita Saxena
    Edited by: ArpitaSaxena on Jun 23, 2011 6:51 AM
    Edited by: ArpitaSaxena on Jun 23, 2011 7:01 AM

    Hi All,
    I was able to resolve this issue myself.
    I had to include the DC crm/isa/lwc and the DC mail in the used DCs of SHREXT .
    So,all the jars got included automatically and I was able to create a new custom class for the required functionality.
    Its working fine now.

  • Not able to call an Action class

    Hello Guys,
    I am trying to deploy a web application in SAP Netweaver developer studio, which is successfully
    deployed in Eclipse.
    When i try to click on Submit button in one JSP, then it's saying that
    "The requested resource does not exist" and the url is http://192.168.5.35:50000/Sample/searchTutorial.do
    The code in JSP as follows.
    <form action="/Sample/searchTutorial.do" method="post">
        <table>
         <tr>
              <td align="right">
                Search Tutorial
              </td>
              <td align="left">
                <input type="text" property="keyword" size="30" maxlength="30"/>
              </td>
         </tr> 
              <tr>
              <td align="right">
                <input type="submit" name="submit" value="submit">
              </td>
              </tr>
        </table>
      </form>
    here sample is the webpplication name. searchTutorial is the action class name, which is configured in
    struts-config.xml.
    the code in struts-config.xml is given below.
    <form-bean
                name="SearchTutorialActionForm"
                type="com.web.SearchTutorialActionForm">
             </form-bean>
    <action
                path="/searchTutorial"
                type="roseindia.net.web.SearchTutorialAction"
                name="SearchTutorialActionForm"
                scope="request"
                validate="true"
                input="/SearchTutorial.jsp">
                   <forward name="success" path="/SearchResultPage.jsp"/>
    </action>
    And the following jars r there in my /WEB-INF/lib folder.
    commons-beanutils.jar,commons-collections.jar,commons-dbcp.jar,commons-digester.jar,commons-fileupload.jar,commons-lang.jar,commons-logging.jar,
    commons-pool.jar,commons-validator.jar,struts.jar
    Can anyone help me.
    Your suggessions r valueble.
    Regards,
    Lakshmi M

    Hi Lakshmi,
    Is the application name "Sample" or "sample"? Aren't STRUTS URLs case sensitive? Also, just out of curiosity, why aren't you using Web Dynpro Java? It's based on the same MVC paradigm and comes out of the box with CE (not to mention all the bells and whistles).
    Rao

  • HELP!!! why derived class's function  be called twice?

    I am a newbie to java.
    Recently I encounter a problem.
    I run the below file,the output is:
    output begin
    B.f called !!!!
    A.A called
    B.f called !!!!
    B.B called
    output end-
    My Question is :
    why B's f() be called twice?
    (In C++, A.f() will be called one time!)
    class A
    A()
    f();
    System.out.println("A.A called");
    int f()
    System.out.println("A.f called !!!");
    return 123;
    class B extends A
    B()
    f();          
    System.out.println("B.B called");
    int f()
    System.out.println("B.f called !!!!");
    return 456;
    public class Demo
    public static void main(String args[])
    B bobj = new B();
    -----------------------------------

    Hi,jsalonen:
    In the following code, variable i cann't be initialized properly.
        class A
             int i=0;
            A()
                f();
                System.out.println("A.A called");
                System.out.println("i="+i);
            int f()
                i=11;
                System.out.println("A.f called !!!");
                return 123;
        class B extends A
             int j;
            B()
                f();                  
                System.out.println("B.B called");
                System.out.println("j="+j);
                System.out.println("i="+i);
            int f()
                j=12;
                System.out.println("B.f called !!!!");
                return 456;
        public class Demo
            public static void main(String args[])
                B bobj = new B();
    output begin
    B.f called !!!!
    A.A called
    i=0 // BAD here
    B.f called !!!!
    B.B called
    j=12
    i=0 // BAD here
    output end -
    Although the question can be solved! I am still confused: why Java do this? when A's constructor call f(), B is still incomplete!!
    Java is a good language,but I dislike it on this
    Regards.
    Sunway

  • Struts - Data pass from Action class to JSP

    hello ,
    I am new to struts and have a strange question in my mind .
    How do we pass business logic data from action class to JSP.Do we use session object or any other best way to be used to pass data.
    Example scenario:
    Once the user logins into application by passing userid and password ,we need to display his open queries (from database table) on jsp.
    Components used :
    Login.jsp
    LoginForm(getter and setter methods of userid & password)
    LoginAction(get database connection,perform query to fetch user's open queries form the database)
    OpenQueries.jsp(to display Open queries on a tabular format)
    In LoginAction - We fetched user's open Queries from the database and stored them in collection object .
    My question is : what is the best way to pass Collection object from LoginAction to OpenQueries.jsp ?
    Thanks in advance...
    Ram
    Edited by: ram_76uk on Apr 10, 2008 8:21 PM

    You can use plain javabeans to transfer the data. Check out the jsp:usebean tag. If you don't know how to do, check out the Java EE tutorial: http://java.sun.com/javaee/5/docs/tutorial/doc/ Using javabeans in JSP pages starts halfway chapter 4.

Maybe you are looking for

  • [SOLVED] Eeepc 901 and 2.6.32 upgrade.. Black Screen!

    I've just updated the kernel 26 package and.. After udev start all goes black! It's not a Xorg issue, because i've to start it manually.. Any idea?? Last edited by Malo (2009-12-30 10:34:59)

  • I can't get PSE 11 to create correct catalog

    If I open PSE 11 & go to catalog Manager it lists avaiable for all users My Catalog & under this it shows My Catalog 2 (current).  If I then select either the results are exactly the same NOTHING AT ALL DISPLAYS.  I can see on the right hand side of

  • Change Left Softkey to Directory softkey on Cisco Wireless 7925

    Does anyone knows how to change the left softkey to "directory" key? Currently if you go under SETTINGS > PHONE SETTINGS >CUSTOMIZE HOME PAGE > LEFT SOFTKEY only provides two options " MESSAGE" and "PHONE BOOK", I want "DIRECTORY" to be listed. Any i

  • Group columns in jtable

    Hi, i'm looking for a solution to group columns in a table header. I found some very old posts in the web but they don't help. I think there is no standard solution in Swing? It confuse me that no other people ask this here in the last months/years.

  • Can Any one tell me what is the step in calling a function from a *.lib file in Labview application

    Hi, I am working on Labview 8.0. I am trying to  communicate to a thrid party HW using the driver file he has provided to me. The drive file is a *.lib file. I am unable to call the function from the lib file. I could get only from a DLL. Pls help .