unreadable directory

Attempting to debug tomcat from idea:

Why is this error showing up in my localhost_log.]]>.txt file in my
C:\Documents and
Settings\Administrator\.IntelliJIdea\system\tomcat_myapp_1d63050a\logs
directory :

"Error initializing resources: Document base C:\Documents and
Settings\Administrator\.IntelliJIdea\system\tomcat_myapp_1d63050a\webapps\my
app does not exist or is not a readable directory"

I configured my webapp directory in the webapp debug tab to look for my
"resources" in the correct directory: C:\tomcat4\webapps\myapp, why is it
trying to look for them elsewhere?

I'm getting 404 not founds on my resources also as I try to hit them from a
browser even though everything appears to startup correctly in the debug
window.

Vard Lott
Symantec Corp.
vlott@symantec.com



1 comment

Hello Vard,

I configured my webapp directory in the webapp debug tab to look for my
"resources" in the correct directory: C:\tomcat4\webapps\myapp, why is it
trying to look for them elsewhere?


IDEA starts your webapp with alternative CATALINA_BASE directory which is actually a temp directory created for running the web app
selected in Run configuration (e.g. <idea-system-dir>\tomcat_myapp_1d63050a\webapps\myapp). The modified config files are copied
there and (citation from Tomcat's "RUNNING.txt"):

"Tomcat 4 will calculate all relative references for files in
the following directories based on the value for CATALINA_BASE instead of
CATALINA_HOME:

  • conf - Server configuration files (including server.xml)

  • logs - Log and output files

  • webapps - Automatically loaded web applications

  • work - Temporary working directories for web applications"


The config files are modified in such a way, that they point to your web app's document base and you don't need to deploy it. The
answer to your question depends on how you configured your web app run configuration and how your application reads resources.

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"



0

Please sign in to leave a comment.