html - wants to include a jsp page in another jsp page on button click -
this success.jsp page having button name employee list, opens new page viewemployee.jsp, want include viewemployee.jsp page inside success.jsp page on button click
<html> <body> <form action="index.jsp"> <table> <tr> <td align="left">welcome !! <%=session.getattribute("user")%></td> <td align="right"> <input type="submit" value="logout"></td> </tr> </table> <hr> <h2>choose action perform...</h2> <table align="center"> <tr> <td><h3> <input type="button" value="employee list" onclick="window.location='viewemployee.jsp'" /> | </h3></td> <td><h3> <a href="addemployee.jsp">add employee </a> | </h3></td> <td><h3> <a href="deleteemployee.jsp">delete employee </a> | </h3></td> <td><h3> <a href="updateemployee.jsp">update employee </a> </h3></td> </tr> </table> <% session.invalidate(); %> </form>
perhaps can try solution. hope help
html code inside form
<input type="button" value="employee list" onclick="fntest();" />
javascript
function fntext() { document.mainform.action="/home/folder/viewemployee.jsp"; document.mainform.submit(); }
add form after end of first form
<form name="mainform" method="post" ></form>