简体   繁体   English

Intellij IDEA Web项目部署

[英]Intellij IDEA Web Project deployment

Created a new Java Web Project from a scratch in Intellij IDEA, changed nothing here, and found out that my project starts by default at localhost:8080/ in contrast to Eclipse, NetBeans, for example, where the project starts at localhost:8080/WEB_PROJECT_NAME . 在Intellij IDEA中从头开始创建了一个新的Java Web Project,在此没有任何改变,发现我的项目默认是从localhost:8080 /启动的,而与Eclipse的NetBeans相反,例如,项目是从localhost:8080 /启动的WEB_PROJECT_NAME

The thing is that the default file index.jsp is always correctly displayed at localhost:8080/index.jsp But I always got a 404 error, trying to access localhost:8080/WEB_PROJECT_NAME/index.jsp 事实是,默认文件index.jsp总是正确显示在localhost:8080 / index.jsp,但是我总是遇到404错误,尝试访问localhost:8080 / WEB_PROJECT_NAME / index.jsp

Therefore, I have no opportunity to run any servlets or smth else. 因此,我没有机会运行任何servlet或其他东西。 Anything I try to access via localhost:8080/WEB_PROJECT_NAME/... gives me an error. 我尝试通过localhost:8080 / WEB_PROJECT_NAME / ...访问的任何内容都给我一个错误。

Here are my Run/Debug configurations: 这是我的运行/调试配置: 运行/调试配置

单击屏幕快照中显示的“ 部署”选项卡,您可以在其中指定Web应用程序的上下文/WEB_PROJECT_NAME而不是默认的/ (ROOT)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM