2014年5月14日星期三

Upload pictures, restart tomcat picture was gone.

My upload path is thus acquired saveurl = request.getSession () getServletContext () getRealPath ("/") + url..;
database holds the relative address. Uploaded to the tomcat, but in a few days the picture will automatically disappear. Seek solutions
------ Solution ------------------------------------- -------
http://bbs.csdn.net/topics/360088800

this post I have described in great detail , and you have to see to understand
------ For reference only ------------------ ---------------------
you did not get the picture of it, to look at the picture above, the server is still gone ?
------ For reference only -------------------------------------- -
address is war package tomcat \ webapp under ? After redeployment is not overwritten . Save Address replace what outside tomcat directory and then try
------ For reference only -------------------------- -------------
restart should not , you will not re- deploy it. You can consider it put elsewhere .
------ For reference only -------------------------------------- -
this is because you publish the project the wrong way , every release is the local source code Webroot or Webcontent all copied to the tomcat webapps, which put the picture before uploading to cover
you look at the first nine
http://blog.csdn.net/ch656409110/article/details/9417949
------ For reference only -------------------------------------- -
place from the rest of the picture , webapp
------ For reference only ------------------------ after ---------------

upload server is under the picture . A few days will be automatically deleted. Preliminary determination is to restart the server when they were covered
------ For reference only ---------------------------- -----------

not released yet. Still in the development phase ah ,
------ For reference only -------------------------------- -------

placed elsewhere ? That the deployment of the pictures are not uploaded to the server , to get to it?
------ For reference only -------------------------------------- -

not released yet. Still in development stage , ah,  
deployment
------ For reference only --------------------------------- ------

not released yet. Still in development stage , ah,          
deployment  
this window in which to find ? Which should I choose ?

------ For reference only ----- ----------------------------------

not originally in relation to upload pictures uploaded to the server it?
------ For reference only -------------------------------------- -
you create Server yet , that is bound with tomcat Server, create a good Server, double-click it out
------ For reference only ------ ---------------------------------
you kind of situation should not happen , right , unless you delete the project , and the release of tomcat when this will happen , there will be pictures do not exist , I hope you say that situation . . .
------ For reference only ---------------------------------------
at startup may be considered to obtain startup directory ($ {catalina_home} / bin), and then in the directory where the increase ( such as picture), down this path , the next thing will save the downloaded here ($ {catalina_home} / bin / picture).
------ For reference only -------------------------------------- -

not it , still running on a few days later , the image files are stored under the server folder is empty
------ For reference only -------- -------------------------------

under normal circumstances are not uploaded to the server? This method is to wait until you are really on the line running. Something does not it?
------ For reference only -------------------------------------- -
situation should be such that , when you first deploy the project to tomcat
you upload pictures, then the image is saved in the project under tomcat

When you deploy a second time , you do not have the original source project is the last time you saved the image , then you will overwrite the second deployment of the first deployment (with pictures ) project

没有评论:

发表评论