无法使用Tomcat服务器从IntelliJ中运行/调试jsp页面 [英] Cannot run/debug jsp page from within IntelliJ using Tomcat server

查看:2313
本文介绍了无法使用Tomcat服务器从IntelliJ中运行/调试jsp页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I created a new project and created artifact for it. When I run Tomcat from command prompt and go to: http://localhost:8080/IntelProject1/index.jsp

我可以看到我的页面。

I can see my page.

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

But when I try to run it from IntelliJ, it opens empty page: http://localhost:8080

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

这是它显示的内容:

HTTP状态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文件:

The reason it is able to find it from tomcat is because I edited server.xml file in tomcat/conf folder:

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

但我希望能够在 IntelliJ <中打开它并进行调试/ code>

But I want to be able to open it and debug from within IntelliJ

也许我的工件错了。
有什么想法吗?

Maybe my artifact is wrong. Any thoughts?

推荐答案

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

Open Debug Configuration in IntelliJ IDEA and make sure that Deploy applications configured in Tomcat checkbox is checked as it shown on the screenshot.

这篇关于无法使用Tomcat服务器从IntelliJ中运行/调试jsp页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆