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
Joined: Jun 09, 2000
i got the answer we have to refresh jsp on click of button and while refreshing it we put some flag which if true can allow the jsp:include to become active correct me if i am mwrong
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.