LookupDispatchAction & struts-config

Discussions

General J2EE: LookupDispatchAction & struts-config

  1. LookupDispatchAction & struts-config (3 messages)

    hi all,

    I used lookupDispatchAction in a file named App_details. it works
    fine when 2 button's methods forwards "success", but one of the buttons should
    update an object then returns to this page, I examined different path on
    <forward name="successInCalc" ... and also "/app_details.do" but this one returns
     to the previous page,
    should I use javaScript with bridge to java objects.

    thanks for any help
     

           <action
               path="/app_details"
               type="general.App_details"
               name="invAddressForm"
               scope="request"
               validate="true"
               input="/app_login.do"
    parameter="method"> <!-- for lookupDispatchAction parameter="method" -->
               <forward name="success" path="/pages/app_details2.jsp" />
               <forward name="successInCalc" path="/app_details.do" />
             </action>
      

    thanks.
  2. hi all,I used lookupDispatchAction in a file named App_details. it works fine when 2 button's methods forwards "success", but one of the buttons shouldupdate an object then returns to this page, I examined different path on <forward name="successInCalc" ... and also "/app_details.do" but this one returns&nbsp;to the previous page, should I use javaScript with bridge to java objects.thanks for any help
    Have you tried simply to navigate to "/pages/app_details.jsp"? This should work. Also, if you want to try more friendly approach for both user and developer, see Dialogs for Struts library. It does form reload, it stores errors, it keeps state, its implementation of event handlers does not need to lookup in the property file unlike LookupDispatchAction.
  3. hi,
    thanks for your helping
    I used /pages/app_details.jsp but there is error :

    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.RangeCheck(ArrayList.java:508)
    at java.util.ArrayList.get(ArrayList.java:320)
    at general.UserService.getUser(UserService.java:101)
    at org.apache.jsp.app_0005fdetails$jsp._jspService(app_0005fdetails$jsp.java:90)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     ....
     and I will try Dialogs for Struts.

    thanks.
  4. hi,
    thanks,
    I found my problem I put a parameter in request, and used request.getParameter(...) but know I put it in session
    and use session.getParameter in that page.

    thanks.