vasitha harsh chandresh
jsp question?
0 Answer(s)      3 years and 6 months ago
Posted in : Java Interview Questions

see you all know about including file in a jsp... i want to know is... see i have 2 files

one.jsp two.jsp

in two.jsp i have below given code Long something = 0;

in one.jsp code is <%@include file='two.jsp'%> <%@include file='two.jsp'%>

i have included same file two times.... so there will be error because.. something variable will be created 2 times... right?

so it measn before including file second time i should check that.. if once its included then i should not inculde it again... how to check that..?

as in php there are functions like include("file.php"); //that will include file

and include_once("file.php"); //this will include file if its not included before...

ANY ANY solutions for that????

Advertisement
View Answers