Results 1 to 1 of 1
  1. #1
    franksniper is offline Member
    Join Date
    Apr 2012
    Rep Power

    Default Problem with folders in tomcat!

    Hi guys!!!!
    Well, I'm doing a file upload in the form and send to create a folder called upload in the root folder of my project ...

    About 3 minutes later, the folder disappears.
    What it seems that the folder is being created as temporary and after a while without using it disappears ...

    D:\Documents and Settings\Desktop\apache-tomcat-6.0.35\wtpwebapps\scb\upload

    Since this happened to anyone?
    Do you have any configuration that must be done in tomcat?

    Java Code:
    public String execute(){
    		//TODO Validar envio de arquivo
    		String filePath = servletRequest.getSession().getServletContext().getRealPath("/");
    		String imagemCrop = StringUtils.stripAccents(userImageFileName).replace(" ", "_");
    		final File file = new File(filePath+"\\upload");
    		copyFile(userImage, new File(file.getAbsolutePath()+"\\"+ imagemCrop));			
    		new PublicacaoDAO().adiciona(publicacao, imagemCrop);
    		addActionMessage("Publicação cadastrada com sucesso");
    		return "ok";
    Last edited by franksniper; 04-13-2012 at 10:49 PM.

Similar Threads

  1. Access files in folders and sub-folders
    By kakinyim in forum CLDC and MIDP
    Replies: 0
    Last Post: 05-18-2011, 10:29 PM
  2. Replies: 4
    Last Post: 10-10-2009, 01:26 AM
  3. tomcat problem.....
    By munish in forum NetBeans
    Replies: 2
    Last Post: 09-03-2009, 12:49 PM
  4. Tomcat Problem
    By sanjeevtarar in forum Java Servlet
    Replies: 3
    Last Post: 04-16-2008, 12:53 PM
  5. tomcat problem
    By osval in forum New To Java
    Replies: 2
    Last Post: 07-29-2007, 09:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts