浏览器强制我下载我的 index.jsp 页面而不是查看它。我正在使用 github 页面来托管我的项目

Browser forces me to download my index.jsp page instead of viewing it. I'm using github pages to host my project

我刚刚在 Eclipse 上制作了一个 webapp。我正在使用汤姆猫服务器。无论如何,我已经完成了该项目并想将其在线上传到我的 GitHub 存储库中。我为 gh-pages 创建了一个分支并上传了我的 index.jsp 页面。不幸的是,当我在浏览器上导航到 index.jsp link 时,它开始下载文件,而不是查看页面。

谁能告诉我如何在我的服务器上查看索引页面而不是开始下载?我很困惑。

GitHub 页 only host static content or Jekyll:

In addition to supporting regular HTML content, GitHub Pages supports Jekyll (which generates static content), a simple, blog-aware static site generator.

您不能 运行 Java(或 PHP,或 Python,或 .NET,或其他任何东西)。