I am using jsp tag libs and have a requirement that on click of an image button that button should be replaced by a separate jsp which is included in current jsp and with in same page contents of that jsp should come but I am facing problem as how can I invoke <jsp:include> directive on click of a button Can any one pls give me suggestion? Thanks in advance
SCJP,SCWCD,SCBCD<br />If Opportunity doesn't knock then build the door
but I am facing problem as how can I invoke <jsp:include> directive on click of a button
The method you have thought is correct one. Use the flag to include another JSP. Another method, to include the JSP content at the very start when this page is loaded, but keep in a hidden div. You can show these contents on the click of that button.
but the first method appears better if the contents/processing on server side for the included JSP is heavy. If it is very small, send one is better, it will aviod the network traffic.