I have a JSP which has a button. <button type= >Click Me</button> This is not part of any form but rather a stand-alone button. How do I move to B.jsp when I click this button in A.jsp?
This is what I did- <a href="/nextpage.jsp"> <button type=submit>Order Now</button></a> Button visible and on miving the mouse over it, shows that this will navigate to nextpage.jsp. But on clicking it, getting a 404 error. /nextpage.jsp is not available. Can you help me?
Two things: 1) Combining the a and the button tag is not a good idea. Use one or the other. 2) The href must be a valid url for the page. We can't possibly help you with your 404 with the information you have provided so far.
try:-- <a href="nextpage.jsp"><input type= button>Order Now</button> </a> href="nextpage.jsp" or href="../nextpage.jsp", depends on the relative locations of the two files stored. Hope I understood you right :roll: