Google App Engine - 部署期间的自定义表单
Google App Engine - Custom forms during deployment
我们正在尝试部署 Google Web 应用程序。应用程序在本地计算机上运行良好,但 运行 在部署为 Google App Engine 时出现问题。
-- Our Index File has this line
<li><a href="validation_form">Data Validation</a></li>
-- Where validation_form is another HTML file in the same folder (WEB_iNF)
Insert Data in the box below
<form action="results/validation" method="post">
<textarea rows="50" cols="50" name = "inputJson" >
</textarea>
<input type="submit" value="submit"/>
</form>
在本地主机上,当在索引页面上单击 link 时,validation_form 在 localhost:8888/validation_form 打开。
在 Google App Engine 上,当我单击 link 时,它会将 validation_form 下载到本地驱动器。
我原以为它会出现在 "myapp.appspot.com/validation_form"。
感谢任何建议。谢谢
如果您的 html 文件缺少扩展名,App 引擎将不知道您文件的内容类型。如果您通过 servlet 提供服务并手动设置内容类型,这可能会起作用。
但是:索引文件中的 link 正在运行。下载表格就是证明。你得到下载是因为 servlet 容器不知道如何处理没有扩展名的文件。
因此:只需添加 .html 扩展名即可。
我们正在尝试部署 Google Web 应用程序。应用程序在本地计算机上运行良好,但 运行 在部署为 Google App Engine 时出现问题。
-- Our Index File has this line
<li><a href="validation_form">Data Validation</a></li>
-- Where validation_form is another HTML file in the same folder (WEB_iNF)
Insert Data in the box below
<form action="results/validation" method="post">
<textarea rows="50" cols="50" name = "inputJson" >
</textarea>
<input type="submit" value="submit"/>
</form>
在本地主机上,当在索引页面上单击 link 时,validation_form 在 localhost:8888/validation_form 打开。
在 Google App Engine 上,当我单击 link 时,它会将 validation_form 下载到本地驱动器。
我原以为它会出现在 "myapp.appspot.com/validation_form"。
感谢任何建议。谢谢
如果您的 html 文件缺少扩展名,App 引擎将不知道您文件的内容类型。如果您通过 servlet 提供服务并手动设置内容类型,这可能会起作用。
但是:索引文件中的 link 正在运行。下载表格就是证明。你得到下载是因为 servlet 容器不知道如何处理没有扩展名的文件。
因此:只需添加 .html 扩展名即可。