Handling errors in Struts

Discussion in 'Java' started by vyshu, Apr 26, 2007.

  1. vyshu

    vyshu Guest

    hi,

    I am devoloping an
    application using struts.I am facing some problems in handling
    errors.Let me expain my situation.I have two forms in diffrent jsp
    pages.On the click of submit,I am processing the data in a single
    Action Servlet.In my action mapping i can specify only one page as the
    value for the attribute "input".so in case of any errors,I am not able
    to redierct to the exact input page.

    any comments?

    thanks,
    vysh
     
    vyshu, Apr 26, 2007
    #1
    1. Advertising

  2. vyshu

    Sanjay Guest

    vyshu wrote:
    > hi,
    >
    > I am devoloping an
    > application using struts.I am facing some problems in handling
    > errors.Let me expain my situation.I have two forms in diffrent jsp
    > pages.On the click of submit,I am processing the data in a single
    > Action Servlet.In my action mapping i can specify only one page as the
    > value for the attribute "input".so in case of any errors,I am not able
    > to redierct to the exact input page.
    >
    > any comments?
    >
    > thanks,
    > vysh
    >


    If I understand you correctly, let me ask you this, what is stopping you
    from adding two separate action mappings? For example

    <action path="/blah1" type="blah.blah.action1"
    .....
    .....
    input="/yada1.jsp"
    </action>

    <action path="/blah2" type="blah.blah.action1"
    ....
    ....
    input="yada2.jsp"
    </action>
     
    Sanjay, Apr 26, 2007
    #2
    1. Advertising

  3. vyshu

    vyshu Guest

    On Apr 26, 5:52 pm, Sanjay <> wrote:
    > vyshu wrote:
    > > hi,

    >
    > > I am devoloping an
    > > application using struts.I am facing some problems in handling
    > > errors.Let me expain my situation.I have two forms in diffrent jsp
    > > pages.On the click of submit,I am processing the data in a single
    > > Action Servlet.In my action mapping i can specify only one page as the
    > > value for the attribute "input".so in case of any errors,I am not able
    > > to redierct to the exact input page.

    >
    > > any comments?

    >
    > > thanks,
    > > vysh

    >
    > If I understand you correctly, let me ask you this, what is stopping you
    > from adding two separate action mappings? For example
    >
    > <action path="/blah1" type="blah.blah.action1"
    > .....
    > .....
    > input="/yada1.jsp"
    > </action>
    >
    > <action path="/blah2" type="blah.blah.action1"
    > ....
    > ....
    > input="yada2.jsp"
    > </action>


    Thanks a lot for your reply sanjay.yeah,i did the same!.
    ok,this is done.
    But yesterday i just got messed up with new one.
    I have an form for updating the customer details.when ever the user
    say submit,it calls the action and performs the updation.Now comes my
    problem,I want to redirect back to the same update page with the newly
    updated values.I think you got what i meant.
    Let me be specific,Can i call an action from another action?.If its
    possible please do reply me.
    waiting for your suggestions.
    thanks,
    vysh.
     
    vyshu, Apr 27, 2007
    #3
  4. vyshu wrote:

    > Let me be specific,Can i call an action from another action?.If its
    > possible please do reply me.


    You've started another thread on this :(

    --
    Regards,

    Richard
     
    Richard Senior, Apr 27, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Goldin

    Errors, errors, errors

    Mark Goldin, Jan 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,007
    Mark Goldin
    Jan 17, 2004
  2. Katie Wright
    Replies:
    8
    Views:
    4,337
    Andrea Desole
    Jan 7, 2005
  3. Jason Us
    Replies:
    0
    Views:
    1,017
    Jason Us
    Oct 4, 2003
  4. jc1771
    Replies:
    0
    Views:
    431
    jc1771
    Dec 28, 2003
  5. sin
    Replies:
    3
    Views:
    747
    Sudsy
    Feb 22, 2004
Loading...

Share This Page