Dirk,
Thanks for the reply.
Your suggestion for placing the /include directory in each of my
wars is the workaround I'll probably use.
I'm currently using absolute includes in another app running on a
Tomcat server without a problem. I'm not sure if I've modified
anything in the Tomcat config to allow this, it has been a long time
since I configured that server. We're running a closed shop with
only a few IT employees having access to deploy to our boxes.
Security isn't really a concern with our limited number of potential
people with the ability to deploy code.
Thanks again for the reply.
Bob
On Aug 28, 2006, at 10:10 AM, D. Strauss wrote:
Hello, Bob
AFAIK the JSP include statement is used to refer to a file starting
from
the actual JSP file location. So, let's assume you have a file
index.jsp
which should include a file from a subdirectory, your idea is right:
<jsp:include page="dir/my.html"/>
(I tend to use JSPFs :P)
The problem is: you can only reference files from within your webapp
context. That's security related, I think. Imagine you're a web hoster
which hosts jsp files ;) the users would be able to include my
/etc/passwd file ;)))))
So, yes, the path is relative from/to the JSP file position.
Another idea: do you include your includes/header.html file within
your
war file?
Best regards
Dirk
Bob Dushok schrieb:
I'm attempting to include content using the <jsp:include> tag.
I'm the
following code within a JSP:
<jsp:include page="/includes/header.html"/>
When the page is loaded, the message "The requested resource
(/staff/includes/header.html) is not available" appears. I'm
specifying
an absolute path, but Geronimo appears to be treating it as a
relative
path (my app contains <context-root>/staff</context-root> in
geronimo-web.xml).
I tried something similar using JSTL:
<[EMAIL PROTECTED] uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:import url="/includes/header.html" />
Again, "The requested resource (/staff/includes/header.html) is not
available" appears when the page is loaded.
I've used similar code within Tomcat without any problems. I'm
new to
Geronimo. is there something I missed in the config? Do I need to
enable absolute path usage?
Thanks,
Bob