Yes.  Calvin, if you haven't used Benjamin's technique of bundling an
interesting file in a jar file, check it out.  You'll grow to depend on it
and enjoy using it.

Are you familiar with the technique?  If not, contact me off list and I will
assist.

Markk


On 5/15/06, Benjamin Armintor <[EMAIL PROTECTED]> wrote:

Or you could let go of the idea of file paths and use a URL from the
ServletContext.getResource() or the corresponding InputStream from
ServletContext.getResourceAsStream().  This also allows you to package the
.xsl up in a .war file without breaking.


-----Original Message-----
From: Mark Petrovic [mailto:[EMAIL PROTECTED]
Sent: Mon 5/15/2006 9:07 PM
To: Tomcat Users List
Subject: Re: Determining file locations in tomcat

You can put the path in an <init-param> in the application's web.xml
.  Then
retrieve it at runtime in your servlet.init() method using
getInitParameter("path").

On 5/15/06, Calvin Deiterich <[EMAIL PROTECTED]> wrote:
>
> I need to place a file(.xsl) in with a tomcat servlet application and
> I do not want to hard-code the path into the java code.  I want the
> file to be in the \webapps\<projectname>\WebContent\xml\xslt\ path.
> What is the best way to handle this.
> Thanks
> Calvin
>
> --
> http://mywebpages.comcast.net/tnczoo/
> -----
> "If a dog will not come to you after having looked you in the face,
> you should go home and examine your conscience."
> - Woodrow Wilson
> -----
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Mark
AE6RT


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Mark
AE6RT

Reply via email to