1.  I'm writing our online payment system using Servlets because the Session
management is extraordinarily easy.

2.  I'm taking advantage of the new technologies IBM has made available
(using Apache and Tomcat).

3.  I'm increasing my skill set.

4.  I actually like Java and OO.

5.  This is a very easy thing to do in Java, but there seems to be a secret
with Tomcat about where the file needs to reside.

Take your pick.  :-)

This is actually a very small part of a very big project.  JSP has a very
simple include function, all I'm trying to do is find a similar way to
achieve this in an actual Servlet.  I can get around it in a number of
ways... just happens that, like alwqays, the way I WANT to do it is the most
troublesome.

Joel R. Cochran
Director of Internet Services
VamaNet.com
(800)480-8810
mailto:webmaster@vamanet.com


> -----Original Message-----
> From: Brad Stone [mailto:brad@bvstools.com]
> Sent: Thursday, July 11, 2002 3:29 PM
> To: web400@midrange.com
> Subject: Re: [WEB400] Package cannot find a file...
>
>
> Is there a reason to use Java for this?  Seems like a lot of
> work to do a task that can be achieve much more simply using
> native features.
>
> On Thu, 11 Jul 2002 15:08:40 -0400
>  "Joel R. Cochran" <jrc@masi-brac.com> wrote:
> > Joe,
> >
> > I put this code in a Servlet you can view at
> > http://www.vamanet.com:1550/info/servlet/CheckFilePathServlet
> > but I feel dumb because I don't understand it... where
> > does this tell me I
> > should put the file?
> >
> > The ServerRoot directive in 'QIBM/ProdData/httpa/conf/httpd.conf"
> > is:
> > ServerRoot /QIBM/UserData/HTTPA
> >
> > which does NOT match any path displayed in the above
> > servlet.  And NONE of
> > the above represent where I actually put
> > files/images/etc. in order to be
> > able to view them.
> >
> > Hopelessly confused.
> >
> >
> > Joel R. Cochran
> > Director of Internet Services
> > VamaNet.com
> > (800)480-8810
> > mailto:webmaster@vamanet.com
> >
> >
> > > If you can't wade through the configuration files, you
> > can
> > > use the File
> > > class to empirically determine what your root directory
> > is.
> > > Just run the
> > > following code in a servlet:
> > >
> > >   String[] files = { "file", "/slashfile", "./dotfile",
> > > "/./slashdotfile" };
> > >
> > >   out.println("<H4>File paths</H4>");
> > >
> > >   out.println("<table border=4>");
> > >   out.println("
> > > <tr><th>AbsoluteFile</th><th>AbsolutePath</th><th>CanonicalFil
> > > e</th><th>Cano
> > > nicalPath</th></tr>");
> > >
> > >   try {
> > >           for (int i = 0; i < files.length; i++)
> > >           {
> > >                   File file = new File(files[i]);
> > >                   out.println("  <tr><td>" +
> > >                           file.getAbsoluteFile() + "</td><td>" +
> > >                           file.getAbsolutePath() + "</td><td>" +
> > >                           file.getCanonicalFile() + "</td><td>" +
> > >                           file.getCanonicalPath() + "</td></tr>");
> > >           }
> > >   } catch (Exception e1) {}
> > >
> > >   out.println("</table>");
> > >
> > > It will print out a table of the paths and files for
> > various
> > > syntaxes of
> > > file prefixes.
> > >
> > > Joe
> > >
> > >
> > > _______________________________________________
> > > This is the Web Enabling the AS400 / iSeries (WEB400)
> > mailing list
> > > To post a message email: WEB400@midrange.com
> > > To subscribe, unsubscribe, or change list options,
> > > visit: http://lists.midrange.com/cgi-bin/listinfo/web400
> > > or email: WEB400-request@midrange.com
> > > Before posting, please take a moment to review the
> > archives
> > > at http://archive.midrange.com/web400.
> > >
> > _______________________________________________
> > This is the Web Enabling the AS400 / iSeries (WEB400)
> > mailing list
> > To post a message email: WEB400@midrange.com
> > To subscribe, unsubscribe, or change list options,
> > visit: http://lists.midrange.com/cgi-bin/listinfo/web400
> > or email: WEB400-request@midrange.com
> > Before posting, please take a moment to review the
> > archives
> > at http://archive.midrange.com/web400.
> >
>
> Bradley V. Stone
> BVS.Tools
> www.bvstools.com
> _______________________________________________
> This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
> To post a message email: WEB400@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/web400
> or email: WEB400-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/web400.
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.