This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JSP and the fly likes jsp:include Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "jsp:include" Watch "jsp:include" New topic
Author

jsp:include

Tiago Fernandez
Ranch Hand

Joined: May 16, 2003
Posts: 167
Hi,
What's wrong with this include?
<jsp:include page="<%= getServletContext().getInitParameter("contextPath") + "header.jsp"%>" flush="true" />
It doesn't works...
Tks!


Tiago Fernandez
http://www.tiago182.spyw.com/
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

That greatly depends on what getServletContext().getInitParameter("contextPath") resolves to.
Clue?
hth,
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Tiago Fernandez
Ranch Hand

Joined: May 16, 2003
Posts: 167
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

Joined: May 16, 2003
Posts: 167
Well, I got this fixed doin' the followin':
<jsp:include page="/header.jsp" flush="true" />
Best regards!
 
GeeCON Prague 2014
 
subject: jsp:include