无法使用Tomcat服务器从IntelliJ中运行/调试jsp页面

时间:2015-02-05 14:19:34

标签: java jsp tomcat intellij-idea

我创建了一个新项目并为其创建了工件。 当我从命令提示符运行Tomcat并转到:http://localhost:8080/IntelProject1/index.jsp

我可以看到我的页面。

但是当我尝试从IntelliJ运行它时,它会打开空白页面:     http://localhost:8080

如果我试着去: http://localhost:8080/IntelProject1/index.jsp

这就是它显示的内容:

HTTP Status 404 - /IntelProject1/index.jsp

type Status report

message /IntelProject1/index.jsp

description The requested resource is not available.

Apache Tomcat/7.0.57

能从tomcat找到它的原因是因为我在tomcat / conf文件夹中编辑了server.xml文件:

<Context path="/IntelProject1" docBase="C:\Users\ibogojevic\Desktop\IntelProject1\web\JSP" />

但我希望能够在IntelliJ

中打开它并进行调试

也许我的神器错了。 有什么想法吗?

1 个答案:

答案 0 :(得分:11)

在IntelliJ IDEA中打开调试配置,并确保选中在Tomcat中配置的部署应用程序复选框,如屏幕截图所示。

enter image description here

相关问题