Yes, I did know about jrun-web.xml but, as you pointed out, this is
JRun-specific and I'm trying to stay away from vendor-specific solutions.
Besides, I also found that JRun's JSPC compiler for JSPs doesn't honour the
mappings defined in this file in resolving the include directives.
The need for virtual mappings in general being a part of the Servlet spec is
my conclusion as well. Until that happens, I've decided to eliminate
symbolic links and virtual mappings for anything under the webapp root. I
wrote a "VirtualMappingResolver" servlet for virtual paths for static file
includes from locations external to the webapp, which streams/writes the
file to the OutputStream/PrintWriter.
--aslam
-----Original Message-----
From: Johansen, Roar [mailto:[EMAIL PROTECTED]
Sent: Friday, February 27, 2004 5:23 AM
To: JRun-Talk
Subject: SV: Symbolic links under the web app root
In JRun4, I think you should use JRun's virtual mapping concept instead
of symbolic links. In jrun-web.xml (within your WEB-INF folder) add
<virtual-mapping>
<resource-path>/pages</resource-path>
<system-path>/wherever/on/the/harddisk/pages</system-path>
</virtual-mapping>
This maps the context relative path of /pages to the physical location
in <system-path>. This allows also for "redirection" of resources
outside of a .war file distribution. However, I agree that symbolic
links should work...
I wish, however, that this was part of the J2EE spec (it's specific to
JRun4, actually). My thanks to anyone who can contribute to the general
picture here, at least how to utilize a similar concept in e.g. tomcat.
(I know this is beyond the scope of this list, so I apologize for any
offense ;))
Regards,
Roar
--------------------------
Roar Johansen
Chief architect
Finntech AS
[EMAIL PROTECTED]
http://www.finntech.no <http://www.finntech.no/>
Mobile: +47 905 76056
-----Opprinnelig melding-----
Fra: Karachiwala, Aslam
[mailto:[EMAIL PROTECTED]
Sendt: 18. februar 2004 20:17
Til: JRun-Talk
Emne: Symbolic links under the web app root
Re.: JRun 4 on Solaris 8
Under my web app root -- /myApp-app -- I have the following:
index.jsp
/prodPages
/pages
/WEB-INF
In the above, /pages is a symbolic link while /prodPages is a
directory.
Consider a JSP that contains the following directives:
<%@ include file="/prodPages/prodHeader.jsp" %>
<%@ include file="/pages/pageHeader.jsp" %>
During compilation the first directive succeeds while the second
fails,
complaining that the file cannot be found. The files are
ofcourse there in
both cases and the only difference is that one is under an
actual directory
while the other is under a directory being accessed via a
symbolic link,
which is the one that isn't found.
Is this a bug, a config issue or unchangeable intended behavior?
--aslam
"This communication is intended solely for the addressee and is
confidential and not for third party unauthorized distribution."
_____
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
