use javascript. have onclick events in all 3 buttons with different locations as the parameter to a function call. use something like window.location = destination for the body of ur script. the concept is so easy that i will not include code. (actually i had a late night and i'm too tired right now to put code) this should be enough anyways. you can go to msdn.microsoft.com/library and look under webdevelopment for more info. -Tim
-----Original Message----- From: Edward [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 3:40 AM To: [EMAIL PROTECTED] Subject: How to redirect JSP to Servlet by clicking button? Importance: High I want to call Servlet from JSP,In JSP,I have three button,named "button1","button2","button3",for example: <input type="button1" name=<%=button1%> value="<%=button1%>" style="width:200px"> <input type="button1" name=<%=button2%> value="<%=button2%>" style="width:200px"> <input type="button1" name=<%=button3%> value="<%=button3%>" style="width:200px"> When I click button1 with mouse,I want to redirect to a servlet,it locates: /servlet/login1;when I click button2 with mouse,I want to redirect to servlet:/servlets/login2;when I click button3,I want to redirect to servlet:/webapp/welcome. How to realize this function? Thanks in advance! Edward =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com