Hi kavitha,
   If U are using JavaWebserver ,I think the default directory is the root
directory.Look throgh the folowing figure



                            |----public_html
rootdir(JavaWebserver1.2)---|
                            |----servlets


U can find out the default drectory by creating a file using a servlet.After
that use the find file utility to findout where the file is.That directory
will be the default directory.U can mention the root dir in the servlet like
"test.html"
If it is in the public_html folder,U can mention it like
"../public_html/test.html"

That's all
Bye..
Unni

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
kavitha ramasamy
Sent: Saturday, July 08, 2000 2:44 AM
To: [EMAIL PROTECTED]
Subject: Re: How to create the file under webserver dir


The problem is i dont know where my webserver is to locate.
So I cannot hardcode any drives. I need to find the webserverpath through my
servlet
and I have to write the file in that directory.

Kavitha


>From: Bo Xu <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
>        Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: How to create the file under webserver dir
>Date: Fri, 7 Jul 2000 16:41:43 -0400
>
>Hi kavitha,
>
>With J2EE1.2.1,  I  use "java.io" and use
>"path+filename"("E:\f1\f2\myfile") to
>write a file.
>So if there is not limit in your "servlet engine", perhaps you can write
>file
>with the above way.
>
>
>Bo
>July 07,2000
>
>
>kavitha ramasamy wrote:
>
> > Hello,
> >
> >      When a file is created from the servlet, it is created under
> > OS c:/winnt/system32 directory. How to create this under webserver
>directory
> > in NT.
> > The server may run in different drive E.
> >
> > Any help,
> > Kavitha
> >
> > ________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
> >
> >
>___________________________________________________________________________
> > 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
>
>___________________________________________________________________________
>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

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

___________________________________________________________________________
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

___________________________________________________________________________
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

Reply via email to