1

I need to use a crossdomain.xml file to access my WebApp from a dev sandbox.
I gather from other SO posts that it should be accessible at http://localhost:8080/crossdomain.xml , hence in tomcat ROOT webapp.

Where the heck is that ROOT directory when running Tomcat in Eclipse?

Edit: Tomcat is using a Runtime Environment named "Apache Tomcat v6.0" which is using a "Tomcat installation directory" set to "D:\dev\apache-tomcat-6.0.33"
I tried to drop crossdomain.xml in "D:\dev\apache-tomcat-6.0.33\webapps\ROOT" but I still get a 404 trying to access http://localhost:8080/crossdomain.xml from a browser. In fact, anything in that ROOT directory is accessible.

Edit 2: In the server launch configuration, there is an "Arguments" tab listing the following -Dcatalina.base="D:\dev\workspaces\project\.metadata\.plugins\org.eclipse.wst.server.core\tmp1" -Dcatalina.home="D:\dev\apache-tomcat-6.0.33" -Dwtp.deploy="D:\dev\workspaces\project\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps" -Djava.endorsed.dirs="D:\dev\apache-tomcat-6.0.33\endorsed"
Hence, I pasted the crossdomain.xml into D:\dev\workspaces\project\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\ROOT and ... it worked. Seriously.

Thanks in advance

MonoThreaded
  • 11,429
  • 12
  • 71
  • 102
  • I no Java expert; but I don't understand what "Running Tomcat in Eclipse means". Usually my server software and my IDE are completely separate from each other [even when on the same machine for development purposes] – JeffryHouser Nov 28 '12 at 16:31
  • Eclipse can run Tomcat as a plugin. This is pretty cool to debug WebApps on the fly. – MonoThreaded Nov 28 '12 at 16:34
  • 1
    Interesting. If I read your "Edit 2" correctly; then you have solved the problem. I would recommend you answer your own question. – JeffryHouser Nov 28 '12 at 17:11

1 Answers1

2

As per edit #2
In server launch configuration, there is an "Arguments" tab listing the following VM Arguments
-Dcatalina.base="D:\dev\workspaces\project\.metadata\.plugins\org.eclipse.wst.server.core\tmp1" -Dcatalina.home="D:\dev\apache-tomcat-6.0.33" -Dwtp.deploy="D:\dev\workspaces\project\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps" -Djava.endorsed.dirs="D:\dev\apache-tomcat-6.0.33\endorsed"

Hence, I pasted the crossdomain.xml into D:\dev\workspaces\project\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\ROOT

MonoThreaded
  • 11,429
  • 12
  • 71
  • 102