aspose file tools*
The moose likes Struts and the fly likes DispatchAction problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "DispatchAction problem" Watch "DispatchAction problem" New topic
Author

DispatchAction problem

huan duong
Greenhorn

Joined: Apr 04, 2012
Posts: 3
Hi every people!

I have a problem with DispatchAction in struts framework. I don't know how can i resolve it.
Can you please help me to complete it.
My intent is when I click to "update" then screen display update massage.
Here my code:
----------------------------------------
JSP file:


----------------------------------------
Strust config file:

-----------------------------------------
Bean class: I have a form bean with message property
-----------------------------------------
Action class


Thank you very much!

huandv
Shankar Tanikella
Ranch Hand

Joined: Jan 30, 2011
Posts: 329

Hi Huan,

Welcome to JavaRanch!!!

What is the actual problem that you are facing?


If your struts config is same as you posted, then you have to include the forwards within action mapping's actions. example,


Have Fun with Java
little,little.. little by little makes a lot..
huan duong
Greenhorn

Joined: Apr 04, 2012
Posts: 3
Shankar Tanikella wrote:Hi Huan,

Welcome to JavaRanch!!!

What is the actual problem that you are facing?


If your struts config is same as you posted, then you have to include the forwards within action mapping's actions. example,


Thanks Shankar Tanikella!

My intent is when i click to Update/insert/delete button in DispatchAction.jsp, then a message was displayed in DispatchAction.jsp page.
But my program doesn't. I see my form bean is null.
Can you show me why my form bean is null(I assigned value in Action class ), and show me the way to display message when i click to button(use DispatchAction).

Thanks you very much!

Shankar Tanikella
Ranch Hand

Joined: Jan 30, 2011
Posts: 329

Hi Huan,
Is this issue resolved? if not try to alert the form name in your javascript method [use alert(document.forms[0].name)]
Also at which point is your form null - JSP/Action? In your action class what is the ActionForm's instance [check using instanceof/debug]?
vipul bondugula
Ranch Hand

Joined: Oct 14, 2010
Posts: 218


You did not specify any validate attribute. If validate="true" is specified then if validation fails then page will navigate to the page specified in the input attribute..

Without validate how the page is navigating to DispatchAction.jsp


Thanks
Vipul Kumar
huan duong
Greenhorn

Joined: Apr 04, 2012
Posts: 3
vipul bondugula wrote:

You did not specify any validate attribute. If validate="true" is specified then if validation fails then page will navigate to the page specified in the input attribute..

Without validate how the page is navigating to DispatchAction.jsp


Thanks for your answer. I resolved my problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DispatchAction problem