I have a main jsp file that redirects, depending on the request, the appropriate jsp file. I was using at first: <%@ include file="d_AllProjects.jsp"%> But I started getting the "Illegal target of jump or branch" error once I had more than 17 includes (using condition to select the appropriate one). so I switched the code to build the filename as a string depending on the request and then used: <jsp:include page="<%=filename%>"/> It's working but there's a small delay when the page is being pulled. I'm also not sure which one is best to use. Any advice on how to clean this up? Many thanks!
Zeina In the <jsp:include ... > tag the page to be included is determined at runtime. As opposed to the <%@ include ...> tag which is done at compile time. So there will be more of a delay at runtime for the first one. As far as the error you were getting when you have more than 17 includes I dont know why you'd be getting that. I would look at the 17th one you add and make sure the path info for it and all the spellings are correct.
Joined: Jul 19, 2001
Thanks for replying. I haven't used custom tags yet. (I haven't learned to yet...) I think after this demo this week, I'll try to rewrite some of my code and see what I could write in custom tags. Dave, I know it sounds weird, but it's when I include any jsp file after the 17th condidion include, I get that error. It could be cause of some of the includes or references in the files... I'm going to have to go back and 'clean up' and write some javabeans and custom tag. But to be honest, I don't know what should be in the javabean? Do you guys recommend any book or tutorial on the web on javabeans? and when best to use it? Everything I found on the web doesn't seem to apply to my project. I am using MS SQL Server 7 for backend, and JRUN 3.1. Thank you again! Zeina
subject: difference bw jsp: include page and @ include file