File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes jsp:include resource not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp:include resource not found" Watch "jsp:include resource not found" New topic

jsp:include resource not found

Mohammed Yousuff
Ranch Hand

Joined: Oct 17, 2007
Posts: 198
Is there any way to know in JSP,if jsp include files are missed. For example if a file include.jsp is not present and in my jsp if i have include code like this <jsp:include page="include.jsp" />. I can't see any error was thrown.

But if i try the same with <%@ include file="include.jsp" %>, my page is getting failed at compile time. I can understand this, because @include is compile time... So what about jsp:include ?

Any thoughts? thank you ;)

My Thoughts :
Try not to become a man of success but rather to become a man of value.
Chinna Eranna
Ranch Hand

Joined: Dec 08, 2009
Posts: 174

I see the following error on.. Apache tomcat 6.0.16

javax.servlet.ServletException: File "/jsp/myPage.jsp" not found

- Chinna
Mohammed Yousuff
Ranch Hand

Joined: Oct 17, 2007
Posts: 198
I have index1.jsp BUT i don't have index22.jsp.... If i give this i can't see any error in logs but only the content missed in the output... i am using Apache Tomcat/6.0.13

I have learned that its a BUG, which has been log here in 2005 .. i was wonder they why this has not been fixed for apache 6.0.13 ?

Charles 'King
Ranch Hand

Joined: Jul 05, 2009
Posts: 56

This may help you understand the difference: difference between jsp:include...
Sudhakar Sharma
Ranch Hand

Joined: Apr 04, 2009
Posts: 71

<jsp:include page ="something.jsp"> is simply including the thing at run time, you may assume that a separate request-thread is generated and the output of the page is included. so, at this time the container think like a content to be included so, not to throw an exception or error, because of this its attribute name is 'page'. when you using incude directive you are including a file.
I agree. Here's the link:
subject: jsp:include resource not found
It's not a secret anymore!