aspose file tools*
The moose likes Struts and the fly likes How to handle form bean exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to handle form bean exception" Watch "How to handle form bean exception" New topic

How to handle form bean exception

Yewint Ko
Ranch Hand

Joined: Aug 02, 2009
Posts: 90
Hi all, I have some problems with using struct form bean.

I created a form bean called LoginForm to handle login form data from my jsp page.( username and passward field )
When I submit (from my jsp page) entering either username or passward field or both, everything is OK.
But when I submit with niether username nor passward , I got the exception.
I got this error message , " no input attribute for mapping path..... ". And yes, I know that is because I didn't enter any input in my jsp form. So, what I want to know is how to handle that exception. ( in the case of I don't use java/VB script at the client side).

Somebody help me please...
David Newton

Joined: Sep 29, 2008
Posts: 12617

Add an "input" attribute? Turn off automatic validation?
I agree. Here's the link:
subject: How to handle form bean exception
Similar Threads
How to update Session variable with Form Data ?
What's the best way to handle multiple Java bean instance in Jsp?
showing one form if the other form is submitted
How to pass value in href tag
How to perform validation conditionally ?