This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

jsp:include

 
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Friends I have a problem in understanding this:-->

� A.jsp says <%@ include file=�dir/B.jsp�%> and dir/B.jsp says <%@ include
file=�C.jsp�%>. In this case the relative specification C.jsp resolves to dir/C.jsp.
� A.jsp says <jsp:include page=�dir/B.jsp�/> and dir/B.jsp says <jsp:include
page=�C.jsp� />. In this case the relative specification C.jsp resolves to dir/
C.jsp.
� A.jsp says <jsp:include page=�dir/B.jsp�/> and dir/B.jsp says <%@ include
file=�C.jsp� %>. In this case the relative specification C.jsp resolves to dir/C.jsp.
� A.jsp says <%@ include file=�dir/B.jsp�%> and dir/B.jsp says <jsp:include
page=�C.jsp�/>. In this case the relative specification C.jsp resolves to C.jsp.


This portion is from JSP Specs
i need some explanation as to how these are getting resolved ,..
like for the last one(4th) why it gets resolved to c.jsp and why not dir/C.jsp ??

Thanks,
mallika
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mallika Shah,

I was about to post the same question. I am also pretty confused. . Can somebody please help!

Thanks
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mallika and Rajee,

I think this article should help you understanding relative path interpretation in jsp:

How to interpret paths in JSP's inclusion

Thanks,
-Rancy
 
mallika shah
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Ranchy, that was a good link..
 
Rajitha Arun
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much, Rancy. That article really helped me to understand about the file and page attributes.
 
Whoever got anywhere by being normal? Just ask this exceptional tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!