Bài đăng

Hiển thị các bài đăng có nhãn Tomcat

Redirect TOMCAT to home page.

Redirect TOMCAT to home page. Open  webapp/ROOT/WEB-INF/web.xml , remove any servlet mapping with path  /index.html  or  /index.jsp , and save. Remove  webapp/ROOT/index.html , if it exists. Create the file  webapp/ROOT/index.jsp  with this line of content: <% response . sendRedirect ( "/some/where" ); %> or if you want to direct to a different server, <% response . sendRedirect ( "http://otherserver.example.com/some/where" ); %>

Redirect TOMCAT to https

Redirect TOMCAT to https Edit file server.xml Example server.xml file: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 <?xml version='1.0' encoding='utf-8'?> <Server port= "8005" shutdown= "SHUTDOWN" > <Listener className= "org.apache.catalina.core.AprLifecycleListener" SSLEngine= "on" /> <Listener className= "org.apache.catalina.core.JasperListener" /> <Listener className= "org.apache.catalina.mbeans.ServerLifecycleListener" /> <Listener className= "org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> <GlobalNamingResources> <Resource name= "UserDatabase" auth= "Container" type= "org.apache.catalina.UserDatabase" description= "User database th...