You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by lcl <lc...@gnireel.com> on 2003/06/13 04:41:30 UTC

a jsp question:how to get the web application's directory?

Hi all,

I just have a question about jsp/servlet, how to gain the directory  in the
file system of a web application? because I want to create a file under the
web application, and redirect it to user.

Best Regards
lcl




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: a jsp question:how to get the web application's directory?

Posted by lcl <lc...@gnireel.com>.
OutputStream, seemed very good, but could you give me a more detailed
infomation, because I have touch it before, thank you very much.

"Dan Tran" <da...@hotmail.com> Law11-OE583b5mxXBeD00042c77@hotmail.com...
> Cant you just create a stream on the fly and ship it back to the user thru
> HTTPResponse?
>
> In you insist on writting to a webapp directory, look up
> getRealPath().
>
> -Dan
> ----- Original Message -----
> From: "lcl" <lc...@gnireel.com>
> To: <st...@jakarta.apache.org>
> Sent: Thursday, June 12, 2003 7:41 PM
> Subject: a jsp question:how to get the web application's directory?
>
>
> > Hi all,
> >
> > I just have a question about jsp/servlet, how to gain the directory  in
> the
> > file system of a web application? because I want to create a file under
> the
> > web application, and redirect it to user.
> >
> > Best Regards
> > lcl
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: a jsp question:how to get the web application's directory?

Posted by Dan Tran <da...@hotmail.com>.
Cant you just create a stream on the fly and ship it back to the user thru
HTTPResponse?

In you insist on writting to a webapp directory, look up
getRealPath().

-Dan
----- Original Message ----- 
From: "lcl" <lc...@gnireel.com>
To: <st...@jakarta.apache.org>
Sent: Thursday, June 12, 2003 7:41 PM
Subject: a jsp question:how to get the web application's directory?


> Hi all,
>
> I just have a question about jsp/servlet, how to gain the directory  in
the
> file system of a web application? because I want to create a file under
the
> web application, and redirect it to user.
>
> Best Regards
> lcl
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: a jsp question:how to get the web application's directory?

Posted by Rob <bs...@insightoutsight.com.au>.
I prefer <html:base/> for this.

lcl wrote:
> Hi all,
> 
> I just have a question about jsp/servlet, how to gain the directory  in the
> file system of a web application? because I want to create a file under the
> web application, and redirect it to user.
> 
> Best Regards
> lcl
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org