This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
This is really very basic question but I am not clear. This is my signIn.jsp file:
How can I send three different events from the same form?
In other words, There are three buttons at my page and I want different action on each click of each button. How could I do this??? or how can I know at server side that which button has been clicked by user???
I am sure there must be many ways of doing this, please tell me the simpler one and best one.
Thanks a lot.
[ November 26, 2005: Message edited by: Bear Bibeault ]
this is where the beauty of struts comes into play (or any standardized framework for that matter). Struts has a DispatchAction w/ an actionMethod defined in the struts action definition for this use case. why try to reinvent the wheel instead of using the wheel for leverage.
Originally posted by C Broussard: this is where the beauty of struts comes into play (or any standardized framework for that matter). Struts has a DispatchAction w/ an actionMethod defined in the struts action definition for this use case. why try to reinvent the wheel instead of using the wheel for leverage.
Adopting a bloated behemoth like Struts in order to accomplish a simple switch would be a tad bit of overkill, in my opinion.
Joined: Jun 18, 2004
hey, don't shoot the messenger. j/k. I agree that this single example here doesn't provide enough of a business case to switch a bunch or adding a bunch of code around. here's some stuff to keep in mind. if he was using a standardized framework he most likely wouldn't be posting this question, he'd be posting a much more difficult question Ha Ha!. But seriously, this problem has already been addressed by someone else and solved. secondly, this is the signIn.jsp. sounds like he's doing more than a 20 action application, so it starts to warrant a standardized approach for long term maintainability, not some home-grown application... of course I could be completely off base.. I did join the party late.
Originally posted by C Broussard: ps.. one other thing.. struts isn't bloated.. JSF is bloated
Hey, dont say a word to JSF.
I always did with my own fabricated framework. After JSF, I joined the JSF team and still working with JSF. Its good a bit immature but real good, simple, sensible. Its a component based framework and easily digestable. JSF is something really works and has a great future.
By the way, the discussion is going off topic.
I guess you dont know what she is doing. From her previous posts I got to know that she made her own mini web framework based on MVC architecture and going great with that, I hope. So, struts, or something else is meaningless for her right now.
I would also suggest the same, what Adeel and Oswald already suggested. [ November 28, 2005: Message edited by: Babar Qadri ]