>
> >I tried that. The HttpServletRequest.getRealPath("/") returns the
> >document root, i.e.
> > /usr2/local/apache/htdocs
> >The SevletContext.getRealPath("/") returns null. My servlet is
> located at
> > /usr2/local/apache/servlets/development/MyServletDir
> >
> >Any other suggestions?
>
> Take HttpServletRequest.getRealPath("/"), strip off the "htdocs" substring
> and add "servlets/development/MyServletDir/". Perhaps that's too
> hard-coded
> for your needs however.
>
> Regards,
> Steve Mann
Yea, I wanted something more generic so when I move the servlet to the production
directories it just works without making any code changes.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html