tomcat9.0 mac终端启动成功,却无法访问http://localhost:8080/

初始访问端口默认为8080

cssdeMacBook-Pro:bin caisense$ ./startup.sh

Using CATALINA_BASE:   /Users/caisense/tools/tomcat9.0

Using CATALINA_HOME:   /Users/caisense/tools/tomcat9.0

Using CATALINA_TMPDIR: /Users/caisense/tools/tomcat9.0/temp

Using JRE_HOME:        /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home

Using CLASSPATH:       /Users/caisense/tools/tomcat9.0/bin/bootstrap.jar:/Users/caisense/tools/tomcat9.0/bin/tomcat-juli.jar

Tomcat started.


在终端中启动tomcat,在chrome中缺无法访问http://localhost:8080/

试过多种方法,发现应该是系统权限不够,修改权限(在tomcat9.0/bin目录):

cssdeMacBook-Pro:bin caisense$ chmod 777 *.sh


关闭tomcat,然后再次启动:

cssdeMacBook-Pro:bin caisense$ ./shutdown.sh

Using CATALINA_BASE:   /Users/caisense/tools/tomcat9.0

Using CATALINA_HOME:   /Users/caisense/tools/tomcat9.0

Using CATALINA_TMPDIR: /Users/caisense/tools/tomcat9.0/temp

Using JRE_HOME:        /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home

Using CLASSPATH:       /Users/caisense/tools/tomcat9.0/bin/bootstrap.jar:/Users/caisense/tools/tomcat9.0/bin/tomcat-juli.jar

cssdeMacBook-Pro:bin caisense$ ./startup.sh

Using CATALINA_BASE:   /Users/caisense/tools/tomcat9.0

Using CATALINA_HOME:   /Users/caisense/tools/tomcat9.0

Using CATALINA_TMPDIR: /Users/caisense/tools/tomcat9.0/temp

Using JRE_HOME:        /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home

Using CLASSPATH:       /Users/caisense/tools/tomcat9.0/bin/bootstrap.jar:/Users/caisense/tools/tomcat9.0/bin/tomcat-juli.jar

Tomcat started.


此时能成功访问http://localhost:8080/


阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u012033124/article/details/53370909
文章标签: tomcat
个人分类: j2ee
上一篇eclipse中如何给main传递参数
下一篇mac eclipse neon(javaee)在tomcat9.0上运行dynamic web project错误
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭