-
Notifications
You must be signed in to change notification settings - Fork 30
Problem with "fetch" when deploying as a war #9
Description
I am including the conversation from clj-noir list -
Hi,
I have a clojurescript app which uses fetch for remoting. The app works fine when run as lein run. However when compiled as an uberwar and deployed on jetty, I can see the following error in chrome's js console -
POST http://localhost:8080/_fetch 404 (Not Found)
The url I am using to access the system is http://localhost:8080/tms. All other resources such as css, and css get resolved correctly.
I also tried setting the {:base-url "/tms"} option in my handler, but that didnt help too.
It seems fetch should be making a call to tms/_fetch while it is making a call to /_fetch? How do I resolve this ?
Another observation - I tried deploying it on elasticbeanstalk with tomcat and it works!
So it fails in jetty 6 while works in tomcat 7!
Thanks,
Murtaza
Mark Rathwell [email protected]
7:53 PM (34 minutes ago)
to clj-noir
Another observation - I tried deploying it on elasticbeanstalk with tomcat
and it works!
But on elasticbeanstalk, the servlet is running in the root context
('/' not '/tms'), right? I don't see a built-in way for fetch to
handle a context path, so you should probably open an issue on github
[1].
[1] https://github.com/ibdknox/fetch/issues
Murtaza Husain
8:29 PM (0 minutes ago)
to clj-noir
Yes it is running as root in beanstalk.
Thanks, I will open an issue.