This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp:include resource not found

 
Mohammed Yousuff
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ;)
 
Chinna Eranna
Ranch Hand
Posts: 174
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see the following error on.. Apache tomcat 6.0.16

javax.servlet.ServletException: File "/jsp/myPage.jsp" not found
 
Mohammed Yousuff
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 https://issues.apache.org/bugzilla/show_bug.cgi?id=37326 .. i was wonder they why this has not been fixed for apache 6.0.13 ?








 
Charles 'King
Ranch Hand
Posts: 56
Eclipse IDE Postgres Database Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This may help you understand the difference: difference between jsp:include...
 
Sudhakar Sharma
Ranch Hand
Posts: 71
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic