Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Publish causes runtime files to be deleted
Publish causes runtime files to be deleted [message #194000] Tue, 05 June 2007 21:44 Go to next message
Eclipse UserFriend
Originally posted by: tjerk.wolterinkwebdesign.com

Ok i have a servlet based applications,
it supports uploading of files..
The files are placed in a subdirectory 'uploads' of /web,
which is created at runtime..

Every time eclipse does a publish ( because i changed some files )
the uploads dir is gone...

Why the heck does eclipse does a total clean??
In this way i cannot do testing.. because the uploads dir is gone each
time.

Ideally i also want a clean action to discard the uploads dir..
Is this possible..

If not it does not make web app developemnt easier..


Thanks in advance,

Tjerk Wolterink
Re: Publish causes runtime files to be deleted [message #194320 is a reply to message #194000] Tue, 12 June 2007 16:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tjerk.wolterinkwebdesign.com

Tjerk Wolterink schreef:
>> [problem]
>
> Thanks in advance,
>
> Tjerk Wolterink



Anyone?
Re: Publish causes runtime files to be deleted [message #196039 is a reply to message #194000] Wed, 11 July 2007 14:03 Go to previous messageGo to next message
David Williams is currently offline David WilliamsFriend
Messages: 722
Registered: July 2009
Senior Member
On Tue, 05 Jun 2007 17:44:58 -0400, Tjerk Wolterink <tjerk@wolterinkwebdesign.com> wrote:

> Ok i have a servlet based applications,
> it supports uploading of files..
> The files are placed in a subdirectory 'uploads' of /web,
> which is created at runtime..
>
> Every time eclipse does a publish ( because i changed some files )
> the uploads dir is gone...
>
> Why the heck does eclipse does a total clean??
> In this way i cannot do testing.. because the uploads dir is gone each
> time.
>
> Ideally i also want a clean action to discard the uploads dir..
> Is this possible..
>
> If not it does not make web app developemnt easier..
>
>
> Thanks in advance,
>
> Tjerk Wolterink
>

Tjerk,

I'm not sure I know the answer, or, even, exactly what your question is, but in general,
directories are often "cleaned" in the area that the server thinks is theirs to control.
On production app servers, writing to one of these "reserved" areas would usually result
in an Exception being thrown right away, and perhaps the Eclipse development environment
does not do that.

In any case, you might ask again, saying what server you are using, the method you publish
to it. And, I'm not sure what "/web" is, in your case, but you might try doing your
writing to a completly different directory outside the servers space ... you'd probably
have to do that in a production environment anyway.
Re: Publish causes runtime files to be deleted [message #196045 is a reply to message #196039] Wed, 11 July 2007 14:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tjerk.wolterinkwebdesign.com

David Williams schreef:
> On Tue, 05 Jun 2007 17:44:58 -0400, Tjerk Wolterink <tjerk@wolterinkwebdesign.com> wrote:
>
>> Ok i have a servlet based applications,
>> it supports uploading of files..
>> The files are placed in a subdirectory 'uploads' of /web,
>> which is created at runtime..
>>
>> Every time eclipse does a publish ( because i changed some files )
>> the uploads dir is gone...
>>
>> Why the heck does eclipse does a total clean??
>> In this way i cannot do testing.. because the uploads dir is gone each
>> time.
>>
>> Ideally i also want a clean action to discard the uploads dir..
>> Is this possible..
>>
>> If not it does not make web app developemnt easier..
>>
>>
>> Thanks in advance,
>>
>> Tjerk Wolterink
>>
>
> Tjerk,
>
> I'm not sure I know the answer, or, even, exactly what your question is, but in general,
> directories are often "cleaned" in the area that the server thinks is theirs to control.
> On production app servers, writing to one of these "reserved" areas would usually result
> in an Exception being thrown right away, and perhaps the Eclipse development environment
> does not do that.
>
> In any case, you might ask again, saying what server you are using, the method you publish
> to it. And, I'm not sure what "/web" is, in your case, but you might try doing your
> writing to a completly different directory outside the servers space ... you'd probably
> have to do that in a production environment anyway.
>
>


I thought of that option ( writing it outside the server space )

But in that way teh server does not serve these files, so i have
to write my own Servlet that reads the files and outputs it the out
ServletResponse outputstream..., but then i loose some features
lik chunked returns , and otehr http features..

I think the DefaultServlet class of Tomcat handles the serving of files..

And by the way: why is it wrong to write files in the server space?
Re: Publish causes runtime files to be deleted [message #196215 is a reply to message #196045] Thu, 12 July 2007 01:20 Go to previous message
David Williams is currently offline David WilliamsFriend
Messages: 722
Registered: July 2009
Senior Member
On Wed, 11 Jul 2007 10:26:19 -0400, Tjerk Wolterink <tjerk@wolterinkwebdesign.com> wrote:

>
> And by the way: why is it wrong to write files in the server space?
>

I've just seen some cases where this is considered a security exposure (someone could purposely or accidently write over someone elses data).

And, note, I'm not saying this is the case here, there could be some bug ... or, it might differ from server to server. Perhaps you could try a small test case with your server, completely outside and independent of Eclipse ... and if you can get that to work, then it would be a fair bug or feature request to be able to "simulate" the same thing from within the Eclipse environmnet.

But, in the mean time, you may need to use a different part of the file system.

HTH
Previous Topic:build/classes
Next Topic:Announcing Webtools 2.0
Goto Forum:
  


Current Time: Thu Apr 18 14:36:31 GMT 2024

Powered by FUDForum. Page generated in 0.01978 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top