http://localhost:8080/main.do?action=index改成http://localhost:8080/来访问首页
2014-07-16 10:18
627 查看
web.xml
index.jsp:
访问首页路径:http://localhost:8080/main.do?action=index
需要访问首页的时候,直接用 :http://localhost:8080/
解决方案:修改index.jsp
<welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list>
index.jsp:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=GBK"> <title>Loading...</title> <script language="javascript" type="text/javascript"> window.location.href="main.do?action=index"; </script> </head> <body> </body> </html>
访问首页路径:http://localhost:8080/main.do?action=index
需要访问首页的时候,直接用 :http://localhost:8080/
解决方案:修改index.jsp
<jsp:forward page="/egmain.egov?action=index"></jsp:forward> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=GBK"> <title>Loading...</title> <script language="javascript" type="text/javascript"> //window.location.href="egmain-index.html"; //此处用jsp:forward 动态跳转命令 </script> </head> <body> </body> </html>
相关文章推荐
- Tomcat 访问http://localhost:8080/ 404 无法访问本地管理首页
- 在ie中输入http://localhost:8080提交请求时,一直访问不到页面
- eclipse3.6_jee启动tomcat无法访问http://localhost:8080/的解决方案
- 在Eclipse中启动Tomcat后,http://localhost:8080/无法访问
- IE浏览器无法访问http://localhost:8080,这个是什么问题?
- 新安装的tomcat,可以启动成功,但访问http://localhost:8080时却报了404错误
- Can't find the request for http://localhost:8080/****/****.do's Observer
- 【异常】Android中使用localhost:8080或者172.0.0.1:8080访问本地服务器org.apache.http.conn.HttpHostConnectException异常
- 启动tomcat无法访问http://localhost:8080/的解决方案
- android 中访问localhost:8080 报错org.apache.http.conn.HttpHostConnectException
- eclipse3.6_jee启动tomcat无法访问http://localhost:8080/的解决方案
- Eclipse 配置tomcat访问http://localhost:8080出现404
- 特殊Url处理。例如addActionpop.htm?url='http://localhost:8080/PowerPlayer.p3x?Tid=1826&Cid=152728&Fid=376424'&code=eeee@MG
- eclipse3.6_jee启动tomcat无法访问http://localhost:8080/
- 解决“Eclipse中启动Tomcat后,http://localhost:8080/无法访问”的问题
- 解决“Eclipse中启动Tomcat后,http://localhost:8080/无法访问”的问题
- eclipse配置tomcat,访问http://localhost:8080出现404错误
- tomcat配置,使用http://localhost:8080/来访问工程
- tomcat 能够启动 并且能够用http://127.0.0.1:8080访问 但是不能用http://localhost:80800访问的解决办法。
- 启动tomcat和myeclipse后,http://localhost:8080无法访问