Hi Harmeet , Use 'action' in your form tag .
<form method="get" action="whereYouWantToGOAfterSubmit " > Also you need to define servlets mappings in web.xml if you are submitting to servlets. Hope this helps :-) ----- Original Message ----- From: Harmeet To: Java EE (J2EE) Programming with Passion! Sent: Friday, February 06, 2009 3:45 AM Subject: [java ee programming] Homework 3 JSP basics I am trying to display response.jsp I am able to do forward from index.jsp to middle.jsp with <jsp:forward page="middle.jsp"/> But when i click on the submit button on middle.jsp , the page refresh and takes me back to index.jsp In my middle.jsp i am using include tag eg <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>middle</title> </head> <body bgcolor="red" text="white"> <h1>opps!! forgot to ask one more thing </h1> <form method="get"> <input type="text" name="myparameter" size="26"> <input type="submit" value="Submit"> </form> <% String myparameter = request.getParameter("myparameter"); if ( myparameter != null && myparameter.length() > 0 ) { %> <%...@include file="response.jsp" %> <% } %> </</body> </html> Any idea why this is happening why --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en -~----------~----~----~----~------~----~------~--~---