wood burning stoves*
The moose likes Struts and the fly likes Don't need an ActionForm ! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Don Watch "Don New topic
Author

Don't need an ActionForm !

Dave Hewitson
Greenhorn

Joined: Jun 01, 2001
Posts: 27
I have a simple page, that just shows some stuff and allows the user to press a button and go back to the page they came from.
So, I don't need an ActionForm, but Struts forces me to have one if I want to use <html:form.......>
Now I can just use a normal <form...>, but, is there a recommended way of dealing with this scenario?
TIA
Dave.
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
i'm not sure if there is a "recommended" way, but one thing you could do is use <html:button> and have it call some javascript. The javascript method called would direct the user to the appropriate action, whose path can be rendered using <html:rewrite>. I'm assuming of course that there is some reason you specifically want to use a button, and not an image button ( <html:image> ), or some kind of link ( <html:link> ).
Dave Hewitson
Greenhorn

Joined: Jun 01, 2001
Posts: 27
I want to use a button only for consistency in the application.
I could just create an ActionForm with nothing in, but it seems odd to have to do this.
Or maybe, as you thought, have an image of a button with a link to the approriate action.
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Don't need an ActionForm !
 
Similar Threads
can i use a normal form with struts?
Struts Form Type question
Struts validator question
Display Check Boxes & Dropdowns in Struts with search results
integrate DWR with struts