I am ASP.NET Developer, New To JSP. How can i perform Button Click event in JSP ?
I Want to Execute the Code in Server Side not in Javascript. I Know That I can achieve it By Servelets. I Have Some Questions Regarding This.
1.) I Have 30 Pages in My JSP Project. Do I Have to Create 30 Servelets ?
2.) Is There Any Page Load Event In JSP Similar to ASP.NET ?
Thanks in Advance
Not necessarily. May be a single servlet perform one or more task(s).
Yes, it is
void jspInit() { ... }but use of Java code in JSPs is is highly discouraged.You can determine which
submitbutton is pressed in Servlet’s doPost/Get method by reading request parameter.TestServlet.java
test.jsp