javatomcatintellij-ideaserverdeploying

Tomcat isn't working


I'm trying to run Tomcat 7.0.75 integrated in my Intellij with simple Helloworld web-app on java servlet. And i get this output:

D:\apache-tomcat-7.0.75\bin\catalina.bat run
Cannot find "В«D:\apache-tomcat-7.0.75\binВ»\bin\setclasspath.bat"
Disconnected from server
This file is needed to run this program

I installed TomCat, and preparing web-app using instructions from internet. I set CATALINA_BASE and CATALINA_HOME variables, of course. I can't find same strange output string

Cannot find "В«D:\apache-tomcat-7.0.75\binВ»\bin\setclasspath.bat"

Maybe this incorrect path is the cause, but i have no idea what to do. That's my first experience with servers in java.


Solution

  • try to install tomcat 8 or 9 version.

    Id Idea->Run->Edit configurations->click on "plus"->Tomcat Server->Local

    Server tab: Application Server - choose your tomcat

    open browser - http://localhost:8080/your war package name/

    http port: 8080

    where your war package name - is root of your app - in pom.xml see section: build -> finalName

    Deployment tab: add your war package name:war exploded with application context /your war package name