Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 在Github上创建网页_Html_Jsp_Github - Fatal编程技术网

Html 在Github上创建网页

Html 在Github上创建网页,html,jsp,github,Html,Jsp,Github,我正在github上创建一个页面。在“设置”中,我选择了页面选项“主分支” 我发现我的站点的url会自动重定向到存储库中的“index.html”文件,但实际上我希望我的站点url显示为“main.jsp” 因此,我创建了如下“index.html”文件: <!DOCTYPE html> <html> <head> <meta http-equiv='refresh' content='0;url=main.jsp'> <title>C

我正在github上创建一个页面。在“设置”中,我选择了页面选项“主分支”

我发现我的站点的url会自动重定向到存储库中的“index.html”文件,但实际上我希望我的站点url显示为“main.jsp”

因此,我创建了如下“index.html”文件:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv='refresh' content='0;url=main.jsp'>
<title>CafeGO</title>
</head>
<body>
</body>
</html>

卡菲戈
但是当我输入url时,“main.jsp”文件被下载,而不是重定向。 我怎样才能解决这个问题?:'(

我也尝试过这种方法(index.html):


location.href=“main.jsp”;
如GitHub中所述

GitHub Pages是一个静态站点托管服务,不支持服务器端代码,如PHP、Ruby或Python

由于JavaServer页面是动态的,GitHub页面不支持它们。

如GitHub中所述

GitHub Pages是一个静态站点托管服务,不支持服务器端代码,如PHP、Ruby或Python


因为JavaServer页面是动态的,所以GitHub页面不支持它们。

我认为JSP只在tomcat上工作。您的代码很好。可能使用location.redirect()我认为JSP只在tomcat上工作。您的代码很好。可能使用location.redirect()
<script type="text/javascript">
location.href="main.jsp";
</script>