开发者

Google app engine: fails on deployment but works perfectly locally -- nonresponsive html form submit button

I have a small test App running on GAE开发者_StackOverflow under the default free quota. It runs fine locally. When deployed on GAE (appspot), some parts of it do not work. Appspot dashboard does not show any error in the logs. Added code to trap quota limits is not triggered. Why is there a variation between the App running locally, versus failing when uploaded? There are no server error screens when deployed, only non-responsive buttons. (One non-responsive html form submit button, which works fine locally.) I am using Eclipse to run the App locally and also to deploy the same identical code.

The Appspot log is below. The *.jsp script getmoreinputs.jsp is supposed to collect data from a form, upon submit, it is supposed to trigger a servlet named /Calculate. The servlet works perfectly when tested locally, but is not triggered in the live deployment.

Any help would be appreciated.

#

1. 08-22 07:57PM 12.475 /getmoreinputs.jsp?cp=true&iv=true 200 23ms 16cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729),gzip(gfe) See details

  98.236.17.99 - - [22/Aug/2010:19:57:12 -0700] "GET /getmoreinputs.jsp?cp=true&iv=true HTTP/1.1" 200 923 "http://black-scholes.appspot.com/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729),gzip(gfe)" "black-scholes.appspot.com" ms=23 cpu_ms=17 api_cpu_ms=0 cpm_usd=0.000615


My test of your insight suggests: GAE is indifferent to / or // in pathname for submit=

When all else fails, try occult methods. Without any change to code, I complied the GAE App with a new version number. Then I went to Appspot dashboard and deleted the old version (which was not working). Amazing! The deployment of the new version worked perfecly, exactly as the local run. There was no change to the code.

GAE has problems. When deployment != Local, my new rule is: clean out all old versions at deployment site. In my case, I had only 1 old version.

Joe


As I mentioned in my answer to your previous question: Check your urls are not having a double slash ('//') e.g. /user//listall. This works on dev server but not when you deploy it on app engine.

What I meant by this was, even if your url may not directly show a // , after appending the url suffix to the hostname this is pretty much possible. So I suggest you to try getmoreinputs.jsp instead of /getmoreinputs.jsp (note the '/' removed).

I suspect when this is being appended internally to http://black-scholes.appspot.com/ it is creating a url which looks like http://black-scholes.appspot.com//getmoreinputs.jsp which will not work on app engine when deployed. However this works on the dev server locally. Please give a try.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜