Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt in Include Directive  RSS feed

 
Bennet Xavier
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have two folders in the application, one folder (jsp) for jsp's and another folder (inc) for include files(jsp's,inc,etc...) in jsps.

My question is, How to include the file in the "inc" folder to the jsp in "jsp" folder.

and what this three things signifies in include directive.
file="include.jsp"
file="/include.jsp"
file="../include.jsp"

is there anything else like this to point the file.

Thanks In Advance.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bennet,

check this url:
-------------------------------------
http://www.coderanch.com/t/293798/JSP/java/relative-path-confusion
----------------------------------
Hope this will help you
 
Bennet Xavier
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Seetharaman,

i read that one, you are discussing about the current, root and parent directory, its clear. But my doubt is about the include file in different directory inside the root.

i think, i need to mention the path relative to root.

if there is any other opiton please let me know.

Thanks for replying.

Do reply.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66184
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is covered in the JSP FAQ. Using page-relative addressing leads to disaster and disgrace. Always use context-relative addressing.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!