| Hot Deploy Query [message #1403537] | 
Thu, 24 July 2014 06:14   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hi, 
 
I'm used to using MyEclipse, but I'm trying out standard Eclipse to see if I can get what I need from it. 
 
I have a web project, tomcat 7 configured in eclipse and its working out of the actual tomcat webapps directory (not meta data). 
 
My web project takes in user resources (like images etc) through an upload screen on the website and stores them in tomcat, however, anytime I change a JSP or Java file it deletes the entire deployed project and all the resources which makes developing / testing impossible. 
 
Really I just want it to overwrite the code (JSPs or Java files) and not start doing a full deployment process and erasing all the resources I'm uploading. 
 
Is this possible without MyEclipse? 
 
Many Thanks.
 |  
 |  
  | 
| Re: Hot Deploy Query [message #1403628 is a reply to message #1403537] | 
Thu, 24 July 2014 12:49   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
On 7/24/2014 9:50 AM, Alan Beck wrote: 
> Hi, 
> 
> I'm used to using MyEclipse, but I'm trying out standard Eclipse to see 
> if I can get what I need from it. 
> 
> I have a web project, tomcat 7 configured in eclipse and its working out 
> of the actual tomcat webapps directory (not meta data). 
> 
> My web project takes in user resources (like images etc) through an 
> upload screen on the website and stores them in tomcat, however, anytime 
> I change a JSP or Java file it deletes the entire deployed project and 
> all the resources which makes developing / testing impossible. 
> 
> Really I just want it to overwrite the code (JSPs or Java files) and not 
> start doing a full deployment process and erasing all the resources I'm 
> uploading. 
> 
> Is this possible without MyEclipse? 
> 
> Many Thanks. 
 
The server support in WTP assumes what you have in a Dynamic Web Project  
and what has been deployed/published to the server for that project  
should remain in sync.  If you have a file on the server that doesn't  
exist in the project, the WTP server support assumes you must have  
deleted it from your project so publishing will delete it from the  
server to keep them in sync.  Deleting a file in a Dynamic Web Project  
and not have it disappear from the server would create a problem for a  
much larger number of users.  I don't know of a way to tell publishing  
not to keep the project and the deployed/published version in sync. 
 
One alternative may be to enable the "Serve modules without publishing"  
option in the server editor.  This avoids publishing completely.  The  
side effect is that the uploaded content will be stored in your project  
since that is what is being served.  The only other alternative I can  
think of is to create an Ant script to provide a non-deleting update and  
set publishing to manual only. 
 
Note that you are relying on behavior not guaranteed by the servlet  
spec.  The servlet spec would expect you to store the uploaded files  
someplace outside of the webapp and use a servlet to serve up those  
files as if they were inside the webapp.  This could allow your uploaded  
content to be unaffected by webapp redeployment. 
 
Cheers, 
Larry
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.03226 seconds