How can I check if the Submit button was clicked in JSTL?
+1
A:
Make sure the button has a name
attribute so that when it's pressed, an associated request parameter will be submitted. For JSTL, it then becomes as simple as checking any other request param: ${param.nameOfTheButton}
.
kschneid
2010-09-23 17:25:22
A:
I dont think you can check if the submit button was clicked or not using JSTL. But you can know which submit button was clicked inside a servlet etc... for example if the button is
<input type="submit" name="Go"/>
for jsps use ${param.Go} for servlets use request.getParameter("Go");
Hi, this was already answered by kschneid :) The normal way would be to give his answer an upvote if you agree. But you don't have a 15 reputation yet (which is minimum required to be able to vote on other's answers). I'd suggest to go post *new* answers on questions rather than duplicating the already given answers. Then you'll quickly earn enough reputation :)
BalusC
2010-09-28 13:32:58