Hi,
I seriously doubt if Harry's current design (based on Model 1) needs Struts at all. I mean, there is absolutely no advantage of migrating a Model 1 based design to Struts.
Let me be more specific:
From your description it looks like you want to forward to another page when a button is clicked (using javascript form submission).
All the procesing logic is also probably located in the
JSP which pulls the request parameter.
Hence there is no use in having a Action just to do a forward.
Anyway inspite of all these if you want to use html:form to do the submissions to the next page, here is what
you should do:
1) Use a DispatchAction instead of the plain vanilla Action
2) Add the buttons with the same name (as one of the previous mails pointed out)
3) In the DispatchAction define methods named as projects(), sockets() (These are the values of the button in the form)
4)Set up the DispatchAction in struts-config.xml
The advantage of this approach is that you dont have code the execute to decide which method should be called. Instead the DispatchAction calls the projects() method when projects buttoin is pressed, sockets() method when the sockets() method is pressed.
I know this is too short of an explanation for a topic like DIspatchAction.
If you want to know more about DispatchAction, download a free chapter from a Struts book that I recently wrote. It is available at:
Download a Free chapter covering DispatchAction Srikanth Shenoy
Author: Struts Survival Guide [ March 02, 2004: Message edited by: Srikanth Shenoy ]