• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp:include

 
Tiago Fernandez
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
What's wrong with this include?
<jsp:include page="<%= getServletContext().getInitParameter("contextPath") + "header.jsp"%>" flush="true" />
It doesn't works...
Tks!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That greatly depends on what getServletContext().getInitParameter("contextPath") resolves to.
Clue?
hth,
bear
 
Tiago Fernandez
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Bear,
The getServletContext().getInitParameter("contextPath") works fine, I use it in my <base> html tag.
It just don't work in the jsp:include...
Any idea?
Tks!
 
Tiago Fernandez
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I got this fixed doin' the followin':
<jsp:include page="/header.jsp" flush="true" />
Best regards!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic