0

I'm creating a page on github. In the "setting" I have selected the page option "master branch".

I found out that my site's url is automatically redirecting to "index.html" file in the repository, but actually I would like my site url to show "main.jsp"

So I have created "index.html" file like this :

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

But when I enter the url, jus the "main.jsp" file is downloaded, not redirected. How can I solve this problem? :'(

I have also tried this way (index.html) :

<script type="text/javascript"> location.href="main.jsp"; </script> 
1
  • I think JSP only works on tomcat. Your code is fine. maybe use location.redirect() Commented Dec 23, 2018 at 11:56

1 Answer 1

3

As stated in the GitHub docs

GitHub Pages is a static site hosting service and doesn't support server-side code such as, PHP, Ruby, or Python.

As JavaServer Pages are dynamic GitHub pages do not support them.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.