tags:

views:

18

answers:

1

Hi

Can I submit a simple html form with html tags and no struts tags. I'm using struts 1.0 and have a form like this:

<form action='/admin/fsubmit.html?action=search' method='post'>
  <input type='text' name='keyword'>
  <input type='submit' name='search' value='Search'>
</form>

I'm handling this submission with struts. but it seems like my action is never called. Do I need to use form with struts html tags?

If using struts html tags is the only option then how do I use two forms in single Action class?

A: 

The answer is yes,

The problem I see here is your action='/admin/fsubmit.html?action=search'. It's either your action is mapped to a .do extension or .html. If it's the latter, then your relative URL isn't mapped properly.

The Elite Gentleman
Hey.. sorry..I found the problem. Actually I'm also using one ActionForm and one of it's property matches with that of this form and hence type error was there. but Still I want to know can I use tow ActionForms in same Action?
Shwetanka
Nope, you can't specific 2 `name` fields in a Struts action.
The Elite Gentleman