jsp - 在我的机器上找到我的 tomcat

标签 jsp tomcat

首先,我的电脑是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/

相关文章:

java.lang.ExceptionInInitializerError Apache 汤姆猫

java - 远程安装 Tomcat(在 digital ocean 服务器上?)

html - 打印票据格式如何设计

java - 使用java构建Web应用程序时出现外文字母问题

authentication - 将 Tomcat NTLM 与 Spring Security 结合使用

java - 在 rest 客户端中验证 Tomcat 身份验证

java - 在速度模板中添加 css 类

java - 如何用angularjs显示 Controller 返回的jsp页面

java - 如何在 JSP 中禁用几行 EL 表达式

java - 我想在jsp中每页显示数据库10个结果