External jar create file problem in Tomcat

Asked

Viewed 53 times

0

Good afternoon. I’m having a problem that Crawler4j (an external jar) tries to create files and folders in a Tomcat application but presents the following error:

Couldn’t create this Folder: /data/Crawl/root

How can I allow Tomcat to create files and folders?

The source code is https://github.com/MarcelorjOliveira/CrawlerSpring

Thank you in advance, Marcelo

1 answer

1

Good morning, everyone.

After a long time trying to finally manage to answer the problem. In the command I asked to create the folder /data/Crawl/root pos I thought it would create this folder from the contextpath of Tomcat, but what is written there is that will create from the root directory and in linux normally common users are not allowed to write in the root directory. I discovered this from testing the same application in windows :-( and I realized that it wrote from the root of windows.

Way to go, guys. Thank you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.