This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Help ASAP! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Help ASAP!" Watch "Help ASAP!" New topic
Author

Help ASAP!

namita sasa
Ranch Hand

Joined: Apr 20, 2009
Posts: 56
Please help me with this:
After doing struts validation(Written own validation methods in form bean), instead of showing the error messages on same page, it is returning to same jsp page but not displaying any error messages. It is showing me blank jsp page with title. Why?? I am using struts 1.2 with tomcat 5.5. I checked that actionErrors object returns correct error messages. Why jsp page is unable to display messages?
JSP page code:

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please read the UseAMeaningfulSubjectLine and UseCodeTags FAQ entries.

Without the action configuration it's impossible to help. Is there anything shown in the server log?
namita sasa
Ranch Hand

Joined: Apr 20, 2009
Posts: 56
action config:


Error log says:

2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG AnnualCampaignActionForm3 - actionerror error object inside validate method={recurringAmount=[annualCampaign.errors.recurringAmount.required[]], recurringQuantity=[annualCampaign.errors.recurringQuantity.required[]]}
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG ActionCommandBase - Executing org.apache.struts.chain.commands.servlet.SelectInput
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG AbstractSelectInput - Forwarding back to ForwardConfig[name=null,path=/registration/annualCampaign3.jsp,redirect=false,module=,extends=null,catalog=null,command=null]
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG ActionCommandBase - Executing org.apache.struts.chain.commands.ExecuteCommand
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG ActionCommandBase - Executing org.apache.struts.chain.commands.servlet.SelectForward
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG ActionCommandBase - Executing org.apache.struts.chain.commands.SelectInclude
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG ActionCommandBase - Executing org.apache.struts.chain.commands.servlet.PerformInclude
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG ActionCommandBase - Executing org.apache.struts.chain.commands.servlet.CreateAction
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG ActionCommandBase - Executing org.apache.struts.chain.commands.servlet.ExecuteAction
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG ActionCommandBase - Executing org.apache.struts.chain.commands.ExecuteForwardCommand
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG ActionCommandBase - Executing org.apache.struts.chain.commands.servlet.PerformForward
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG [/paymentsgateway2] - servletPath=/registration/annualCampaign3.jsp, pathInfo=null, queryString=null, name=null
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG PerformForward - Forwarding to /registration/annualCampaign3.jsp
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG [/paymentsgateway2] - Path Based Forward
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG JspServlet - JspEngine --> /registration/annualCampaign3.jsp
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG JspServlet - ServletPath: /registration/annualCampaign3.jsp
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG JspServlet - PathInfo: null
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG JspServlet - RealPath: C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\paymentsgateway2\registration\annualCampaign3.jsp
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG JspServlet - RequestURI: /paymentsgateway2/registration/annualCampaign3.jsp
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG JspServlet - QueryString: null
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG JspServlet - Request Params:
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG JspServlet - startDate = 04/29/2009
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG JspServlet - recurringAmount =
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG JspServlet - recurringGiftOption = Weekly
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG JspServlet - recurringQuantity =
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG JspServlet - id = 0
2009-04-28 11:17:53,308 [http-8080-3 ] DEBUG [/paymentsgateway2] - Disabling the response for futher output

From the error log, I found that action error is receiving proper error messages and it is forwarding it back to same jsp page but it is not displaying the error messages.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

*Please* read UseCodeTags and then actually use them. It's hard to read code/config without them.
namita sasa
Ranch Hand

Joined: Apr 20, 2009
Posts: 56
I hope you can read my simplified code with <code> tags around.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Did you look at your edited post after you hit "submit" and see that it's not changed?

Here's the link again: UseCodeTags. It tells you *precisely* how to use code tags. After you edit your message you can see, immediately, the effects of your changes (if any): the site redirects you back to the page containing your post.
namita sasa
Ranch Hand

Joined: Apr 20, 2009
Posts: 56
I changed it to with .
Please let me know about the problem.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

And the validation code? (Did you notice that your last message was formatted improperly because you didn't escape the UBB tags?)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help ASAP!
 
Similar Threads
Form bean not specified on mapping for action: "/contact"
html:errors displayed before form is submitted
JSP <a href> tags breaks page functionality
DispatchAction No action instance for path ...
Handling validations of multiple forms in single jsp