Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

path related problem

 
Samith Nambiar
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
<%@ include file="header.html" %>
is it necessary that header.html should be present in the same directory as the jsp file?
i get an error when i use a context relative path
for example :
Context Name : demo
JSP directory : demo/web/jsp
HTML directory : demo/web/html
the following code gives me an error
<%@ include file="/demo/web/html/header.html" %>
why is this so?
thanks
/SAmith
 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's because the context is relative to the URL, not to the web app path. A Context is part of the URL name, which is mapped to a directory path in the web.xml file.
For the case you've listed, try:
<%@ include file="/web/html/header.hml" %>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic