首先,我的电脑是windows 7 64bit,安装了xampp(apache, php, mysql), vmware server, java。
http://localhost => 自动重定向到 http://localhost/xampp https://localhost:8333/ui/#(vmware服务器web访问页面) C:\xampp\tomcat(tomcat文件夹) C:\xampp\htdocs\(php文件目录)
我试图将一个空白的 jsp 文件放到 C:\xampp\htdocs\jsp\test.jpg 并运行 http://localhost/jsp/test.jsp , 有文字显示
cannot find current JDK installation
现在,当我输入 http://127.0.0.1/examples/index.html 时,我想让我的机器运行 jsp。 , 出现tomcat web服务器页面错误
HTTP Status 404 - /examples/index.html
--------------------------------------------------------------------------------
type Status report
message /examples/index.html
description The requested resource (/examples/index.html) is not available.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.16
我想问一下,我的tomcat主目录在哪里?运行 jsp 示例的 url 和端口号是什么?
谢谢
最佳答案
有几点需要注意。
xampp 的 Tomcat 插件的自述文件有你要找的东西 http://www.apachefriends.org/winxampp/readme-addon-tomcat.txt 这表明
Tomcat Server Home = .\xampp\tomcat
Tomcat URL = http://127.0.0.1:8080/
Tomcat Doc Root = .\xampp\tomcat\webapps
Tomcat example Root = .\xampp\tomcat\webapps\examples
Tomcat example URL = http://127.0.0.1/examples/
所以你的 web 应用程序应该在 .\xampp\tomcat\webapps
目录下
请问您安装的是什么版本的JDK?错误消息 cannot find current JDK installation
表示您没有安装或设置正确的 JDK 版本。
关于jsp - 在我的机器上找到我的 tomcat,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9187494/