Hi Hassan,

Once again thanks for the feedback,, the issue I would have with the
solution above is that content (html, pdf, xml) is maintained by
editors that I have no control over. They simply make their content
look the way the want and then upload it to my application. I could
feasibly search out all paths with html documents and do a little
replace magic on upload,, however this gets complicated to the point
of impossible when dealing with documents such as XML, XSLT where
internal references can be made with virtually unlimited semantics. So
keeping the directory structure the same from the "root down" is
important (Keeps a documents "form" in the responsibility sphere of
the editor).

My app is responsible for controlling logging and accessing to these
documents (Administrators have an interface for granting access to
users on documents uploaded by the editor). I just can't seem to serve
these documents up.

Thanks,

Spencer

On Dec 18, 2007 11:20 AM, Hassan Schroeder <[EMAIL PROTECTED]> wrote:
> On Dec 18, 2007 11:03 AM, Spencer Tickner <[EMAIL PROTECTED]> wrote:
> > The files are "lost", as I'm firing the servlet in the
> > {tomcat}\webapp\ServletDir\, that then reads a file "C:\somefile.htm"
> > that in it has reference to <img src="test.gif", and test resides in
> > C:\. somefile.htm is read and returned to the browser fine,, but the
> > browser can't find test.gif.  Hope this clears up the confusion.
>
> Then you need to use an absolute but context-relative path, e.g.
>
>    src="${pageContext.request.contextPath}/images/test.gif"
>
> (JSTL example) and put that image in
>
> $CATALINA_HOME/webapps/{appname}/images/
>
> HTH!
> --
>
> Hassan Schroeder ------------------------ [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to