2

Before I explain the problem, I just want to point out that I am completely new to NetBeans and Tomcat and I am doing a school project. That being said, the problem is exactly what the title says. Here is the output when I try to run a simple Hello World jsp:

In-place deployment at C:\Users\lostl\OneDrive\Documents\NetBeansProjects\Project3\build\web Deployment is in progress... deploy?config=file%3A%2FC%3A%2FUsers%2Flostl%2FAppData%2FLocal%2FTemp%2Fcontext7180600714574256491.xml&path=/Project3 FAIL - Failed to deploy application at context path [/Project3] C:\Users\lostl\OneDrive\Documents\NetBeansProjects\Project3\nbproject\build-impl.xml:1058: The module has not been deployed. See the server log for details. BUILD FAILED (total time: 0 seconds)

I am using Apache NetBeans 11.2 and Tomcat 9 if it is relevant.

Here is what I tried:

  • I checked the server log and it displays absolutely nothing.
  • I tried setting the context path directly to Project3 (i.e. including the -C:/... before Project3) in the context.xml file under META-INF folder.
  • I tried restarting NetBeans and cleaning and building the project.
  • I tried running NetBeans under admin privileges.

I might seem like such an idiot for not knowing how to fix this since no one else seems to have this problem, but please help me out.

Long Nguyen
  • 73
  • 1
  • 6

5 Answers5

7

If you have installed the Apache Tomcat appart from Netbeans, maybe your apache service is already running and it conflicts with Netbeans. You may stop the apache service and then run the application in Netbeans.
Because Netbeans start the apache service in a diffent way, so you don´t need to install the aplication on apache´s folder.

2

Check out the Windows Services (Services App) and stop the Apache Tomcat if running, then from Netbeans menu select Run->Run Project. Netbean will start Tomcat and deploy your web app onto the Tomcat server.

Eric Tobias
  • 3,225
  • 4
  • 32
  • 50
Darvin
  • 148
  • 8
1

I fixed it. All I had to do was restart my computer. I feel so dumb.

Long Nguyen
  • 73
  • 1
  • 6
0

clean your project if clean project failed to delete some file then, Just check there must be a java process running at background. If you are using windows 10 then follow these steps

  1. open command prompt and type below commands
  2. tasklist | findstr java (hit enter now you can see a task list with pid number )
  3. taskkill /F /PID "PID_OF_JAVA_PROCESS" (where PID_OF_JAVA_PROCESS--> task pid hit enter)
  4. now run the project again
0

I faced this problem and found a solution. It is very simple. All you need to do is stop the Tomcat services or restart your computer and run your program.