The problem:
I have tomcat running locally on port 8400 (localhost:8400). I’m working on a web application that communicates with a servlet on tomcat.
When I preview from Aptana the URL is: http://127.0.0.1:8020. Ajax calls I make to tomcat (which is localhost:8400) from my webpage are prevented by Firefox with code 1012 (Access to restricted URI denied).
Questions:
-
Is there a way to define that Aptana will use my local tomcat folder as an output build folder?
-
Is there a way to configure the preview server to be localhost:8400, and continue running tomcat on the same port?
-
Maybe I’m asking the wrong question altogether… Any other way around this 1012 error?
Thanks
1) Yes. You can place the project location anywhere you like: http://wiki.appcelerator.org/display/tis/Importing+an+Existing+Project
2) You can also configure the preview server to use a different URL:
http://wiki.appcelerator.org/display/tis/Previewing+a+project+in+a+web+browser
I’m not 100% sure by what you mean by preview–there are two types, one of which is when pressing the “Run” button, and the other is when pressing the “Preview” icon in the toolbar. The link above gives examples how to configure both options.
3) Changing the preview server should allow you to use localhost:8400 for preview.