Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Handling errors in Struts

Reply
Thread Tools

Handling errors in Struts

 
 
vyshu
Guest
Posts: n/a
 
      04-26-2007
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

 
Reply With Quote
 
 
 
 
Sanjay
Guest
Posts: n/a
 
      04-26-2007
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>
 
Reply With Quote
 
 
 
 
vyshu
Guest
Posts: n/a
 
      04-27-2007
On Apr 26, 5:52 pm, Sanjay <(E-Mail Removed)> 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.

 
Reply With Quote
 
Richard Senior
Guest
Posts: n/a
 
      04-27-2007
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it safe to point to Internet for locating struts DTD files in struts TLDs and XML files? Katie Wright Java 8 01-07-2005 03:37 PM
Errors, errors, errors Mark Goldin ASP .Net 2 01-17-2004 08:05 PM
Integrate a Struts app with a non-struts app jc1771 Java 0 12-28-2003 06:36 PM
Struts Installation - missing struts.tld??? Jason Us Java 0 10-03-2003 11:36 PM



Advertisments